Skip to content
All case studies
10 Jun 2026

Replacing a live system while it is still taking orders

Rebuilding Ali2BD as a new mobile product without stranding the customers who were mid order in the old one.

Role
Technical lead, mobile
Timeline
2026
Stack
Flutter, Dart, Laravel, MySQL, bKash, Novu

Context

Ali2BD is MoveOn's cross border shopping product. Customers in Bangladesh buy from international marketplaces, pay in taka, and follow a parcel that crosses a border before it reaches them.

There was already a working system. It had customers, orders in flight, and money moving through it. The decision was to rebuild the mobile product rather than keep extending what existed, and I was the technical lead for that.

The constraint that shaped everything

A rewrite with no users is an engineering project. A rewrite with users mid order is a migration, and migrations are judged by what breaks, not by what ships.

So the constraint was stated up front: the old system keeps working, untouched, until the last customer has moved. No dual write, no shared mutable state, no clever synchronisation between two applications that would leave us debugging both at once.

That ruled out the tempting approach, which is to ship the new app pointed at the same data and let the two coexist indefinitely. Coexistence sounds safe and is where these projects usually die.

Architecture

The new application is feature modular. Each feature owns its presentation, its domain and its data access, and nothing above the data layer knows which HTTP client is in use.

That boundary is not architecture for its own sake. During a rebuild the backend contract moves, sometimes weekly. With repositories in the middle, a changed response shape is one file. Without them it is every screen that touched the field.

Decisions worth defending

The app stores no payment credential, ever.

bKash tokenized payment exists so a returning customer does not re-enter their account on every order. The convenience is the product requirement. The security model is the engineering requirement, and they pull against each other.

What I settled on: the client holds nothing. The server stores a token that is bound to the customer and to the merchant and is useless outside that pairing. Saving an account is explicit and opt in, with a clear way to remove it, because a saved payment method the user does not remember agreeing to is a support ticket and a trust problem.

The rule that matters most is about verification. An order becomes paid after a server to server confirmation with bKash. Never on a client side callback. A client can be replayed, interrupted, or simply lied to, and the failure mode of getting this wrong is an order marked paid that nobody paid for.

Trade off: an extra network hop on the critical path of checkout, and a state where the customer has paid but the order is not yet confirmed. That window is real, so it is shown honestly in the interface rather than hidden behind an optimistic success screen.

Notifications go through one pipeline, not per feature.

Order status is the reason this app gets opened. Every status change may need to reach a customer through push, email or SMS depending on what they have and what the event is.

Building that per feature would mean channel logic sprinkled across the codebase and four places to fix when a provider changes. Instead the backend emits one event to Novu, and Novu fans out to Firebase Cloud Messaging, APNs, email and SMS.

Device tokens are tied to login sessions rather than to the device alone. On a shared phone, logging out deregisters the token, so the next person does not receive the previous customer's order updates. That sounds obvious written down and is missed constantly.

Trade off: a third party in the delivery path, and an outage there is an outage in notifications. The alternative is owning retry, backoff, per channel failure handling and provider credentials for four channels, which is a system in itself.

The migration

The order that worked:

  1. Ship read only first. The new app could show a customer their existing orders before it could create one. Low risk, and it put the new client in front of real users against real data early.
  2. New orders in the new app, old orders finish where they started. No backfill of in-flight state across systems. An order created in the old system completed in the old system.
  3. Move customers by cohort, not by announcement. New users first, then returning customers, rather than a single date where everyone changes at once.
  4. Keep the old path alive until the tail is empty. Turning it off early converts a migration into an incident.

The principle underneath all four: never require a customer to care that a migration is happening.

Results

The application shipped to Google Play and has released steadily since. It carries the ordering flow, the tokenized payment path and the notification pipeline described above.

CONTENT NEEDED: add real outcomes once you have them, for example adoption after launch, crash free sessions, or support ticket volume before and after. Only numbers you can point at.

What I would change

Instrument before launch, not after. We shipped, then wanted answers about where users dropped out of the new ordering flow, and the build could not tell us. Adding that afterwards cost more than building it in would have, and it delayed the first real decision we could have made from data.

What I took from it

Leading this was less about code review than about holding one line: the old system stays untouched until the last customer is off it. Every shortcut proposed during the rebuild was some version of breaking that line, and every one of them would have traded a week of work now for a month of debugging two systems at once.