Vercel Deployment
Prerequisites
Section titled “Prerequisites”- A Next.js application using The Booking Kit packages
- A PostgreSQL 15+ database (Neon recommended for Vercel)
- Vercel account
1. Connect your repository
Section titled “1. Connect your repository”Link your GitHub repository to Vercel. If using the monorepo, set the root directory to your Next.js app folder.
2. Environment variables
Section titled “2. Environment variables”Set these in the Vercel dashboard:
| Variable | Required | Description |
|---|---|---|
DATABASE_URL | Yes | Postgres connection string |
NEXTAUTH_SECRET | Yes | NextAuth.js secret |
NEXTAUTH_URL | Yes | Your app URL |
RESEND_API_KEY | If using email | Resend API key |
STRIPE_SECRET_KEY | If using payments | Stripe secret key |
STRIPE_WEBHOOK_SECRET | If using payments | Stripe webhook signing secret |
INNGEST_EVENT_KEY | If using Inngest | Inngest event key |
GOOGLE_CLIENT_ID | If using calendar sync | Google OAuth client ID |
GOOGLE_CLIENT_SECRET | If using calendar sync | Google OAuth client secret |
3. Build settings
Section titled “3. Build settings”For a monorepo, configure the build command:
Build Command: turbo build --filter=your-appOutput Directory: .nextInstall Command: npm install4. Run migrations
Section titled “4. Run migrations”Migrations need to run against your production database. Add a build step or run manually:
# In CI or as a post-deploy scriptnpx drizzle-kit migrate --config=packages/db/drizzle.config.tsnpx tsx packages/db/src/migrate.ts5. Deploy
Section titled “5. Deploy”Push to your main branch or trigger a deployment from the Vercel dashboard.
Serverless considerations
Section titled “Serverless considerations”- Use a pooled connection string for the
DATABASE_URLto handle serverless connection limits - Set a direct connection URL (
DIRECT_URL) for migrations - The Booking Kit’s
SERIALIZABLEtransactions work correctly with connection pooling