Frontend Deployment

Deploy your Next.js frontend to a global CDN with automatic SSL and instant cache invalidation.

How to Deploy

Deploy your frontend through the chat or UI:

"Deploy the frontend"

The deployment process typically completes in 1-2 minutes.

What Gets Deployed

Frontend deployment includes:

  • Pages — All routes in your app/ directory
  • Components — Your React components
  • Styles — CSS, Tailwind, and other styles
  • Assets — Images, fonts, and other static files
  • Configuration — Next.js and environment settings

Infrastructure

CloudFront CDN

Your app is served from 400+ edge locations worldwide for fast load times.

SSL/TLS

Automatic HTTPS with managed certificates. No configuration needed.

Cache Invalidation

CDN cache is automatically cleared on each deployment.

S3 Storage

Static assets stored in S3 for durability and availability.

Build Process

When you deploy, the following happens:

  1. 1

    Install dependencies — npm packages are installed

  2. 2

    Build — Next.js compiles and optimizes your app

  3. 3

    Export — Static HTML and assets are generated

  4. 4

    Upload — Files are uploaded to S3

  5. 5

    Invalidate — CDN cache is cleared

Environment Variables

Frontend environment variables are embedded at build time. Only variables prefixed with NEXT_PUBLIC_ are available in the browser.

Important: Never put secrets in NEXT_PUBLIC_ variables. They will be visible in the browser.

Troubleshooting

  • Build fails: Check for TypeScript errors or missing dependencies
  • Old content showing: Wait a few minutes for CDN cache to update
  • 404 errors: Make sure your routes match file paths in app/