If you are reading this, something about your app has been keeping you up at night, and you are not sure whether it is a fixable problem or the start of an app rebuild. The honest answer, most of the time, is that it is fixable. This article helps you tell the difference in about an hour, before anyone sends you a proposal.

The one-hour diagnosis

You do not need to read code for this. You need access to the repository, the hosting dashboard and whoever last deployed. Write down what you find. Those notes become the brief for any vendor, and they make it harder for anyone to oversell you.

  1. Dependency age (10 minutes). Open the package manifest (package.json, composer.json, pubspec.yaml, requirements.txt). Note the framework version and the language runtime. Check the vendor's support page. The site endoflife.date lists support dates for most runtimes and frameworks in one place. Good: within one major version of current. Bad: a runtime past end-of-life, which means no security patches.
  2. Deploy time and method (10 minutes). Ask how a change reaches production. Good: a pipeline that runs tests and deploys in under 20 minutes. Bad: someone copies files by hand, or nobody is sure.
  3. Error rate (10 minutes). Open whatever error tracker exists. Sentry and Bugsnag are common for web, and Crashlytics for mobile. Good: a handful of distinct errors, each with an owner. Bad: thousands of errors nobody looks at, or no tracker at all.
  4. Slowest endpoints (15 minutes). From the hosting or APM dashboard, list the five slowest requests. Good: under 500 milliseconds at the 95th percentile. Bad: multi-second pages, usually a database query with no index. Adding one missing index typically takes a query like that from seconds to well under 100 milliseconds.
  5. Local run test (15 minutes). Can a developer who has never seen the project run it locally from the README? Good: yes, within an hour. Bad: the README is empty or the project depends on one person's laptop.

How to read the results: one or two bad answers usually point to a fix. Four or five bad answers, combined with one of the signs below, is when a rebuild belongs on the table.

Seven signs you need an app rebuild

  1. The platform is end-of-life. A framework the vendor no longer patches, or a mobile SDK the store will stop accepting. This is a hard deadline, not an opinion.
  2. The data model cannot carry the business. Core concepts stored as free text, no foreign keys, duplicated customer records. If every new feature starts with “first we would need to clean the data”, the model is the problem.
  3. No tests and every change breaks something else. A codebase with no safety net can be refactored, but only if it is small. Past a certain size, the cost of adding tests to the old code exceeds the cost of writing new code with tests.
  4. Security that cannot be fixed in place. Passwords stored reversibly, secrets in the repository, SQL built by string concatenation throughout. One instance is a fix; a pattern is a rebuild.
  5. It cannot scale past today. A single server that falls over at double the traffic, with an architecture that cannot be split.
  6. Nobody can run it. No local environment, no documentation, and the only person who understood it has left.
  7. The cost of the next three features exceeds a rebuild. Price them honestly on the old code. If the sum is more than a rebuild, the decision has made itself. An illustrative case: three features quoted at 6, 8 and 10 weeks on the old code, 24 weeks in total, against a 20-week rebuild after which each feature takes two to three weeks. The rebuild wins, and you also get tests.

When a refactor is enough

Slow pages, a high error rate, a messy deploy and an old-but-supported framework are all fixes. In our experience they account for most “we need a rebuild” calls. A fix engagement typically runs two to six weeks and leaves you with monitoring, a pipeline, the worst queries indexed and the top ten errors gone. A rebuild runs three to nine months. Do not sign up for the second when the first will do.

The reasoning is simple. A fix keeps everything that already works, including years of edge cases nobody wrote down. A rebuild has to rediscover all of them. Choose the rebuild only when the old foundation actively blocks you.

The most common causes, in order

  1. Missing database indexes and N+1 queries. One page triggers hundreds of small queries instead of one.
  2. No error tracking, so bugs are found by customers.
  3. Out-of-date dependencies that were never scheduled. Upgrades get harder with every skipped version.
  4. Deploys by hand, so fixes are slow and risky.
  5. A single developer who held everything in their head.

The first four are fixes. The fifth becomes a rebuild only when that knowledge is truly gone and the code cannot explain itself.

Protect yourself first

Whatever you decide, do this before the next conversation with your current vendor:

  • Repository: make sure the organization on GitHub, GitLab or Bitbucket is yours and you are an owner. Export a full clone today.
  • Cloud and hosting accounts: the root account must be in your name with your billing details and two-factor authentication on your device.
  • Domain and DNS: registrar login in your name. This is the one people forget, and it is the one that takes a site offline.
  • App-store accounts: Apple and Google developer accounts owned by your company, not the agency.
  • Third-party services: payment processor, email, SMS, analytics. Each one in your name.
  • Documentation: ask for a written list of environments, services, scheduled jobs and the exact deploy steps. Request it while the relationship is still civil.
  • Contract: read the IP clause. Most agency contracts assign the code on payment; confirm you have paid and get the assignment in writing.

What the first week of a rescue looks like

The first week is read-only. We run the diagnosis above properly, read the code, map the data model and the integrations, and write a risk list ranked by likelihood and impact. You receive a written report that says, for each problem, fix or rebuild, how long and how much. Only then do we touch anything, and the first changes are always monitoring and a safe deploy pipeline, because they make every later change cheaper.

A typical split: day one is access and getting the app running locally. Days two to four cover code, database and integrations. Day five is the report and a call to walk through it.

If that is the conversation you need, request a free code and performance audit. The first hour is the diagnosis above, run by an engineer, at no charge.

Frequently asked questions

Can we keep the app running during a rebuild?

Yes, and you should. The new system is built alongside the old one and traffic moves over feature by feature or all at once on a planned day, with the old one kept as a fallback for a month.

Our agency says a rebuild is the only option. How do we check?

Ask them to price the next three features on the current code. If they cannot, or the number is wild, get a second opinion from someone who is not bidding on the rebuild.

How long does a fix engagement take?

Two to six weeks for monitoring, pipeline, the worst queries and the top errors. You will know within the first week whether that is enough.

What if our agency will not hand over the code?

Check the IP clause and your payment records first. If the code is yours, request the transfer in writing with a deadline. Most disputes end there. If not, talk to a lawyer before the next invoice.