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.
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
NEXT_PUBLIC_MAINTENANCE_MODE=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}
# 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.com
Tips
- 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.remotePatterns
includesassets.tina.io
- If you load images from Supabase Storage, whitelist your project host (see Deployment → Overview)