Deploy to Vercel
One-command deployment to the platform Next.js was made for.
Vercel is the fastest way to deploy ContentAI. A fresh deploy takes under two minutes and fits comfortably in the free tier for most users.
Option 1 — Vercel CLI
1. Install the CLI
pnpm add -g vercel2. Log in
vercel login3. Deploy
From the project root:
vercelThe CLI walks you through linking the project. For subsequent deploys:
vercel --prodOption 2 — Vercel Dashboard (git-based)
1. Push to a Git provider
git init
git add .
git commit -m "Initial ContentAI setup"
git remote add origin git@github.com:<you>/ai-content-generator.git
git push -u origin main2. Import on Vercel
- Go to vercel.com/new
- Import the repository
- Accept defaults — Vercel detects Next.js automatically
- Click Deploy
Environment variables
ContentAI does not require any environment variables by default — API keys are entered by users in Settings and stored in their browsers.
Optional environment variables if you want server-side fallback keys (for shared-key deployments):
| Variable | Purpose |
|---|---|
GROQ_API_KEY | Fallback Groq key when user hasn't set one |
GOOGLE_GENERATIVE_AI_API_KEY | Fallback Google key |
OPENAI_API_KEY | Fallback OpenAI key |
ANTHROPIC_API_KEY | Fallback Anthropic key |
Set these in Project Settings → Environment Variables.
Don't ship shared keys without auth
If you set a fallback API key, anyone on the internet who can reach your
/api/generate endpoint can use it — for free, at your cost. Add auth and
rate limiting first (see Security).
Custom domain
After the first deploy:
- Vercel Dashboard → your project → Settings → Domains
- Add your domain and follow DNS instructions
- HTTPS is provisioned automatically
Preview deployments
Every branch push gets a unique preview URL. Share it with teammates to test template changes or new providers before merging.
Monitoring
Enable Vercel Analytics and Speed Insights in the project settings — both have free tiers that cover most ContentAI deployments.
Build configuration
Vercel auto-detects Next.js. The default settings work out of the box:
- Framework Preset: Next.js
- Build Command:
next build(orpnpm build) - Output Directory:
.next - Install Command:
pnpm install
If you use a monorepo, set the Root Directory to the folder containing ai-content-generator.
Common deploy errors
"Module not found" in build
Make sure pnpm-lock.yaml is committed. Vercel uses it to reproduce dependencies exactly.
"Cannot find name 'LayoutProps'"
This is a Next.js 16 typegen artifact. Add this to your next.config.mjs:
const config = {
reactStrictMode: true,
typedRoutes: true,
};Or disable strict route types in tsconfig.json.
Build times out
Upgrade to Vercel Pro, or check for infinite loops in server code. ContentAI's build typically finishes in under 60 seconds.
Next: Deploy to Netlify →