Skip to content
v0

Your v0 App in Production: What Breaks After Launch (and the Fix Order)

Your v0, Cursor or Replit app works in the demo. Here is what breaks first with real users — secrets, auth, database rules, payments — and the fix order.

By Lynxwell Digital November 15, 2026 13 min read
Your v0 App in Production: What Breaks After Launch (and the Fix Order)

Your v0, Cursor or Replit app works in the demo and breaks in production — usually in the same five places: leaked secrets, missing auth checks, open database rules, test-mode payments, and deploys that ship straight to live users. The fix is not a rebuild. It is a short hardening pass, done in a specific order, secrets first, before real users and real data arrive.

This is the companion to our Lovable and Bolt production post — same failure pattern, different builders. Lovable and Bolt break one way; v0, Cursor and Replit each break in their own way, and the fix for each starts in a different place.

What breaks first in a v0 app

v0 builds a real Next.js app, which is why the demo feels finished. The breakage is in the parts the demo never exercises: who can call your server code, what your keys are visible to, and what happens when you press Publish.

Secrets end up in the browser. v0's own security documentation draws the line plainly: variables without the NEXT_PUBLIC_ prefix stay on the server, and anything with the prefix is exposed to the browser. The generated code regularly puts a key behind that prefix — an OpenAI key, a database URL, a Stripe key — because it is the fastest way to make the demo work. v0's own guidance is blunt: never expose sensitive tokens with the NEXT_PUBLIC_ prefix, and use different keys for development and production. If a key was ever in a NEXT_PUBLIC_ variable, assume it is public and rotate it. Deleting the variable does not un-publish the key.

API routes and server actions ship without an authorization check. A v0 route usually does the job it was asked for. What security reviewers keep finding is the step it skips: verifying that the caller is allowed to touch that specific record. One v0 security review puts it directly: a route that confirms a session exists but never confirms the session belongs to the resource owner is authenticated but not authorized. A visitor who can guess the request shape can call that route from their own browser. Every route that changes data needs a session check and an ownership check on the server — not just a hidden button in the UI.

Publish goes straight to production. Without GitHub connected, v0 deploys the current code directly to your Vercel project. With GitHub connected, Publish creates or reuses a pull request and merges it into your base branch, which triggers the production deploy — and branch protection still applies, so required checks and reviews can block the merge. That flow is documented in v0's deployment guide. If you never turned on branch protection, nothing stands between a broken prompt and your live app. Turn it on with at least one required review before the next publish.

The demo database has no rules. Tables the AI created to make a flow work often lack constraints, and server actions trust whatever the client sends. If your app uses Supabase, the fix is Row Level Security: with RLS enabled, no data is accessible through the API with the publishable key until you create policies, and the service-role key that bypasses RLS must never be used in the browser. Hiding a page does not protect the data behind it — a visitor can talk to the database directly with the public key already in your JavaScript.

Two things practitioners keep hitting. First, the white screen: a v0 app works in preview, the build log is clean, and the live site is blank with 500 errors. In one Vercel community thread, the cause was middleware matching too broadly and intercepting the app's own static files — the fix was limiting the middleware with a matcher. Second, v0's auto-diagnosis: users in Vercel's own community forum report it rewriting their code and creating new versions without being asked, including on apps working in production. If your published version is not the version you chose, check what auto-diagnosis changed before you publish again.

What breaks first in a Cursor app

Cursor is different from v0 and Replit in one important way: it is an editor, not a host. The code it writes lands in your repository, and the app runs wherever you deploy it — Vercel, a VPS, anywhere. So nothing about Cursor itself fails. The generated code carries the same gaps as a v0 app — routes without auth checks, keys in client code, no input validation — and there is no Publish button or preview URL standing between a bad change and production unless you built that gate yourself.

That makes Cursor's failure mode quieter. In v0 or Replit, the builder owns the deploy, so the breakage shows up in the builder's flow. In Cursor, it shows up in your deploy pipeline — or in the fact that you do not have one. Three things to check:

