Deployment
Deploy your Sistine Starter app to production.
Prerequisites
Before deploying, ensure you have:
- PostgreSQL database (Supabase, Neon, or Vercel Postgres)
- Volcano Engine API key
- Dodo Payments or Waffo (Pancake) account and API keys
- Resend API key
- (Optional) Google OAuth credentials
- (Optional) S3-compatible storage
Deploy to Vercel
1. Push to GitHub
git push origin main2. Import in Vercel
- Go to vercel.com
- Import your GitHub repository
- Set all environment variables (see Environment Variables)
- Deploy
3. Database Migration
After first deploy:
pnpm db:migratedb:migrate applies the committed SQL in drizzle/ and records it in
drizzle.__drizzle_migrations. Do not use db:push — it silently alters the
schema with no migration record, so the next migrate will drift.
4. Configure Webhook
Register the webhook for the provider you use:
pnpm webhooks:register --list # see what's registered
pnpm webhooks:register --url https://your-domain.comOr set it by hand in the dashboard:
| Provider | URL | Header it needs |
|---|---|---|
| Dodo | https://your-domain.com/api/payments/dodo/webhook | webhook-signature (Standard Webhooks) |
| Waffo | https://your-domain.com/api/payments/waffo/webhook | x-waffo-signature (RSA-SHA256) |
Then verify the shared secret actually matches what's deployed — a mismatch only shows up as "provider says our endpoint always returns 401":
pnpm verify:signature https://your-domain.com # Dodo5. Set Up Cron Job
For annual subscription credit grants, configure a cron job to call hourly:
curl -H "Authorization: Bearer YOUR_CRON_SECRET" \
https://your-domain.com/api/cron/subscription-grantsOn Vercel, add to vercel.json:
{
"crons": [{
"path": "/api/cron/subscription-grants",
"schedule": "0 * * * *"
}]
}6. Create Admin Account
ADMIN_EMAIL=admin@example.com pnpm admin:setup7. Verify Environment
Make sure production .env has correct values for:
BETTER_AUTH_URL— Your actual domainNEXT_PUBLIC_APP_URL— Your actual domainRESEND_FROM_EMAIL— Verified domain sender
Post-Deploy Checklist
- Database migrated
- Webhook URL configured at the provider you use (
pnpm webhooks:register --list) -
pnpm doctor:onlinepasses (provider product IDs actually exist) - Cron job set up for credit grants
- Admin account created
- Email sender domain verified in Resend
- OAuth redirect URIs updated for production domain
- Analytics keys configured (PostHog, GA, Clarity)