Thomas Osayi

November 20, 2026 · Updated November 22, 2026 · 10 min read · Thomas Osayi

Fix or rebuild your AI-built app? How to decide before you spend more

Four honest options for a Lovable, Bolt, v0 or Cursor app that is stuck: keep prompting, targeted fixes, a partial refactor or a full rebuild. What each costs, when each makes sense, and the signs that tell you which one you need.

When someone sends me a repo, it usually comes with the same question in different words: is this worth saving, or should we start over? They have spent a month prompting in Lovable, Bolt, v0 or Cursor. The app mostly works. Then a payment does not unlock a plan, or a second test user can see the first user's data, and every new prompt seems to break something that used to work.

There are four ways forward, not two. Here is how I decide between them, what each one costs, and the signs that point to each.

Should I fix or rebuild my AI-built app?

In most cases fix it, because the parts that usually break are specific and the parts that usually work, the screens and the flows, are expensive to recreate.

AI builders are good at what you can see. They produce clean interfaces, sensible navigation and forms that save data. They are weaker at what you cannot see: who is allowed to read which record, what happens when a webhook arrives twice, where secret keys live, and how the production build differs from the preview. Those gaps are real, but they are also predictable. A developer can find them in a few hours and close them one by one.

A rebuild only wins when the foundation is wrong. The foundation is the data model: which tables or collections exist, what belongs to whom, and how records relate. If that is right, the rest can be repaired in place. If it is wrong, every fix sits on sand, and you keep paying for it.

So the real question is not "how messy is the code?" Almost all AI-generated code looks messy to a developer. The question is "is the shape of the data right for the product we are building?"

What are my four options?

The options run from cheapest and least disruptive to most expensive and most thorough.

Option 1: keep prompting in the builder

Best for: small visual changes, copy, layout and simple new screens.

Cost range: your builder plan plus credits, usually tens of dollars a month.

Pros: no handover, no waiting, and you stay in control.

Cons: once you hit the prompt loop, where each fix breaks something else, credits disappear and the app gets worse. Security rules and payment logic are exactly where prompting is least reliable.

Option 2: targeted fixes by a developer

Best for: an app whose core workflow works but has a short list of known problems.

Cost range: from $60 for one bug, from $200 for up to three fixes plus a small feature, from $600 to fix what blocks launch and ship it, based on my fix packages.

Pros: keeps everything that works, fast turnaround, and you can usually keep using the builder afterwards.

Cons: it does not untangle code that is badly structured, so the next big feature may still be slow.

Option 3: a partial refactor

Best for: a sound data model wrapped in duplicated, tangled logic.

Cost range: typically between the larger fix packages and an MVP build, depending on how much logic gets rewritten.

Pros: keeps the screens, styling and data, and leaves code a developer or an AI can extend safely.

Cons: takes longer than fixes, and heavy restructuring can confuse later prompts in the original builder.

Option 4: a full rebuild

Best for: a wrong data model, or a product where most core features still do not exist.

Cost range: a real build, from $1,200 for a launchable SaaS MVP with auth, dashboard, database and payments, or from $3,000 for a multi-role platform.

Pros: a clean foundation designed for where the product is going.

Cons: you pay again for screens that already worked, and it takes weeks instead of days.

What signs mean the app only needs fixes?

If you can describe each problem in one sentence and the main workflow works end to end, you need fixes.

Typical examples I see:

  • Sign-in works in the preview but breaks on the real domain because redirect URLs still point at the preview.
  • Stripe takes the payment but the plan never activates, because the webhook is missing or uses the wrong signing secret.
  • The production build fails on type errors that the preview ignored.
  • The Supabase row level security or Firebase rules are wide open, or so strict that nothing loads.
  • A handful of screens show errors on empty states or slow connections.

Each of these has a known cause and a known fix. None of them needs a new codebase. I wrote about the most common ones in "Your Lovable or Bolt app works locally. Here is what breaks at launch." If your list looks like that one, start with fixes and spend the money you save on your first users.

What signs mean the code needs a refactor?

When the same logic lives in many places and changing one feature means editing five files, the app needs a refactor rather than more fixes.

AI builders often solve each prompt locally. Ask for a discount on the pricing page and you get discount logic in the pricing page. Ask for it on checkout and you get a second copy. After a month, there are three slightly different ideas of what a "plan" is, and fixing one does not fix the others.

Signs to look for:

  • The same calculation or permission check written in several components.
  • Files of a thousand lines or more that mix data fetching, business rules and layout.
  • Bugs that come back after being fixed, because only one copy was changed.
  • New features that take longer each week, whether you prompt or a developer codes them.

A refactor pulls that logic into one place, for example a single function that decides what a user's plan allows, and points every screen at it. The data stays. The interface stays. What changes is that the next feature costs what it should.

When is a full rebuild actually worth it?

A rebuild is worth it when the data model does not fit the product, or when so little works that there is not much to keep.

Data model problems look like this. Every user's records sit in one shared collection with no owner field, so access rules cannot be written safely. A team product was built as single-user, so there is no concept of an organization, and adding one touches every query. Money is stored as text, or bookings have no time zone. These decisions spread into every screen, and patching them one by one usually costs more than designing them properly once.

Roles are the other common reason. Guardian MindCare, a therapy practice platform I built, has five user roles: therapists, supervisors, trainees, clients and admins. A permission model like that has to be designed into the data from day one. An app that was prompted as single-user and then told to "add supervisors" usually needs its foundation redone.

