ContentAIDOCS
Deployment

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 vercel

2. Log in

vercel login

3. Deploy

From the project root:

vercel

The CLI walks you through linking the project. For subsequent deploys:

vercel --prod

Option 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 main

2. Import on Vercel

  1. Go to vercel.com/new
  2. Import the repository
  3. Accept defaults — Vercel detects Next.js automatically
  4. 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):

VariablePurpose
GROQ_API_KEYFallback Groq key when user hasn't set one
GOOGLE_GENERATIVE_AI_API_KEYFallback Google key
OPENAI_API_KEYFallback OpenAI key
ANTHROPIC_API_KEYFallback 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:

  1. Vercel Dashboard → your project → Settings → Domains
  2. Add your domain and follow DNS instructions
  3. 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 (or pnpm 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 →

On this page