Deploy on Vercel
Connect the repository
- Go to vercel.com/new
- Import the GitHub repository
- Framework preset: Next.js (auto-detected)
- Build command:
npm run build(default) - Install command:
npm install(runspostinstall→prisma generate)
Environment variables
Add variables in Project → Settings → Environment Variables before the first production deploy. At minimum:
DATABASE_URLAUTH_SECRETAUTH_TRUST_HOST=trueNEXT_PUBLIC_SITE_URL
See Production environment for the full list.
Database before first deploy
From your machine (or CI), push schema to production:
DATABASE_URL="postgresql://..." npx prisma db push
DATABASE_URL="postgresql://..." npm run db:seed # optional
Custom domain
- Add domain in Vercel Domains
- Update DNS per Vercel instructions
- Set
NEXT_PUBLIC_SITE_URLto the canonical HTTPS URL
Cron jobs
Configure Vercel Cron (or external scheduler) to hit:
| Endpoint | Purpose |
|---|---|
GET /api/cron/research-ops |
All background jobs |
GET /api/cron/process-events |
Event queue only |
GET /api/cron/process-webhooks |
Study webhooks |
GET /api/cron/run-export-schedules |
Scheduled exports |
Pass Authorization: Bearer $CRON_SECRET when CRON_SECRET is set.
Build notes
- Node 20+ recommended (matches local dev)
postinstallgenerates Prisma client automatically- TypeScript and ESLint run during
next build