Vibe CodingAIProduct StrategyTechnical DebtSaaS

Rebuild or Repair Your AI-Built App?

Moid KhanChief Operating Officer8 min read
Rebuild or Repair Your AI-Built App?

Key takeaways

  • Repair is the right answer for most AI-built apps, because the dangerous code concentrates in payments, access control and deployment, which is a small share of any application.
  • Four things justify rebuilding a part: identity and permissions were never designed, the data model cannot represent the business, nobody can safely change the code, or the app is wedged inside a builder you have to leave.
  • Rebuild the part, not the product. Screens, copy and product decisions are the expensive output of your own judgement and are almost never what needs replacing.
  • Get the verdict from a diagnostic you can read, before anybody quotes the work. A rebuild quote from the party that benefits from a rebuild is not a diagnosis.

Repair your AI-built app rather than rewriting it, unless one of four specific conditions holds. In most apps built with Lovable, Replit, Bolt, Cursor or ChatGPT, what is unsafe is concentrated in a handful of places — how payments are confirmed, whether one customer's data is reachable by another, what happens when something is deleted, and how changes get deployed — and that is repairable in one to three weeks without touching the screens you designed or the product decisions you made.

That matters commercially, because a rebuild is the most expensive recommendation anyone can make about your app and it is also the easiest one to sell. It sounds thorough. It converts your sunk cost into someone else's revenue. And in most cases it discards work that was fine.

What is usually wrong, and why it is repairable

The reason AI-built apps fail in such a consistent way is that they were tested under one set of conditions: one user, who is authorised to see everything, paying with a test card, never trying to break anything. Everything outside those conditions is untested, and everything inside them works.

So the faults cluster. Access control is missing or only checks that someone is signed in rather than that the row belongs to them. Payment success is taken from the browser instead of the payment provider, and retried webhook events are processed twice. Destructive operations run in places nobody intended — we have audited an app whose sign-out routine deleted the customer's own saved records. Deployments have no safe order, so a one-feature change can take the whole site down.

Each of those is a bounded, local fix. None of them requires rewriting the application, because the application's structure is not what is wrong. The enforcement is missing at specific points, and enforcement can be added at specific points.

The four conditions that do justify a rebuild

1. Identity and permissions were never designed. If there is no coherent notion of who a user is and what they may touch — permissions checked in the interface but not on the server, roles invented ad hoc per screen, no single place where authorisation is decided — then there is nothing to repair, because the thing you would repair does not exist. Retrofitting an access model into an app that has none means rewriting every path that reads or writes data, which is most of the app.

2. The data model cannot represent the business. Some generated schemas cannot express what the product needs: one table doing the work of three, relationships encoded as text, money stored as floating-point numbers, no way to record history where the business depends on history. You can migrate a flawed schema; you cannot patch a schema that has no place to put the truth.

3. Nobody can change it safely. This is the one founders feel before they can name it: every fix breaks something else, so you have stopped touching it. If changing one thing reliably breaks another, the cost of each future change is unbounded, and an unbounded cost on every change is worse than a bounded cost once.

4. You have to leave the platform. If the app only runs inside the builder that made it and your plans require something it cannot do — your own infrastructure, a compliance requirement, a cost ceiling, an integration it does not support — the move is forced. That is a migration rather than a rebuild, and the work is mostly in the data and the integrations.

If none of those four holds, repair.

Rebuild the part, not the product

The useful question is never "rebuild or not". It is "which layer". An app is roughly: the screens and copy, the product logic, the data model, and the infrastructure. These fail independently and can be replaced independently.

In practice the common case is that the screens are keepable, the product logic needs correcting in the few places that handle money and identity, the data model needs a migration rather than a replacement, and the infrastructure needs building properly because the builder's default was never meant for production. That is a repair with one rebuilt layer, and it is a fraction of the cost and risk of starting again.

Keep what you built wherever you can. Your screens and flows encode a hundred decisions about your own market that an outside team would get wrong on the first attempt. They are the part of an AI-built app that is genuinely yours.

Get the verdict before you get the quote

The sequence matters more than the decision. Have the app diagnosed first, in writing, with each finding ranked by what it would do to a customer and priced individually. Then decide what to fix. A recommendation to rebuild that arrives bundled with the price of a rebuild, from the party who would be paid for it, is a sales document.

A readable diagnostic also answers the question you actually have, which is not "is this good code" but "what happens if real customers use this on Monday". Those are different questions, and only the second one decides anything.

Boltout's AI App Rescue audit is built to be that diagnostic: free, written, back within 48 hours, ranked by customer impact, with a fixed price against each individual fix and an explicit call on repair versus rebuild for each part of the app. If a rebuild genuinely is cheaper, that is what the report says, before you have spent anything. Before you send it, the twelve checks will tell you a good deal on your own, and why asking the AI to fix its own code does not work explains why the tool that built it cannot make this call for you.

Sources

Frequently asked questions

In the apps we have audited, the code that is genuinely unsafe is a small minority of the codebase, and it sits in predictable places: payment confirmation, authorisation on data access, destructive operations, and deployment. The screens, the layout, the copy and most of the product logic are typically kept as they are. That is why repair is usually both cheaper and faster, not just cheaper.

No, and the honest framing matters. Veracode's 2025 GenAI Code Security Report found that AI models introduced security vulnerabilities in roughly 45% of the coding tasks it tested across more than 100 models, and that the rate did not improve as the models got better at writing working code. That is a measurement of tested task outputs, not a verdict that every line of AI code is unsafe. It means unsafe output is common enough that assuming otherwise is reckless, which is an argument for verification rather than for rewriting.

Being live makes repair more attractive, not less. You now have customers whose data and billing continuity you are responsible for, and a rebuild means running two systems, migrating live data and risking a cutover. Fix what is dangerous in place, under the existing app, and treat any rebuild as a later, staged piece of work on one layer at a time.

Usually yes, and most of our clients do. The pattern that works is to keep generating new screens and features with the tool while the parts that handle money, identity and customer data are owned and reviewed by engineers. What does not work is generating changes directly into a live payment or permission path without review, because that is the surface where the tool's assumptions are most likely to be wrong.

Written by

Moid Khan

Chief Operating Officer · Boltout

Moid Khan is Chief Operating Officer at Boltout, where he oversees delivery and operations across the studio's ventures and client engagements. He writes about building software products with AI, web, mobile, and cloud technology, drawing on work with startup and enterprise teams across the US and globally.

Ready to build something?

We help businesses ship better software, from AI integrations to full-stack web and mobile. Let's talk about what you need.

Get in touch