Vercel Deployment
Deploy apps/portal and apps/web as two separate Vercel projects from the same repository. Keep Vercel's "Include source files outside of the Root Directory in the Build Step" setting enabled so each app can import shared workspace packages from packages/.
Portal Project
| Setting | Value |
|---|---|
| Framework Preset | Next.js |
| Root Directory | apps/portal |
| Install Command | cd ../.. && npm install --legacy-peer-deps |
| Build Command | cd ../.. && npm --workspace @zaneai/portal run build |
| Output Directory | .next |
Required Vercel environment variable:
NEXT_PUBLIC_CONVEX_URL=https://<deployment>.convex.cloud
Web Project
| Setting | Value |
|---|---|
| Framework Preset | Next.js |
| Root Directory | apps/web |
| Install Command | cd ../.. && npm install --legacy-peer-deps |
| Build Command | cd ../.. && npm --workspace web run build |
| Output Directory | .next |
Required Vercel environment variables:
NEXT_PUBLIC_CONVEX_URL=https://<deployment>.convex.cloudNEXT_PUBLIC_AUTH_URL=https://<deployment>.convex.siteorNEXT_PUBLIC_CONVEX_SITE_URL=https://<deployment>.convex.siteUPLOADTHING_TOKEN=<your-uploadthing-token>
Optional Vercel environment variables:
NEXT_PUBLIC_POSTHOG_PROJECT_TOKEN=<your-posthog-project-token>NEXT_PUBLIC_POSTHOG_HOST=https://us.i.posthog.comNEXT_PUBLIC_MOCK_DATA_ENABLED=false
Convex Deployment Environment
Convex deploys separately from Vercel, so set backend runtime values in the Convex deployment environment rather than in Vercel.
- Set
SITE_URL,ZANEAI_WEB_URL, orWEB_URLto the production web origin so Better Auth trusts the deployed web app. - Set
BETTER_AUTH_URLorCONVEX_SITE_URLto the Convex site auth base URL. - Set backend-only UploadThing and PostHog values, such as
UPLOADTHING_API_KEY,NEXT_PUBLIC_POSTHOG_PROJECT_TOKEN, andNEXT_PUBLIC_POSTHOG_HOST, in Convex when backend functions need them.
© 2026 ZaneAI. All rights reserved.
Source captured: 2026-10-11