Skip to main content

Setting Up Production Infrastructure: From Zero to Deployed

ยท 2 min read
Uday Tamma
Building AI-Powered Applications

Today marked a significant milestone: taking the portfolio from local development to a fully deployed, production-ready infrastructure with custom domains and auto-deployments.

The Goalโ€‹

Create a professional presence for showcasing AI-powered applications:

  • zeroleaf.dev - Portfolio landing page
  • docs.zeroleaf.dev - Project documentation (Docusaurus)
  • api.zeroleaf.dev - Backend API (FastAPI)

Domain & DNS Setupโ€‹

Purchased zeroleaf.dev and configured Cloudflare as the DNS provider. The name comes from "Aparna" (Sanskrit: without even a leaf) - representing minimalism and focus.

Cloudflare Configurationโ€‹

  • DNS management with proxied records
  • SSL/TLS encryption (Full mode)
  • CDN caching for static assets

Hosting Decisionsโ€‹

Static Sites: Cloudflare Pagesโ€‹

Chose Cloudflare Pages over Vercel for the portfolio and docs:

  • Free tier with generous limits
  • Native Cloudflare integration
  • Git-based auto-deployments

Backend API: Railwayโ€‹

Selected Railway over Render for the FastAPI backend:

  • No cold starts (always-on containers)
  • Simple deployment from GitHub
  • Custom domain support on free tier
  • Better suited for AI workloads that need consistent response times

Auto-Deployment Pipelineโ€‹

All three services now auto-deploy on git push:

ServicePlatformTrigger
PortfolioCloudflare PagesPush to zeroleaf-portfolio
DocsCloudflare PagesPush to zeroleaf-docs
APIRailwayPush to IngredientScanner

Key Learningsโ€‹

  1. Cloudflare Pages vs Workers: Pages is for static sites with git integration; Workers is for serverless functions. Easy to confuse in the dashboard.

  2. Railway vs Serverless: For AI applications with LLM calls, always-on containers beat serverless. Cold starts + API latency = poor UX.

  3. Docusaurus Configuration: The future.v4 flag enables upcoming features but some config options aren't fully supported in v3.x yet.

What's Nextโ€‹

  • Add more projects to the portfolio
  • Implement CI/CD testing before deployments
  • Set up monitoring and analytics