Let’s talk
Back to Writing
•9 min read•
rebuild or repair SaaStechnical debtlegacy SaaSSaaS rewriteproduction readiness

Should You Rebuild or Repair Your SaaS? A Decision Guide for Founders

A founder choosing between repairing an existing SaaS codebase, replacing it piece by piece, or rebuilding it from scratch

Every SaaS founder with an aging codebase eventually hears the same two sentences from their developers. "This is a mess, we should rewrite it." And, a few weeks later, "we can't touch that part, it might break everything."

Both sentences are about the same fear. The code has become hard to change, and shipping has become slow or scary. The question of whether to rebuild or repair your SaaS is really a question about risk: which option puts the least revenue and the fewest customers in danger while you get the product back to a healthy state.

This guide compares three options, repair, incremental replacement and full rebuild, on the things a founder can actually weigh: risk, downtime and migration cost. It ends with a checklist you can run in an afternoon.

Why the Rewrite Instinct Is So Strong (and So Often Wrong)

Developers prefer writing code to reading it. A fresh repository feels clean, and the old one carries every bad decision at once. That feeling is real, but it is not evidence.

Joel Spolsky made the classic argument in Things You Should Never Do, Part I back in 2000: a working codebase contains years of small fixes for real bugs and edge cases, and a rewrite throws all of that away. The essay is about a desktop product, but the core point holds for SaaS. Odd-looking code is often a fix for a problem somebody already paid to discover.

A rebuild is not wrong in itself. It is wrong as a default. The default should be the smallest change that removes the real problem.

First, Name the Actual Problem

"The code is bad" is not a diagnosis. Before choosing a strategy, write down which of these you are actually facing, because each points to a different answer.

  • Slow delivery. Small changes take weeks. Often caused by missing tests, tangled modules or a painful release process, none of which require a rebuild.
  • Reliability. Outages, slow pages, jobs that silently fail. Often traceable to a handful of hot spots: a missing index, an unbounded query, a job queue with no retries.
  • Security and compliance. Weak authentication, missing tenant isolation, outdated dependencies. These are usually fixable in place, and they should come first whatever you decide next. Our guide to what to audit before real users arrive lists the usual suspects.
  • A dead foundation. An end-of-life runtime or framework you cannot upgrade, a database model that cannot express your pricing, or an architecture that cannot scale past a hard ceiling.
  • A team problem. The original developers left and nobody understands the system. That is a knowledge problem, and a rewrite by the same new team will not fix it by itself.

Only the fourth item can justify a full rebuild on its own. The rest respond to repair.

Option 1: Repair in Place

Repair means keeping the system and fixing its worst parts: add tests around the risky areas, upgrade dependencies, fix the slow queries, tighten authentication, clean up the deploy pipeline.

Risk: Low. Every change is small and can be rolled back.

Downtime: Usually none beyond normal releases.

Migration cost: None. There is no second system to migrate to.

What it cannot do: Repair does not change a fundamentally wrong data model or move you off a platform that no longer receives security fixes. It also needs discipline: repair work with no scope boundary turns into endless "cleanup" that never ships anything a customer can see.

Repair is the right choice when the pain is concentrated, the data model is sound, and the team can still ship small changes safely. It is also the right first step in almost every other case, because it buys time and reveals how deep the problems really go. Our post on why most SaaS MVPs fail after launch covers the early-stage version of this pattern.

Option 2: Incremental Replacement

Incremental replacement keeps the old system running while you build new pieces beside it and move traffic over one capability at a time. Martin Fowler describes this as the strangler fig application: the new system grows around the old one until the old one can be switched off. Microsoft documents the same approach as a cloud design pattern, the Strangler Fig pattern, which puts a facade or proxy in front of the old system and routes each request to old or new code.

Risk: Moderate and bounded. Each slice is small, so a failure affects one feature, and you can route back to the old code.

Downtime: Usually none, because both systems run at the same time.

Migration cost: Real, and often underestimated. You run two systems for a while, and the data has to stay consistent between them. Plan for dual writes or a sync job, and for the awkward period when one customer's data lives in two places.

What it needs: A clean seam to cut along. That might be an API route, a background job or a whole module such as billing or reporting. If the old code has no seams at all, the first job is to create some, which is itself repair work.

Incremental replacement fits when the foundation is genuinely dead but the business cannot stop. You get a new architecture without a cutover weekend.

Option 3: Full Rebuild

A full rebuild means writing a new system from scratch and switching customers over once it is ready.

Risk: High. The old system keeps changing while the new one is built, so the target moves. The new system also has to reproduce years of behavior that nobody wrote down. The risk sits at the end: you find the gaps only when real customers use it.

Downtime: Depends on the cutover. A big-bang switch concentrates all the risk into one moment. A phased move per customer reduces it, but that begins to look like Option 2.

