Overview
Deploy aSaaSin on Vercel by importing your GitHub repository, syncing environment variables, and assigning a custom domain. Preview deployments are created for every PR.
Connect GitHub
- Sign in to Vercel using your GitHub account
- New Project → Import GitHub Repo and select your aSaaSin repository
- Vercel auto-detects Next.js and the build settings
Project settings
The defaults are correct for Next.js App Router. You don’t need a custom output folder or command.
pnpm requires one extra step: this repo pins its package manager via packageManager in package.json, but Vercel does not read that field by default — it picks a bundled pnpm version using its own heuristics (lockfile version plus your project's creation date), which can be an older major version than this repo needs and will fail the install. Add the environment variable ENABLE_EXPERIMENTAL_COREPACK with value 1 to all environments (Production, Preview, Development) in Vercel → Project → Settings → Environment Variables, then redeploy. This makes Vercel activate Corepack, which reads packageManager and installs the exact pinned pnpm version instead of guessing.
Node version: package.json's engines.node only pins the major version (e.g. 24.x), not an exact patch — Vercel manages Node patch versions itself and doesn't let you pin one exactly, so an exact-patch engines.node (like 24.20.x) will fail installs the moment Vercel's current patch falls outside that range. Set Vercel → Project → Settings → Node.js Version to the same major line as .nvmrc (e.g. 24.x) and leave engines.node at the major-only range in package.json to avoid this.
Environment variables
Update your local .env.local (already in the repo) and mirror the same keys in Vercel → Project → Settings → Environment Variables. Use separate values for Development, Preview, and Production if needed.
# General
NEXT_PUBLIC_APP_URL=http://localhost:3000
# Feature Flags
ENABLE_AUTH=false
ENABLE_SUPABASE=false
ENABLE_RESEND=false
ENABLE_OPENAI=false
ENABLE_POLAR=false
ENABLE_MAINTENANCE=false
# Google Analytics
NEXT_PUBLIC_GA_ID=
# Supabase
NEXT_PUBLIC_SUPABASE_URL=
NEXT_PUBLIC_SUPABASE_ANON_KEY=
SUPABASE_SERVICE_ROLE_KEY=
# Tina CMS
NEXT_PUBLIC_TINA_CLIENT_ID=
TINA_TOKEN=
TINA_SEARCH_TOKEN=
# Resend
RESEND_API_KEY=
RESEND_AUDIENCE_ID=
RESEND_NOTIFICATION_EMAIL=
# Polar
POLAR_API_KEY=
POLAR_WEBHOOK_SECRET=
POLAR_SUCCESS_URL=http://localhost:3000/success?checkout_id={CHECKOUT_ID}
POLAR_SERVER=sandbox
# OpenAI
OPENAI_API_KEY=Tip: Only variables prefixed with NEXT_PUBLIC_ are exposed to the browser. Keep SUPABASE_SERVICE_ROLE_KEY and other secrets unprefixed (server-only).
First deploy
Push to main (or open a PR). Vercel creates a build and deploy automatically. If needed, you can link and deploy from the CLI.
Custom domain
Add your domain in Vercel → Project → Domains and assign it to Production. Follow Vercel’s DNS instructions (CNAME for subdomains, A/AAAA records for apex). Set NEXT_PUBLIC_APP_URL=https://yourdomain.tld in Production env vars.
# Explanation: example records (your provider UI will differ).
# Apex (root) domain:
A @ 76.76.21.21
# or use Vercel’s recommended ANAME/ALIAS if your DNS supports it
# Subdomain:
CNAME www cname.vercel-dns.comTips
- Use Preview env vars for PR deployments (e.g., sandbox API keys)
- Keep secrets unprefixed and avoid logging them in server code
- If you use Tina media, ensure
images.remotePatternsincludesassets.tina.io - If you load images from Supabase Storage, whitelist your project host (see Deployment → Overview)