To production
AI wrote it fast. Making it safe to run is the real project
Reviewed September 2026
01
What “vibe-coded” means, and why it’s fragile in production
Vibe coding is building by describing what you want to an AI and shipping what it gives back, without reading much of the code. It’s a genuinely fast way to get to a working prototype, and for validating an idea it’s hard to beat. The fragility shows up later, when the same app has to survive real users rather than a demo.
The core issue is that AI-generated code is confident, not correct. It compiles, it runs, and it looks like something a careful engineer wrote — which is exactly why the gaps hide. Auth that trusts the client, data access with no real permission checks, secrets committed into the repo, inputs that aren’t validated: none of these announce themselves when you click around. They announce themselves when someone hostile, or just unlucky, finds them in production.
Vibe-coded code isn’t bad code — it’s unreviewed code that looks reviewed. The work isn’t rewriting it; it’s checking the parts that fail silently before they fail in public.
02
The review — what to audit first
Before adding anything, you audit what’s there, and you do it in order of what can actually hurt you. The pattern across AI-generated apps is consistent enough to make a checklist from: the failures cluster in access control, secrets and untrusted input. The documented incidents bear this out — a Lovable-built app was reported to expose roughly 18,700 user records through missing row-level security, and Guardio’s VibeScamming benchmark scored one popular builder 1.8 out of 10 for resisting misuse. Different tools, same lesson: the security layer was generated too, and nobody checked it.
Start at the top of this list and you close the highest-severity risks first.
- Auth + permissions. Do the access rules actually gate data per-user, or does the app trust whatever the client sends? This is the number-one leak.
- Secrets in the repo. Hunt for API keys, database URLs and service credentials committed into the code or shipped to the browser.
- Input validation / injection. Check that user input is validated and queries are parameterised — generated code often skips both.
- Data exposure. Confirm endpoints and row-level security don’t return more than the current user is allowed to see.
03
Hardening — tests, CI, error handling, monitoring
Once the security holes are closed, hardening is what stops the app from quietly regressing. A vibe-coded app almost never has tests or a deployment pipeline, so every change is a manual push you hope didn’t break anything. Adding tests around the flows that would hurt to lose — auth, payments, the core data writes — plus a CI pipeline that runs them, converts hope into a signal you can trust.
The operational layer matters just as much. Real error handling (so failures degrade gracefully instead of white-screening), plus error tracking and basic uptime and performance monitoring, means you find out about problems before your users do. None of this is glamorous, and all of it is the difference between an app you can run and an app you’re constantly firefighting.
- Tests + CI. Cover the critical paths and block a broken deploy automatically.
- Error handling. Fail gracefully; don’t leak stack traces or crash the whole page.
- Monitoring. Error tracking plus uptime and performance alerts, from day one in production.
04
Restructuring — when the generated shape fights you
Some vibe-coded apps just need a review and a hardening pass. Others carry a deeper problem: the structure grew one prompt at a time, so the data model and the code organisation reflect the order features were requested rather than any design. That’s survivable for a while and then it isn’t — every new feature touches everything, and small changes break distant things.
Restructuring is the judgement call. Sometimes it’s a targeted refactor of the worst area; sometimes the data model needs redesigning underneath the app; occasionally the fastest safe path is rebuilding a module cleanly and keeping the rest. The signal that you’ve crossed from “harden” into “restructure” is when you can no longer make a change confidently in an afternoon — when the app has become the thing slowing you down.
Harden when the app is sound but unreviewed. Restructure when its shape — grown prompt by prompt — is what’s now costing you time on every change.
05
When to bring someone in — or have it rebuilt
Vibe coding gets you to a working prototype; getting to production is an engineering job, and it’s usually the point to bring in someone who does this for a living. The tell is simple: the moment the app has real users, real data, or real money moving through it, the cost of an unreviewed bug stops being an inconvenience and starts being a liability.
That doesn’t mean throwing away what you built — the prototype proved the idea and captured the product knowledge, both of which are valuable. It means having the security and data handling reviewed, the critical paths tested, and the structural risks addressed by someone who will own the result. A migration review turns that into a prioritised, costed plan: what to fix, in what order, and whether to harden or rebuild each piece.
A production-readiness checklist for an AI-generated app
AI generation reliably produces the app and reliably skips the things that keep it safe. Held against a real production bar, here’s what a vibe-coded app almost always still needs. Security: a per-user access-control audit, secrets pulled out of the code, input validation and injection checks. Data: correct row-level permissions and a data model that won’t collapse under growth. Reliability: tests on the critical paths, a CI pipeline, real error handling. Operations: error tracking and uptime/performance monitoring. The app you have is the first 60% that’s fun to build; this checklist is the last 40% that decides whether it survives contact with real users.
- Security audit
- Needed
- Tests / CI
- Usually none
- Monitoring
- Usually none
- Product proven
- Yes
Sources: [1]
FAQ
Questions people actually ask.
- What does “vibe coding to production” mean?
- It means taking an app you built by prompting an AI — without closely reading the code — and making it safe to run for real users. That’s a review-and-restructure project: audit the security and data handling, add tests and CI, harden the operational layer, and fix the structural issues that came from building prompt by prompt.
- Is AI-generated code secure?
- Not by default. It commonly ships with the security layer generated but unchecked — a Lovable app was reported to expose ~18,700 records via missing row-level security, and one builder scored 1.8/10 on Guardio’s VibeScamming test. The code can be made secure, but it needs a human audit of access control, secrets and input handling first.
- How do I clean up AI-generated code?
- In order of risk: audit auth, permissions, secrets and input validation first; then add tests around the critical paths and a CI pipeline; then add error handling and monitoring; and finally restructure the areas whose prompt-by-prompt shape now slows every change. A review turns that into a prioritised plan rather than a guess.
- Can a vibe-coded MVP scale?
- Sometimes as-is, often not without work. The prototype proves the idea, but the data model and structure usually grew ad hoc, and generated queries aren’t written to scale. It can scale once it’s reviewed, tested and — where needed — restructured; the point to invest is when real users and data arrive.
Sources
Every claim, traced to a primary source.
The numbered references in the body link here. We cite vendor docs, pricing pages, changelogs and named reporting — dated where the document is dated, so the page can be re-audited each quarter.
- [01]AI-built app exposed ~18,700 user records (missing row-level security)
The Register · 2026-02-27theregister.com
- [02]AI builder scored most vulnerable to VibeScamming (1.8/10)
The Hacker News · 2025-04-09thehackernews.com
Ready to make it production-grade?
We’ll map the route to code you actually own.
Book a call with Jackson, our Growth Partner — he’ll walk your export or app, the gaps that matter, and a fixed-price plan to get it production-ready, live on your screen. Or get an instant estimate first.
Or see fixed-price migration packages and how we work.