Skip to main content
The Next.js frontend (apps/web) deploys to Vercel. It auto-deploys on every push to main and creates preview URLs for pull requests.

Prerequisites

  • A Vercel account
  • The folksbase repository connected to Vercel
  • All external services configured (Supabase, Neon, etc.)

Step-by-Step Setup

1. Import the Repository

  1. Go to vercel.com/new
  2. Import your folksbase GitHub repository
  3. Vercel will auto-detect it as a monorepo

2. Configure the Project

Set the following in your Vercel project settings:
SettingValue
Framework PresetNext.js
Root Directoryapps/web
Build Commandpnpm build (Turborepo handles the rest)
Output Directory.next
Node.js Version24.x

3. Set Environment Variables

Add these in the Vercel dashboard under Settings → Environment Variables:
VariableExample Value
NEXT_PUBLIC_API_URLhttps://your-api.onrender.com/api
NEXT_PUBLIC_SUPABASE_URLhttps://your-project.supabase.co
NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEYYour Supabase anon key
These are NEXT_PUBLIC_ variables — they’re embedded in the client bundle at build time. Changing them requires a redeploy.

4. Deploy

Push to main or click “Deploy” in the Vercel dashboard. The first build takes a few minutes as it installs all monorepo dependencies.

Preview Deployments

Every pull request automatically gets a unique preview URL. This is where Playwright E2E tests run in CI — the PLAYWRIGHT_BASE_URL is set to the preview URL. Preview deployments use the same environment variables as production unless you configure environment-specific overrides in Vercel.

Monorepo Configuration

Vercel needs to know which app to build. The root directory setting (apps/web) tells Vercel to scope the build to the web app, but Turborepo’s dependency graph ensures shared packages (@folksbase/db, @folksbase/types) are built first. If you’re using Vercel’s monorepo support, make sure the Ignored Build Step is not filtering out changes to packages/ — those affect the web app too.

Rollback

If a deployment breaks production:
  1. Go to the Deployments tab in your Vercel project
  2. Find the last working deployment
  3. Click the three-dot menu → Promote to Production
This is instant — no rebuild required.

Custom Domain

  1. Go to Settings → Domains in your Vercel project
  2. Add your domain (e.g., folksbase.joselito.dev)
  3. Configure DNS as instructed by Vercel (CNAME or A record)
  4. SSL is provisioned automatically