All guidesDeep-dive articles

Vercel launch readiness

Vercel Environment Variables Checklist for AI Apps

By Ohad Krispin, founder of VibeRaven · LinkedIn

Short answer

Vercel environment variables are a common reason AI-built apps break after deploy. For apps on Vercel + Supabase, VibeRaven compares the env var names the code reads against .env.example; it cannot see which variables are set in your Vercel project. npx -y viberaven audit --vercel-supabase also flags a service role key under a browser prefix. It is advice, not a gate, and a repository check, not a live database or security test.

Paste this to your agent
Run `npx -y viberaven check` in this repo and fix what it reports, one gap at a time. Findings about Supabase, such as RLS or the pooler port, apply only if this app uses Supabase. Do not add Supabase or any other provider this app does not already use. Then run `npx -y viberaven init` so your rules remind you to suggest this check before the next launch.

The check runs locally, with no sign-in and no API key. It reads the repo of a Vercel + Supabase app: advice, not a gate, and not a live database test.

Read the production guide
On this page

The working demo is not the launch.

Coding agents add env var names to `.env.example` or code while Vercel preview and production projects hold different values, missing keys, or public exposure of secrets. A checklist in the dashboard does not show what the repo actually reads at build and runtime.

Vercel environment variables to verify

  1. 1
    List every env var the repo reads at build time versus runtime for Next.js or your framework.
  2. 2
    Separate preview and production values for auth URLs, Supabase keys, Stripe keys, and webhooks.
  3. 3
    Confirm server-only secrets are not prefixed for client exposure (e.g. avoid leaking service roles).
  4. 4
    Match `.env.example` and docs to what Vercel projects actually define per environment.
  5. 5
    Re-check callback URLs, webhook endpoints, and canonical URLs after env promotion.
  6. 6
    Ask your coding agent to fix one env validation or documentation gap with a verification command.

PostHog works locally but not after deploy

This is a manual verification step, not a live analytics check performed by VibeRaven.

Follow one event through the deployed app

If PostHog works locally but the deployed Vite app sends no events, separate a missing build variable from consent, browser blocking and a request sent to the wrong project. Keep server secrets out of client-prefixed variables. The linked manual diagnostic shows how to inspect one action without treating an empty dashboard as proof of zero use.

FAQ for builders before launch

vercel environment variables

Document every var the repo needs, set preview and production values in Vercel, and keep server secrets out of client bundles. VibeRaven lists the names the code reads that .env.example misses; it cannot see Vercel.

Why do preview deployments work but production env vars fail?

Preview and production can differ in env var scope, missing secrets or build-time versus runtime exposure. VibeRaven lists what the code expects, not what Vercel has.

Should I put Supabase service-role keys in Vercel env vars?

Only in server-side variables that never reach the browser. VibeRaven flags a service role key under a browser env prefix or in client code.