Migration cost: The highest of the three. You pay for the new build, the data migration, the parallel running of both systems and the feature freeze or double work that follows.

When it can be the right call: The product is small enough to rebuild in weeks, the data model is simple, the old system truly cannot be upgraded or secured, or the business model itself has changed so much that the old code answers the wrong question. A very young product with few users is the most common honest case, since there is little behavior to preserve and little data to move.

If you do rebuild, treat it as a new product launch. Set a written scope, freeze the old system's feature list, and define what "done" means before the first commit.

A Side-by-Side Comparison

The table below uses qualitative ratings. These are judgment calls, not benchmarks, and your numbers will depend on your system.

Repair in placeIncremental replacementFull rebuild
Customer riskLowModerate, per sliceHigh, concentrated at cutover
DowntimeNormal releasesUsually noneDepends on cutover plan
Migration costNoneMedium, dual-running periodHighest
Time to first benefitDays to weeksWeeks to monthsMonths, often longer
Reversible?Yes, per changeYes, per sliceHard once customers move
Best whenPain is concentratedFoundation is dead, business cannot stopProduct is small or the model has changed

Questions That Decide It

Run through these with your team. Honest answers usually make the choice obvious.

  1. Can the team ship a small change safely today? If yes, repair is probably enough. If no, find out why before touching architecture. The cause is often missing tests or a fragile release process.
  2. Is the pain in a few modules or everywhere? A few modules point to repair or targeted replacement. Everywhere points to a deeper foundation problem.
  3. Can the runtime and framework still be upgraded? If the platform still gets security fixes and you can move forward a version at a time, you do not have a dead foundation.
  4. Does the data model match how customers pay and work? Migrating data is the slowest, riskiest part of any rebuild. A sound model is a strong reason to keep the system.
  5. How much of the old behavior is documented or tested? The less you know, the more a rewrite will lose.
  6. Could you survive a feature freeze? A rebuild usually means fewer customer-visible releases for months. If the business cannot take that, favor incremental replacement.
  7. Who knows the old system? If nobody does, start with a technical audit so the decision rests on facts and not on a developer's frustration.

A Practical Order of Work

Whichever path you pick, this order keeps risk low.

  1. Stabilize first. Fix the security gaps, add backups you have tested, and put monitoring on the pages and jobs that earn revenue.
  2. Add tests around the behavior customers rely on. These become your safety net for every later step, including a replacement.
  3. Audit before you decide. A short technical review turns "it feels bad" into a ranked list of problems with a cost and risk for each. Our SaaS MVP audit is built for this.
  4. Repair the top risks. Re-measure after a few weeks. Often the system looks much better than the team feared.
  5. Replace only what is still blocking you. Pick one slice, move it behind a routing layer, and prove it before starting the next.
  6. Decide on a full rebuild last, if ever. By then you have evidence, tests and a smaller old system to replace.

When to Handle It Yourself and When to Get Help

An internal team can usually handle repair if it has time and understands the code. The difficult cases are the ones where nobody trusts the code or the original authors are gone. A second opinion helps there, because the decision is expensive to reverse and the people closest to the code are often the ones most tempted by a rewrite.

Get outside help when the system earns revenue but nobody can change it safely, when you suspect a foundation problem but cannot prove it, or when you are about to commit months of budget to a rebuild. Our post on signs your MVP is not production-ready is a quick self-check before that conversation.

Frequently Asked Questions

When is a full rebuild of a SaaS product justified?

Rarely, and usually when the foundation itself blocks the business: an unsupported runtime you cannot upgrade, a data model that cannot represent what customers pay for, or code nobody can safely change. Even then, a staged replacement is usually safer than a big-bang cutover.

What is the strangler fig approach?

You put a routing layer in front of the old system and move one capability at a time to a new implementation. Traffic shifts piece by piece, the old code shrinks, and you can stop or roll back at any step.

How do I know if repair is enough?

If the pain is concentrated in a few modules, the data model is sound, and the team can still ship small changes safely, repair is usually enough. Fix the highest-risk areas first and re-measure before deciding anything bigger.

Related Reading

Next Step

If you own a live SaaS product and keep hearing "we need to rewrite it," write down three things first: the one problem that hurts most, how much of it is concentrated in a few modules, and how long a feature freeze your business could survive. Those answers decide most of the question. If you want an outside review before committing, start with the SaaS MVP audit, or look at SomSite's production readiness upgrade for senior-led repair and staged replacement of a live product. You can also send the details and get a plain recommendation on repair, replace or rebuild.

Working on a SaaS that's starting to feel fragile?

Talk to an engineer about the parts that break first — without rewriting what already works. We'll recommend focused support or a compact team based on your scope.

Talk to an Engineer