Guardian MindCare, a therapy practice platform I built with role-based portals for therapists, supervisors, trainees, clients and admins.
Guardian MindCare, a therapy practice platform I built with role-based portals for therapists, supervisors, trainees, clients and admins.

The second case is simpler. If you have a landing page, a login and three half-working screens, there is little to save. A rebuild at that point is really just the first build.

How do I find out which one my app needs?

Get one written review of the code before you choose, because guessing in either direction is expensive.

A useful review takes a developer a few hours and answers specific questions:

  • Is the data model right for the product, including users, ownership and roles?
  • Are the security rules or row level security policies correct for every table or collection?
  • Are any secret keys in the frontend code or committed to the repo?
  • Do payments activate reliably, including renewals, failures and cancellations?
  • Does the production build pass, and is deployment repeatable?
  • What works end to end today, what is broken, and what is missing?

You should leave with a list, not a feeling. Each item should be marked fix, refactor or rebuild, with a rough size. To prepare, give the reviewer read access to the GitHub repo and the Supabase or Firebase project, plus a short screen recording of the main workflow. "How to hand off an AI-built app to a developer" covers exactly what to send.

When I review an app before quoting, the quote follows the list. If most items are fixes, it is a fix package. If most of the product still needs building, the quote follows the build packages instead, usually less the parts your version already gets right.

A worked example: a booking app for dog groomers

This is an illustration, not a client. A founder builds a booking app for dog groomers in Lovable over five weeks. Groomers set availability, pet owners book and pay a deposit through Stripe, and both get email confirmations.

The review finds four problems. Row level security lets any signed-in owner read every booking. The Stripe webhook is not deployed, so deposits are taken but bookings stay "pending". Availability is stored without a time zone, so bookings made from another state land an hour off. And the production build fails on two type errors.

The first two are classic fixes. The build errors are a fix. The time zone issue looks small, but it touches the availability table and every screen that reads it. That is a data model change, and it decides the plan: fix security, payments and the build now, then refactor the availability logic into one place that stores times in UTC with the groomer's zone attached. No rebuild. Screens, styling and bookings all stay.

Had the app stored every groomer's bookings in one shared list with no owner at all, the answer would have changed to a rebuild of the data layer.

What can I check myself before paying for a review?

You can check three things in under an hour, and the answers will tell you, and any reviewer, a lot about which option you are facing.

Is row level security on for every table?

If you use Supabase, open the Table Editor and look for tables marked as unrestricted. Supabase's own documentation says a table in an exposed schema without row level security is readable and writable by any role with a grant on it. Write down which tables are open. Do not switch it on blindly in production, because with no policies the app will suddenly load nothing.

Did Stripe actually deliver the webhook?

In the Stripe dashboard, open Workbench, then Webhooks, select your endpoint and look at the Event deliveries tab. Failed or pending deliveries with a 400 or 500 status explain most "paid but not activated" complaints. If there is no endpoint for your live domain at all, that is your answer.

Does the production build pass?

Run npm run build locally or read the latest failed deploy log on your host. Copy the first error, not the last one.

Bring those three notes to the review. They often turn a vague "it is broken" into a short list of fixes, which is the cheapest outcome there is.

What mistakes make the decision harder?

The most expensive mistake is deciding before anyone has read the code.

Other mistakes that make it harder:

  • Rebuilding because the code "looks messy". Messy is normal for generated code, and it says little about whether the foundation is sound.
  • Prompting through a security fix. Rules and policies need someone who can read them line by line and test them as different users.
  • Adding big features to a broken base. Each new feature on a wrong data model raises the cost of fixing it later.
  • Switching builders mid-project. Moving from one AI builder to another rarely solves the underlying problem and often adds a second set of patterns.
  • Skipping a staging environment. Testing fixes on the live app with real users turns small bugs into support emails.

The bottom line

Fix the app when the main workflow works and the problems are specific. Refactor when the data is right but the logic is scattered. Rebuild only when the data model is wrong for the product or most of it does not exist yet. Before choosing, get a written review that marks every problem as fix, refactor or rebuild. If you want that review, send me the repo through the fix service page and I will tell you honestly which of the four you need.

Questions, answered in one line

How do I know if my AI-built app needs a rebuild?

It probably needs a rebuild only if the data model is wrong for the product, for example user data stored in one shared list, or if most core features still do not work.

Is a refactor cheaper than a rebuild?

Usually yes, because a refactor keeps the screens, styling and data that already work and rewrites only the tangled logic between them.

Can I keep using Lovable or Bolt after a developer fixes the code?

Yes, as long as the changes go through the GitHub repo the builder syncs with, although heavy refactors can make later prompts less predictable.

What does a code review before a fix cover?

It covers access rules, secrets, payments, the data model, build and deploy setup, and a list of what works, what is broken and what is missing.

How much does it cost to fix an AI-built app?

Thomas Osayi fixes single bugs from $60, up to three fixes plus a feature from $200, and gets apps whose core already works launched from $600; larger rebuilds follow his SaaS MVP pricing from $1,200.

Sources

About the author

Thomas Osayi is a full-stack developer in Los Angeles studying computer science at Loyola Marymount University. He founded and built SQWAD, a SaaS platform Shopify brands use to run creator programs, and builds custom Next.js websites, SaaS MVPs and fixes for AI-built apps for businesses and founders.

See his work · Services and prices

Related articles

Fix, finish and launch your AI-built app

Built your app with Lovable, Bolt, v0, Replit or Cursor and got stuck? I fix the bugs, connect auth and payments, clean up the code and deploy it to production.

See the service