Your AI-Built Prototype Works. Is It Ready for Real Users?
Built your app with Lovable, Bolt or Cursor? What AI-generated code usually gets wrong, the ten checks before launch, and when to rebuild instead of fix.
On this page · 5 sections
Key takeaways
- AI app builders produce convincing prototypes fast, but in independent tests about 45% of AI-generated code contained security flaws.
- The gaps are predictable: database access rules, exposed keys, trusted client input, payments and backups.
- Fix the prototype when its data model is sound; rebuild the core and keep the interface when it is not.
AI app builders changed what a founder can do alone. With Lovable, Bolt, Replit or Cursor, you can go from an idea to a working product in a weekend, click through it, show it to customers and even charge them. That is a real advantage, and you should use it.
The problem is the step after. A prototype that works in a demo and a product that holds real users’ data are different things, and the difference is mostly invisible until something goes wrong. This post covers what AI-generated code tends to get wrong, the ten checks to run before launch, and how to decide between fixing and rebuilding.
How safe is AI-generated code?
Less safe than it looks. In Veracode’s 2025 study of more than 100 language models on 80 coding tasks, AI-generated code introduced security vulnerabilities in 45% of cases. The models failed to protect against cross-site scripting in 86% of relevant tasks and against log injection in 88%. A follow-up in March 2026 found the security pass rate still stuck at about 55% (Veracode).
The failures are not theoretical. In 2025, a researcher disclosed CVE-2025-48757: projects generated with Lovable on or before April 15, 2025 could ship with missing or insufficient database access rules, letting unauthenticated users read personal data, API keys and payment records straight from the browser.
None of this means AI tools are bad. It means they optimize for “it works when I click it”, and security is mostly about what happens when someone clicks things you did not intend.
What usually breaks first?
The same five gaps show up in almost every AI-built app, because they are invisible in a demo:
- Database access rules. Apps built on Supabase or Firebase talk to the database directly from the browser. Without row-level security or strict rules, any logged-in user, sometimes any visitor, can read or change every row.
- Secrets in the frontend. API keys for paid services or admin access end up in the JavaScript bundle, where anyone can copy them.
- Trusting the client. Prices, roles and permissions decided in the browser can be edited in the browser. A user becomes an admin by changing one field.
- Payments without verification. The app marks an order as paid because the frontend said so, instead of confirming it with the payment provider’s webhook.
- No backups, no monitoring. Nobody knows when something fails, and there is no way back when data is lost.
The 10 checks before real users
You can run most of these yourself in a few minutes each. If any fails, fix it before launch:
| # | Check | How to test it |
|---|---|---|
| 1 | Users can only see their own data | Log in as user A, copy a record’s ID from user B, try to open it |
| 2 | Database rules are on for every table | In Supabase, confirm row-level security is enabled and has policies on each table |
| 3 | No secret keys in the browser | Search the site’s JavaScript (browser dev tools) for “key”, “secret” and “token” |
| 4 | Roles are enforced on the server | Change your role in the browser’s storage or request and see if new options appear |
| 5 | Payments are confirmed by webhook | Check that orders only become “paid” after the payment provider calls your server |
| 6 | Inputs are validated on the server | Submit forms with empty, huge or script-like values |
| 7 | Rate limits exist on login and sign-up | Try twenty wrong passwords in a row |
| 8 | Backups exist and restore | Restore yesterday’s backup into a separate database |
| 9 | Errors are tracked | Trigger an error and confirm someone gets notified |
| 10 | You own every account | Code, hosting, database, domain and payment accounts in your company’s name |
If the first four all pass, you are ahead of most AI-built apps. If any of them fails, you have a real data-exposure risk, not a code-quality issue.
Should you fix the prototype or rebuild it?
It depends on the data model, not on how the code looks. AI-generated code is often verbose and repetitive; that alone is not a reason to rebuild.
Fix it when:
- You can explain the data model in a few sentences, and it matches how the business works.
- The problems are the checks above: missing rules, exposed keys, client-side trust.
- There are a handful of critical findings, not dozens.
Rebuild the core when:
- The same data lives in several places and nobody knows which copy is true.
- Every change breaks something unrelated, and there are no tests to tell you what.
- Security depends on the frontend behaving, and fixing it means rewriting most of the backend.
Even then, you rarely need to throw everything away. The usual path is to keep the interface, which AI tools are good at, and rebuild the backend and data layer properly behind it.
What does an engineer do in the first two weeks?
Hardening an AI-built app follows the same order as any takeover. First, secure access and accounts. Then make the build and deploy reproducible. Then map the flows that handle money and personal data, and fix the security gaps on those flows first. For a typical AI-built MVP, the critical part fits in about two weeks.
Frequently asked questions
Is vibe-coded software safe to launch?
Not without review. In Veracode’s tests, about 45% of AI-generated code contained security flaws, and real incidents have exposed user data from apps built with AI tools. A prototype is fine for demos and interviews; before real users and payments, check database access rules, secrets, server-side validation and backups.
Can I launch an app built with Lovable or Bolt?
Yes, many founders do, but treat the output as a first draft. Confirm that row-level security is enabled with policies on every table, that no secret keys ship to the browser, and that payments are verified on the server. Those three checks close the most common and most damaging gaps.
How much does it cost to make an AI prototype production-ready?
For a typical MVP, a security review and the critical fixes take one senior engineer about one to two weeks. If the data model has to be rebuilt, expect several weeks more. The review itself tells you which case you are in, so start there before committing to a budget.