Version control is your only rollback. An agent asked to fix one bug can rewrite files that were fine, and without a commit before the change there is nothing to return to. Commit before every agent session, on a branch, and review the diff before merging. If the repo was never connected to GitHub, that is the first fix — not a feature, a safety net.

There is no staging unless you made one. The app on your laptop is not a test of production. A preview deployment per branch — Vercel does this automatically for GitHub-connected projects — catches the env-var and database mistakes before users do.

Secrets live in your repo history. A key pasted into a file or an agent chat and then committed stays readable in git history even after you delete it from the current code. Rotate it, then remove it from history.

What breaks first in a Replit app

Replit is the most complete of the three — Agent builds it, hosts it, and gives it a database — and that completeness is where it breaks. Everything lives in one place, under one account, with one environment.

Your secrets are one shared link away. A Repl on the free plan is public by default, so anyone with the link can read its files — including a forgotten .env, a backup, or a key the Agent wrote into the code. Replit's own deployment docs warn that development secrets and deployment secrets are separate stores: changing one does not update the other, and the published app only reads its deployment secrets. The classic Replit failure is an app that works in preview and breaks when published, because a key was set in development and never set for the deployment — or because the deployment still points at the test database.

There is no staging. A Replit deployment is a single always-on environment, so every change is tested on live users. There is nowhere safe to try a fix. The first step is simply knowing that the URL your customers use is also your test environment.

The database has no backup by default. The built-in database holds real data with no backup or migration plan, and a bad prompt can wipe it. In July 2025, Replit's agent deleted a live production database belonging to SaaStr founder Jason Lemkin, then told him the rollback could not recover the data — he tried anyway, and it worked. Replit has since added App History with 7 days of restorable snapshots, so a wipe like that is now recoverable. The harder problem — an AI writing to production unsupervised — is still yours to solve: the agent should never have write access to the production database in the first place.

The bill is the quiet breakage. Autoscale deployments charge a $2 monthly base fee plus $0.60 per million compute units and $0.40 per million requests, and scale to zero when idle — so a quiet app costs almost nothing. A Reserved VM, the always-on option, runs $15 to $130 a month depending on size. Both figures are from Replit's own deployment pricing, and both draw on the account owner's monthly credits first. The trap is the middle: an app busy enough to never scale to zero, on Autoscale, quietly costs more than the Reserved VM it should have been on — and the AI integrations the app calls bill the same account too.

v0 vs Cursor vs Replit: where each one breaks

v0CursorReplit
What it isAI builder + Vercel deployAI editor, you host itAI builder + host + database
First breakNEXT_PUBLIC_ secrets, routes without authNo deploy gate, no rollback without gitPublic Repl, dev vs deployment secrets
Database riskDemo tables, no RLSDepends on your stackNo backup by default, one environment
Deploy riskPublish goes straight to productionNo staging unless you built oneEvery change tests on live users
Cost surprisePaid API calls with no rate limitYour hosting bill, unchangedAutoscale vs Reserved VM mismatch

The table is the triage, not a ranking. No builder is the safe one — each hands you a different missing piece, and the missing piece is always the part the demo never needed.

The five checks before real users arrive

Run these in order. Each one takes minutes, and each one catches a failure that costs days once users are in.

1. Find every secret and rotate what leaked. Search the code for NEXT_PUBLIC_, hardcoded keys, and .env files committed to the repo. Anything that was ever visible in the browser or in a public Repl is public — rotate it, and give development and production different keys. v0's own security page says the same: rotate regularly, and never expose a sensitive token with the NEXT_PUBLIC_ prefix.

2. Put auth on every route that changes data, and rules on every table. Each API route and server action needs a session check and an ownership check on the server. Each Supabase table needs RLS enabled with a policy per operation — and the service-role key stays server-side. Test it logged out: a signed-out visitor in a private window should see nothing they should not.

3. Switch payments to live mode and make a real transaction. Test keys in production are the most common "it worked in the demo" failure. Run a real payment with a real card, refund it, and confirm the webhook arrived. If the app charges for anything through an AI API, add a per-user rate limit before the first real user — an unprotected route calling a paid API is a bill waiting to happen.

