The app deploys to Vercelwith zero special configuration, and several things are wired to work without manual setup: auth trusts the deployment's own domain automatically, the AI Gateway authenticates via OIDC, and SEO URLs derive from the production domain.
First deploy
- Push the repo to GitHub and import it in Vercel.
- Before the first build, add the required environment variables:
DATABASE_URL(hosted Postgres — Neon/Supabase) andBETTER_AUTH_SECRET. The build validates env and fails readably if they're missing. - Deploy. Every push to the default branch redeploys automatically.
Migrations
Apply schema changes against the production database as a release step:
DATABASE_URL="<production-url>" pnpm db:migrateLocally, drizzle.config.ts reads .env, so pnpm db:migrate targets whatever database your .env points at.
What needs no configuration on Vercel
BETTER_AUTH_URL— derived from the production domain; set it only for a custom domain.AI_GATEWAY_API_KEY— OIDC covers gateway auth (the account still needs a card on file to unlock gateway credits).NEXT_PUBLIC_APP_URL— sitemap/robots/OG URLs fall back to the production domain.
Production checklist
- Payment provider keys set (
PAYMENT_PROVIDER+ Stripe or iyzico) and the Stripe webhook pointing at your domain. RESEND_API_KEY+EMAIL_FROMon a verified sending domain.ADMIN_EMAILSset to your address.CRON_SECRETset so Vercel Cron can call the weekly-digest route (it returns 501 until then).- Rotate
BETTER_AUTH_SECRETaway from any value you used in development.