Vercel
Learn how to deploy on Vercel.
We create and deploy two apps. Both will be able to link between each other. For trying things out you don't need to buy a domain or set up a subdomain.
Marketing
Connect your repository
Link your GitHub, GitLab or Bitbucket repository to Vercel.
Configure project settings
In the Vercel dashboard:

- Framework Preset: Next.js
- Root Directory: apps/marketing
- Build Command: pnpm turbo build --filter=marketing
- Output directory: Default
- Install Command: pnpm install
- Environment Variables:
NEXT_PUBLIC_DASHBOARD_URL=http://localhost:3000NEXT_PUBLIC_MARKETING_URL=http://localhost:3001
Note you can copy-paste the environment file contents instead of manually adding each one.
Good to know: Make sure to fill out the environment variables even with wrong URLs. We will change the routes on a second deploy.
Critical: The following variables are required for successful build:
- NEXT_PUBLIC_DASHBOARD_URL
- NEXT_PUBLIC_MARKETING_URL
Deploy
Click "Deploy" in the Vercel dashboard. Vercel will:
- Install dependencies
- Build the project
- Deploy to the Vercel Network
Dashboard
The dashboard is a bit more difficult to deploy because we have more environment variables to set.
Connect your repository
Link your GitHub, GitLab or Bitbucket repository to Vercel.
Configure project settings
In the Vercel dashboard:

- Framework Preset: Next.js
- Root Directory: apps/dashboard
- Build Command: pnpm turbo build --filter=dashboard
- Output directory: Default
- Install Command: pnpm install
- Environment Variables: ...
Note you can copy-paste the environment file contents instead of manually adding each one.
Good to know: Make sure to fill out the environment variables even with wrong URLs. We will change the routes on a second deploy.
Deploy
Click "Deploy" in the Vercel dashboard. Vercel will:
- Install dependencies
- Build the project
- Deploy to the Vercel Network
Routes adjustment
After both applications are deployed:
- Go to the Settings > Environment Variables section for each project.
- Update the
NEXT_PUBLIC_DASHBOARD_URL
andNEXT_PUBLIC_MARKETING_URL
with the actual Vercel deployment URLs. - Trigger a redeployment of both applications.

- Update the URLs in your Google or Microsoft OAuth callback settings.
Troubleshooting
Common issues and solutions:
- Build Failures: Ensure all required environment variables are set correctly.
- OAuth Errors: Double-check callback URLs in provider dashboards.
- Database Connection Issues: Verify the database URL and if the db/schema is deployed.