Should you rescue or rewrite your AI-built app?
How to decide between fixing an AI-built codebase and starting over, with the signals that point each way and what each option really costs.
Samed Škulj
· 3 min read
You built an app with Lovable, Bolt, v0 or Cursor. It has users, maybe revenue. But every new feature takes longer than the last, things break in unrelated places, and someone has suggested starting over "properly". Should you?
Usually not. But sometimes yes. Here's how to tell.
Why rewrites are tempting, and why they usually disappoint
A rewrite promises a clean codebase with none of today's problems. What it actually delivers, for months, is two products: the old one, which customers still use and which still needs fixes, and the new one, which has to catch up to every feature and edge case the old one quietly handles.
The old code is messy, but it also holds knowledge: the bug fixes, the odd customer requirements, the "don't change this or invoices break" logic. A rewrite loses all of it and rediscovers it the hard way.
Signals that point to rescue
- The app works for users. The problems are speed of change and confidence, not core functionality.
- The data model is roughly right. Tables and relationships match the business, even if the code around them is messy.
- The problems are concentrated. A few huge files, one tangled flow, a missing layer of security. Not everything everywhere.
- The stack is mainstream. Next.js, React, Node.js, Postgres or Supabase. Nothing exotic you can't hire for.
- You have customers to keep happy while it improves.
Rescue means: fix security first, add tests around what matters, then refactor the parts that block your roadmap, one at a time, while shipping.
Signals that point to rewrite
- The data model is wrong at its core. For example, the app assumes one user per account and the business now needs teams with roles everywhere.
- The stack can't do what you need, and changing it means touching nearly every file anyway.
- Nothing works reliably, and there are few users or little data to migrate.
- The app is small. If it's a few screens, a rewrite is a short project and the risk is low.
Even then, a rewrite is rarely all-or-nothing. Often the right move is replacing one part at a time behind the existing app, the same incremental approach I describe in migrating Vue to React without downtime.
A quick scoring exercise
Answer yes or no:
- Do paying users rely on it daily?
- Is the database schema mostly sensible?
- Could a new senior developer understand the main flows in a day?
- Are the worst problems in fewer than ten files?
- Is it built on a mainstream stack?
Four or five yes: rescue. Two or three: rescue, with a planned rebuild of the worst area. Zero or one: a rewrite is worth discussing.
What a rescue looks like in practice
- Week 1: review and stop the bleeding. Security issues, payment bugs, data exposure. These are usually small fixes. See the security holes I see most.
- Week 2: safety net. Tests on critical paths, CI, preview deploys, error tracking. See adding tests to an app that has none.
- Weeks 3 to 4: refactor what blocks the roadmap. Split the giant components, clean up the data access layer, fix the slow queries.
At the end you have the same app your users know, but one you can change with confidence.
Get an outside opinion first
The people closest to the code often have the strongest feelings about it, in both directions. An outside review gives you a written answer with evidence. That's what the first week of an AI-built app rescue produces, in the format of the sample audit report, including a clear rescue-or-rewrite recommendation.

Written by Samed Škulj
Senior Full-Stack Engineer since 2021. I have shipped with teams at Deel, HTEC Group (for Zoox), Ministry of Programming, and now help SaaS teams add AI features and get AI-built apps ready for production. LinkedIn