You built an app in a weekend. You described it to an AI coding tool, and it gave you a working product: a login page, a booking form, a dashboard that looks like a real company made it. Your friends tried it. It works.
Then real users arrive, and the app starts breaking in ways that make no sense. The breakage was already in the code. You just couldn't see it yet.
This isn't a knock on vibe coding. It's the best thing to happen to people who want to build software without a computer science degree. But the tools are very good at one thing, the first draft, and systematically bad at another: the last 30%.
The 70% app
Researchers at Columbia University's DAPLab found that vibe coding typically gets you about 70% of the way to a working application. The first draft looks polished. But as features get added and real users interact with it, things start breaking.
It's not just one lab saying it. CodeRabbit's December 2025 analysis of 470 open-source pull requests found AI-generated code produced 1.7x more issues than human-written code, with the gaps widest where production hurts most: logic and correctness errors 1.75x higher, security vulnerabilities up to 2.74x higher for XSS, and performance inefficiencies nearly 8x more frequent. Veracode's 2025 GenAI Code Security Report found 45% of AI-generated code introduces security vulnerabilities, and that language models failed to defend against cross-site scripting in 86% of cases and log injection in 88%.
The AI is very good at the first 70% and systematically bad at the last 30%. Here is what that last 30% actually looks like: the eight ways vibe-coded apps fail in production.
1. Auth — the door with no lock
This is the one that costs you the business. The login page works: you type a password, you get in, everything looks right. But behind it, the API routes, the actual doors to your data, often have no checks at all. Anyone who guesses an endpoint's address can call it directly and read or change data.
Sneakier still: every logged-in user can see every other user's data. The app checks that you are logged in, but never whose data you are asking for. Change one number in a web address, user 12 to user 13, and you are looking at someone else's bookings.
The AI isn't being careless. It optimizes for a demo that works. The login page is visible. The missing check is invisible. So is the damage, until someone finds it.
2. Secrets in the open
A secret is a password, an API key, or a token that proves your app may use a service: payments, email, AI. Your app needs secrets, and the AI has to put them somewhere. It usually picks the worst place: written directly into the code, or into the frontend — the part running in the user's browser, where anyone can read it with developer tools.
A key in the frontend is not a secret. It is a public announcement. Anyone who opens your site can copy it and use your paid services. And a key committed to a code repository stays in the history even after you delete it. Snyk's research found nearly 80% of developers admitted to this kind of exposure. With AI-generated code, it is the default. The AI does not know what a secret is unless you tell it.
3. Errors you never see
There are two kinds of errors: loud ones and silent ones. Loud ones are fine. The app crashes, you notice, you fix it. Silent ones are the killer. The code runs with no visible error, but the thing the user asked for did not happen. The booking was never saved. The payment never went through. The user sees a success screen, and nothing happened.
DAPLab calls error handling the most serious and most common failure mode in vibe-coded apps. Makes sense: you can't see these failures happening. AI-generated code routinely skips it entirely: it writes the happy path — where everything works — and never writes what to do when something doesn't.
4. The database time bomb
Your database is a filing cabinet. Without an index, finding one record means opening every drawer and reading every file. With a thousand records, that takes a blink. With a million, seconds — and every user waits.
AI-generated schemas almost never include indexes. The app works beautifully with test data, because test data is small. Then real users arrive, tables grow, and pages that loaded instantly take ten seconds, or time out. A related trap is the N+1 query: the app fetches 100 items, then runs a separate query for each one's details. One page load becomes 101 queries. It works with 10 items. It dies with 1,000.
5. Works on my machine
Your app works on your laptop because it has everything it needs: settings, secrets, versions. Production, the server real users hit, is a different machine, and the AI never set it up the same way. The usual breakage: environment variables on your laptop that were never set on the server. The app starts, looks for a database password that isn't there, and crashes. Or worse, connects to the wrong database.
The fix is boring, and it works. One list of every setting, set identically in every environment. Plus a staging environment: a copy of production where you deploy first and find the breakage before your users do.
6. Nothing to catch the next break
Zero test coverage is the norm in vibe-coded apps. It's why every new feature breaks two old ones. The AI writes new code by rewriting the files you give it. It doesn't remember the unusual cases. It doesn't know the invoice page depends on a helper function it just changed. Nothing says "stop, you broke something." So the breakage ships, and a user finds it.
You don't need a test suite a professional team would be proud of. Just a few tests for the few actions that matter: smoke tests. A smoke test is a simple automated check — "can a user still log in, book, and pay?" — that runs every time the code changes.
7. No bouncer at the door
Rate limiting is a bouncer: it decides how many times someone can knock on your door in a minute. Without one, anyone can call your login page ten thousand times a minute: a bot, an attacker, a bug in someone else's code. Or hammer your signup form, creating thousands of fake accounts. Or call your most expensive feature in a loop, running up a bill you pay.
AI-generated code almost never includes rate limiting. A demo never gets attacked. Production does, sometimes within hours.
The four walls of scale
Scale is not one number. It is four walls, hit in a predictable order: traffic (many users at once), data (tables fine at a thousand rows, slow at a million), change rate (every new feature breaks two old ones), and team (nobody can inherit 15,000 lines nobody has read).
Most vibe-coded apps die at wall two or three, not wall one. The traffic wall looks dramatic but is the easiest to buy your way out of. The data and change-rate walls quietly make the app unmaintainable.
Before you fix anything: get the information first
Almost every mistake above has the same root cause: someone decided before they knew the facts. One person builds a distributed system for 100 users. Another ships a prototype to 100,000. Both skipped the same step: finding out the actual situation before choosing.
Before you change anything, fill in five numbers: how many users you have now, how many you expect in 3 months, roughly how many requests a day, when everyone is on at once, and how much data you have and how fast it is growing. Plus two questions: what is the single most important thing a user does in your app, and what breaks if the app is down for an hour?
With those answers, you know which parts of this list apply to you. Without them, you're guessing. And guessing is how you pay for infrastructure you don't need while the real problem sits unguarded.
The fix isn't a rewrite
None of this requires rebuilding your app. It requires knowing the problem exists, and fixing the dangerous two first: auth and secrets. Everything else follows in order.
I wrote a free guide that walks through all eight failure modes in plain language: each one with a copy-paste prompt for your coding agent, a step to verify the agent actually fixed it, a checklist, and a glossary that defines every term. It's called From Prototype to Production — The Vibe Coder's Survival Guide, and it's free.
Get it here: https://gameboxinc.gumroad.com/l/palkdo
Sources
- Vibe coding failure modes and the 70% figure (Columbia DAPLab): https://dev.to/modallxjake/vibe-coding-problems-why-your-app-breaks-in-production-2026-3k6f
- AI-generated code issues (CodeRabbit, 470 pull requests): https://wolf-tech.io/blog/why-your-vibe-coded-saas-will-break-in-production
- The four walls of scale and what breaks first: https://www.codesprintconsulting.com/blog/can-vibe-coded-apps-scale
- Common mistakes in vibe-coded apps: https://www.questera.ai/blogs/10-costly-mistakes-in-vibe-coding-and-no-code-app-development
- Enrichlead and the client-side security failure: https://www.studiofledge.com/insights/vibecoding-agentic-engineering-what-could-possibly-go-wrong
Top comments (3)
Point 3 has a search-engine cousin that vibe-coded sites hit often: the catch-all route. Most single-page app templates serve
index.htmlfor any path, so a URL that doesn't exist answers 200 with an empty shell instead of a 404. Users see a blank page, crawlers see thousands of "valid" thin pages, and nobody gets an error. One-line check: request/this-page-does-not-existand look at the status code.Good catch, and it belongs to the same family as point 3: nothing errors, so nobody notices. The SPA fallback does its job for real routes and quietly lies about the fake ones. A 200 with an empty shell reads to Google as a real page, and you end up with hundreds of thin pages that all look valid.
Your one-line check is the right first move: request a nonsense URL and look at the status. If it returns 200, the fix is to make unknown routes return a real 404, either with a server rule that only falls back for real app routes or with a proper not-found page backed by a real status code if you are prerendering.
Thanks for adding this. It is going on the list for the deployment guide.
yeah the smoke tests in point 6 are the right idea, but if they only log in as one user and complete a booking, they will never catch the IDOR in point 1. I'd add a second user in the same suite and assert that B cannot read A's booking, including through any guessed id. the happy path can stay green while that stays broken.