Deployment
Ship to Vercel in one command; Cloudflare notes included.
Vercel (recommended)
npx vercel login
npx vercel link --yes
# add env vars: vercel env add NAME production
npx vercel deploy --prod
Add your custom domain in the Vercel dashboard and point DNS (a CNAME is suggested automatically). Set NEXT_PUBLIC_SITE_URL and BETTER_AUTH_URL to the final domain before the production build.
Cloudflare Workers
The OpenNext toolchain is wired (pnpm run preview / deploy), with Windows compatibility patches applied automatically on pnpm install. Note: the free Workers plan caps scripts at 3 MiB — this template needs the paid plan ($5/mo).
After deploying
- Point Stripe webhooks to
https://your-domain/api/stripe/webhookand setSTRIPE_WEBHOOK_SECRET - Update OAuth redirect URIs (Google/GitHub) to the new domain
- Schedule the daily credits job: GitHub Actions secret
DATABASE_URL, or cron-job.org hitting/api/distribute-creditswith basic auth
Database migrations
pnpm db:generate # after schema edits
pnpm db:migrate # apply