Software Development Dedicated AI Engineering Teams Software Development Company

Refactor vs rewrite: a Flutter app rescue

A refactor vs rewrite decision settled in production: an unstable Flutter app taken over, stabilized in two months, then refactored progressively while new features kept shipping.

Geography
Detroit, Michigan
Year
2023
Stage
1 to 10 employees
Team
Five mid-level developers, a senior developer, an architect, and a UX designer as needed, led by a technical product manager
Duration
October 2023 to ongoing
Engagement size
Confidential

The situation

A software development company in Detroit needed delivery capacity for two custom cloud-based mobile apps, both targeting iOS and Android. One of the two came with the problem that forces the refactor vs rewrite decision: an existing Flutter app, a mental health platform with video sessions and billing management, was unstable and not production-ready. Rebuilding it from zero would have meant discarding working surfaces and restarting the clock. Refactoring meant taking over another team's codebase and making it shippable as-is.

The client chose the takeover. That made this an app rescue with a hard constraint: the platform had to reach production and keep evolving while the code underneath it was being repaired.

What we built

Leanware ran both builds from the client's documentation: one app in Flutter, the other in React Native. For one project Leanware owned development only; for the other it owned both the UI/UX design and the development. A single project's team ran to five mid-level developers, a senior developer, an architect, and a UX designer working as needed, coordinated by a technical product manager, the structure of a dedicated development team. It is the same embedded model that runs the industrial IoT analytics engagement at Greyhound Engineering. The team worked AI-augmented throughout, and that is the fact the rest of this case rests on: it is what let a team this size carry two apps and a rescue at the same time.

Stabilize first, then refactor what you touch

The rescue followed the sequence that separates a refactor from a rewrite. Stabilization came first and took a couple of months: the Flutter app went from unstable and not production-ready to shippable. AI-assisted code comprehension shortened the hardest part of any takeover, understanding another team's decisions before changing them. From there the refactor ran progressively in production. As features evolved and surfaces were touched, the code under those surfaces was repaired in the same pass, so the platform never stopped shipping to get better. The stack ran mainly on GCP and Firebase.

The second app, built in React Native, ran in parallel with the same coordination model. One team delivering one app in each framework, at the same time, for the same client, with AI-assisted QA holding coverage across both while the refactor changed code underneath.

Outcome

  • Unstable, non-production-ready app stabilized into a showcase-quality product

    Source ↗
  • Two cloud-based cross-platform mobile apps delivered (Flutter and React Native)

    Source ↗

The app that was once unstable became a stable, solid product the client says they are happy to showcase, live in production. The client's Clutch review scores 5.0 across every category and names quality and honesty as the two takeaways of the engagement: deadlines met, promises kept, and an airtight process producing quality code. The client's shout-out goes to the technical product manager coordinating the work.

The engagement began in October 2023 and continues. What makes this mobile app development case study unusual is who did the judging: the client is itself a software development company, a buyer that reads code, and it is the one vouching for the honesty and the quality. The same takeover discipline carried the Notary.io software project rescue on the web side. Per the confidentiality terms of the engagement, the client is identified only as a software development company.

"Leanware's honesty and quality stand out from other providers."

— Confidential , Co-Founder & CEO , Software Development Company · Detroit, Michigan

Engagement FAQ

Should an unstable app be refactored or rewritten from scratch?

Refactoring won here, and the reasoning travels. A rewrite discards working surfaces and pauses shipping for months; a refactor keeps the product alive while the code is repaired. This Flutter app was stabilized in about two months, then refactored progressively as features evolved, and it went from not production-ready to a product the client showcases.

Can a new team take over an app another company built?

Yes. Leanware took over this codebase working from the client's documentation, stabilized it in a couple of months, and made it shippable without a rebuild. The takeover included coordinating with the client through a technical product manager, which is the role the client's Clutch review singles out.

How do you refactor an app that is already in production?

Progressively. Stabilize the app first so it can ship, then repair the code under each surface as features touch it, in the same pass. That way the refactor never blocks the roadmap. This is how the platform kept evolving, with video sessions and billing management running, while the codebase improved underneath.

How can one team deliver two apps and a refactor at the same time?

By working AI-augmented. AI-assisted comprehension sped up the takeover of the unfamiliar Flutter codebase, AI-augmented development kept new features and the progressive refactor moving in parallel, and AI-assisted QA held coverage across both apps. The team itself stayed lean: mid-level developers, a senior developer, and an architect, coordinated by a technical product manager.

What does an engagement like this cost?

As a directional range, an engagement shaped like this one runs $5,000 to $15,000 USD per month, covering new feature development, QA, UI/UX design, and the progressive refactor. The range holds because AI-augmented engineers cover more ground per person; a conventionally staffed team delivering the same scope would cost several times more. A takeover priced as a monthly team cost rather than a rebuild quote is usually the cheaper path when the existing code is salvageable.

Flutter or React Native?

This engagement delivered one app in each, built by the same team at the same time. The rescued mental health platform ran on Flutter with GCP and Firebase and reached production; the second app was built in React Native. Both were delivered for iOS and Android, so the honest answer is that both frameworks hold up, and the choice should follow the project's existing code and constraints rather than a framework verdict.

Related cases

Ayama

A RAG assistant that answers technicians' equipment questions from manufacturer manuals inside an offline field app. Field service knowledge management in production for a US solar O&M platform

Dedicated AI Engineering Teams Read case study
12 embedded team members delivering feature content on time across multiple delivery teams

Software Consultancy

AI staff augmentation for a Columbus software consultancy: a 12-person nearshore team working with Cursor and Copilot inside the client's delivery teams, rated 5.0 on Clutch.

Dedicated AI Engineering Teams Read case study
READY?

Stop managing operations. Let the system run them.

Show us the workflow that's eating your week. We will map it, show you what AI can automate, and tell you what we will run for you.

Tell us what you are trying to solve. We will map your workflows and show you exactly what AI can automate, and what we will run for you.