New:New releases:CLIcreate-clubedge-app v0.49.1·Clubedge Starter v0.32.0

Clubedge Starter Docs

Vercel

Deploy the app to Vercel from apps/web, with check:env and migrations in the build.

apps/web/vercel.json deploys the app to Vercel. Vercel only runs the app: the database, Redis, file storage, and email come from your providers (for example Neon or Supabase, Upstash, and Cloudflare R2).

A project with a frontend and its API can't use this option yet: it deploys on any container host or Railway. Nor can a project without a website, whose API deploys on any container host or Railway: the CLI refuses this option for it.

pnpm clubedge deploy does these steps for you: the project, its Root Directory, the variables, and the deploy.

What vercel.json sets

The build command: pnpm run check:env && pnpm --dir ../.. db:migrate && pnpm run build.

  • check:env (Starter v0.18.0 or newer) stops the build when a variable the project's modules need is unset, points at localhost, or isn't an absolute URL, and lists each one. SKIP_ENV_CHECK=1 builds anyway.
  • Migrations: Vercel has no step that runs before a release, so the build applies them against the DATABASE_URL of the deployment's environment. Give Preview deployments their own database, or remove the migration step and run migrations yourself.
  • The build: with Next.js, Vercel builds the app; with TanStack Start, the build detects Vercel and writes Vercel's Build Output, with server routes as functions.

Deploy by hand

Import the repository in Vercel, set the project's Root Directory to apps/web, and add the production variables for every environment you deploy (Production and Preview). Vercel installs the whole pnpm workspace and builds the app. Set NEXT_PUBLIC_APP_URL to the project's URL before the first build, since Next.js compiles it in.

Also set CLIENT_IP_HEADER=x-real-ip in the project's settings, where Vercel puts each client's address (Starter v0.27.0 or newer). Vercel takes runtime variables only from the project's settings, not from vercel.json.

Serverless functions open a connection per instance: use your provider's pooled connection URL (Supabase's transaction pooler or Neon's pooled endpoint).

Background jobs

Vercel runs no worker for background jobs. Set CRON_SECRET and add a cron to vercel.json; Vercel Cron sends the secret itself:

apps/web/vercel.json
{
  "crons": [{ "path": "/api/jobs/run", "schedule": "* * * * *" }]
}

Cron jobs more frequent than daily need a paid Vercel plan; otherwise call the endpoint from another scheduler.

The deploy workflow

The Deploy job pulls the project's production settings, builds in GitHub Actions (including the migrations in the build command), and uploads the result with vercel deploy --prebuilt --prod. It needs the secrets VERCEL_TOKEN, from your account settings, and VERCEL_ORG_ID and VERCEL_PROJECT_ID, which vercel link writes to .vercel/project.json.

How is this guide?