golemkit

Ship

Deployment

The app deploys to Vercel with 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

  1. Push the repo to GitHub and import it in Vercel.
  2. Before the first build, add the required environment variables: DATABASE_URL (hosted Postgres — Neon/Supabase) and BETTER_AUTH_SECRET. The build validates env and fails readably if they’re missing.
  3. 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:migrate

Locally, 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, including custom domains attached to the Vercel project. Set it only when your public domain isn’t known to Vercel (e.g. behind an external proxy).
  • 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_FROM on a verified sending domain. In production, sending throws without the key — sign-in and verification links must never silently end up in server logs.
  • ADMIN_EMAILS set to your address.
  • CRON_SECRET set so Vercel Cron can call the weekly-digest route (it returns 501 until then).
  • Rotate BETTER_AUTH_SECRET away from any value you used in development.