Deploy to Vercel

Learn how to deploy your application to Vercel.

Since we're using Turborepo with multiple applications, each application is deployed separately:

  • Marketingyour-domain.com
  • Dashboardapp.your-domain.com
Make sure you have your keys and secrets ready from the previous steps.

Deploy Marketing

Import the repository

Go to Vercel, click Add New...Project.

Select your repository and click Import.

Configure the project

  • Project Name: your-project-marketing
  • Application Preset: Next.js
  • Root Directory: apps/marketing
  • Build Command (override): cd ../.. && pnpm build --filter marketing

Set environment variables

Add the following:

NEXT_PUBLIC_APP_ENV=production
NEXT_PUBLIC_MARKETING_URL=https://your-domain.com

Deploy and set up the domain

Click Deploy. Once complete, go to SettingsDomains and add your-domain.com.

Follow the instructions to add DNS records to your domain registrar.

Every push to the main branch triggers an automatic deployment on Vercel.

Deploy Dashboard

Import the repository

Go to Vercel, click Add New...Project.

Select your repository and click Import.

Configure the project

  • Project Name: your-project-dashboard
  • Application Preset: Next.js
  • Root Directory: apps/dashboard
  • Build Command (override): cd ../.. && pnpm build --filter dashboard

Set environment variables

Add the following:

NEXT_PUBLIC_APP_ENV=production
NEXT_PUBLIC_DASHBOARD_URL=https://app.your-domain.com

DATABASE_URL=your-connection-string

BETTER_AUTH_URL=https://app.your-domain.com
BETTER_AUTH_SECRET=your-secret
GOOGLE_CLIENT_ID=your-google-client-id
GOOGLE_CLIENT_SECRET=your-google-client-secret
GITHUB_CLIENT_ID=your-github-client-id
GITHUB_CLIENT_SECRET=your-github-client-secret

STRIPE_PUBLISHABLE_KEY=your-publishable-key
STRIPE_SECRET_KEY=your-secret-key
STRIPE_WEBHOOK_SECRET=your-webhook-signing-secret

RESEND_API_KEY=your-resend-api-key
RESEND_FROM_EMAIL=notifications@your-domain.com

Deploy and set up the domain

Click Deploy. Once complete, go to SettingsDomains and add app.your-domain.com.

Follow the instructions to add DNS records to your domain registrar.

Every push to the main branch triggers an automatic deployment on Vercel.