4. Separate preview from production. Give preview its own database and its own keys, turn on branch protection with at least one required review, and make Publish go through a pull request. A deploy that says success is not proof the app works: one analysis of 538 verified post-launch breakage reports found deploy and build problems the largest category, at 23% — green pipeline, broken production, usually a stale chunk, a missing variable, or a build cache that hid the difference.

5. Make rollback possible before you need it. The repo on GitHub is the source of truth, the database has a backup or a snapshot, and someone other than the AI knows how to restore both. Replit's 7-day App History counts here. So does a Vercel instant rollback — but remember that after a rollback, auto-assignment of the production domain is switched off, so new pushes stop replacing the rolled-back deploy until you switch it back on.

What we'd do

At Lynxwell Digital, when a founder brings us a v0, Cursor or Replit app that is live and breaking, we start with the same order every time: secrets first, then auth and database rules, then payments, then the deploy pipeline. We do not start by rewriting the app. Most of these apps are fine as products — the code works, the idea works, and the users are already there. What is missing is the layer between a demo and a product: the checks a real team adds before launch, done in a week instead of spread over a year of incidents.

What we tell clients is this: if your app already has users, do the five checks above this week, in that order, and do not ship a new feature until they pass. If you are not sure what your app is actually exposing — most founders are not, because the builder never showed them — get someone to look before your users do. That is what our Launch Safety Audit is for: a full check of the app as it stands, $390, free if we find nothing critical. You can book it at lynxwelldigital.com/lp/fix-ai-app.

If the audit finds more than a hardening pass can fix — a backend that needs rebuilding, or parts the builder got wrong that have to be redone properly — that is rescue work, and it is the other half of what we do alongside our AI engineering for founders shipping AI-built products.

If your app was built with Lovable or Bolt instead, the same five checks apply — our Lovable and Bolt production post walks through the breakage pattern for those two, and the production checklist is the longer version of the list above. The builder changes; the missing layer does not.

FAQ

Is a v0 app production-ready?

Not as generated. v0 builds a real Next.js app that compiles and deploys, but it does not add authorization to your API routes, keep secrets off the client, or set database rules by default. v0's own security page says to run its DeepSec check before you ship and to never expose sensitive tokens with the NEXT_PUBLIC_ prefix. Treat the generated app as a working draft and run the five checks in this post before real users arrive.

Can I keep my v0 app on Vercel or should I move it?

Keep it on Vercel. v0 is built for Vercel, and moving hosts does not fix any of the breakage in this post — the secrets, auth and database gaps travel with the code. Move only if you need something Vercel does not offer. Fix the app where it is first.

Why does my Replit app work in preview but not when published?

Almost always a configuration difference between the two environments. Replit's own deployment docs name it directly: development secrets and deployment secrets are separate stores, so a key set in development is not set for the deployment until you add it there and publish again. Check that every key exists in deployment secrets, that the database URL points at production, and that no localhost references survived.

What is the first thing to check before real users sign up?

Secrets. Search for NEXT_PUBLIC_ variables, hardcoded keys, and any .env file in the repo or the Repl, and rotate anything that was ever visible to a visitor. A leaked key is the one failure you cannot fix after the fact — the key stays valid until you rotate it, no matter what you delete.

How much does it cost to fix an AI-built app for production?

It depends on what is broken. Most apps need a hardening pass, not a rebuild: secrets, auth, database rules, payments, and the deploy pipeline, in that order. Our Launch Safety Audit is $390, free if we find nothing critical, and it tells you exactly what your app needs before you spend anything on the fix.

#v0#AI app rescue#production launch
All posts

Shipped fast, broke in production?

That is the job we do most. Send the repo and a senior engineer records a 20-minute teardown: what is broken, how bad it is, and what it would cost to fix. Free, and the findings are yours either way.

First call's free
5.0 · usually replies in ~2 hours
  • Real human replies in ~2 hours
  • Fixed price, agreed before you pay
  • No lock-in, you own everything
  • Free first call + honest audit