Qentrah
Projects
On this page
Guides

Vercel Deployment

View as Markdown

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

SettingValue
Framework PresetNext.js
Root Directoryapps/portal
Install Commandcd ../.. && npm install --legacy-peer-deps
Build Commandcd ../.. && npm --workspace @zaneai/portal run build
Output Directory.next

Required Vercel environment variable:

  • NEXT_PUBLIC_CONVEX_URL=https://<deployment>.convex.cloud

Web Project

SettingValue
Framework PresetNext.js
Root Directoryapps/web
Install Commandcd ../.. && npm install --legacy-peer-deps
Build Commandcd ../.. && npm --workspace web run build
Output Directory.next

Required Vercel environment variables:

  • NEXT_PUBLIC_CONVEX_URL=https://<deployment>.convex.cloud
  • NEXT_PUBLIC_AUTH_URL=https://<deployment>.convex.site or NEXT_PUBLIC_CONVEX_SITE_URL=https://<deployment>.convex.site
  • UPLOADTHING_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.com
  • NEXT_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, or WEB_URL to the production web origin so Better Auth trusts the deployed web app.
  • Set BETTER_AUTH_URL or CONVEX_SITE_URL to the Convex site auth base URL.
  • Set backend-only UploadThing and PostHog values, such as UPLOADTHING_API_KEY, NEXT_PUBLIC_POSTHOG_PROJECT_TOKEN, and NEXT_PUBLIC_POSTHOG_HOST, in Convex when backend functions need them.

© 2026 ZaneAI. All rights reserved.

Source captured: 2026-10-11