Production

Deployment

Prepare the app for Vercel or another Next.js hosting environment.

Vercel

The repository includes a vercel.json configuration file. Set all environment variables in your Vercel project settings using the same values as your production .env.local, updating any localhost URLs to the production domain.

Deployment checklist

  • Production Convex deployment is running and CONVEX_DEPLOYMENT is set.
  • NEXT_PUBLIC_CONVEX_URL points to the production deployment.
  • Clerk application is on the Pro or Production plan with Google and GitHub OAuth enabled.
  • Clerk JWT template named convex exists with the production Convex URL as audience.
  • CLERK_JWT_ISSUER_DOMAIN matches the JWT template's issuer URL.
  • Clerk callback URLs include the production domain.
  • Clerk publishable and secret keys are the production keys, not the dev keys.
  • OPENAI_API_KEY, OPENAI_EMBEDDING_MODEL, and OPENAI_CHAT_MODEL are set.
  • MISTRAL_API_KEY and MISTRAL_OCR_MODEL are set.
  • SITE_URL and NEXT_PUBLIC_SITE_URL match the production domain.
  • PostHog values are set if analytics should run (optional).

Build before deploy

Production build
pnpm build