We built a browser game where the city is your web app and every building is one unit of it. Rebuild them all in React without closing a single street. Here is what each of its five phases teaches about real migrations.
We've written thousands of words about the strangler fig pattern, parity testing and kill switches. They're useful once you've lived through a migration. Before then, they're just words. So we built a game instead.
Strangler Fig City is a short browser game played across 12 levels on one road, from the legacy streets of Old Town, through the Construction Zone, to the new city. The city is a web app and every building is one unit of it: a screen, a component or a shared service. People walk the streets the whole time. Your guide, Mayor Rabbit Jr., asks you to rebuild every building in React or Next.js without closing a single street. You start at 100% city health, and every shortcut a real migration team is tempted to take costs you some of it.
This post walks through the game level by level and explains what each one is really teaching. If you'd rather play first, go ahead. It takes about as long as reading this.
Play it: Strangler Fig City. Check in at City Hall: pick what your app runs on today (Angular, Ember, Backbone, jQuery or vanilla JS) and where you're moving it (React or Next.js), and the Mayor quizzes you on it first. Not a developer? Choose Not a developer and you get everyday questions about renovating a house instead. The migration lessons are the same. Your progress saves as you go, so you can stop at any level and pick up where you left off.
Why a Game
Most migration failures aren't caused by code nobody understands. They come from decisions that looked sensible at the time: we'll map the shared services later, we'll test properly so we don't need a rollback, the currency sign doesn't matter. Each one feels small. The cost shows up weeks later, in production, and it's hard to trace back to the decision that caused it.
A game closes that loop. You make the call, and a few minutes later you see what it cost. Every point you lose in Strangler Fig City traces back to a skipped step, never to the code itself. That's also the most honest one-line summary of real migrations we know.
The City Is Your App
The board is a three-by-three city with eight units on it:
| Building | Kind | Depends on |
|---|---|---|
| Store | Data service (hidden) | Nothing. Others depend on it |
| Auth | Session service (hidden) | Nothing. Others depend on it |
| Search | Component | Store |
| Cart | Route | Store |
| Login | Route | Auth |
| Profile | Route | Auth |
| Orders | Route | Store, Auth |
| Footer | Component | Nothing |
Six of those are on any screen list a product manager would write. Two aren't: Store and Auth start hidden under fog. They're also the two everything else leans on. That's not a contrivance for the game. It's the shape of almost every legacy frontend we've migrated: a global store, a session service or an event bus that never shows up on a sitemap but that half the app reads from.
Twelve Levels, One Road
The game is a level map. Each level you clear unlocks the next and earns up to three stars, and the buildings along the road turn from orange to blue as you go. The first four levels get you ready. The last eight are the migration itself:
| Level | Name | What you do | Phase |
|---|---|---|---|
| 1 | City Hall check-in | Tell the Mayor your current stack and your target, and get your City Pass | Setup |
| 2 | Skill check | A short quiz on the framework you picked | Setup |
| 3 | Code preview | See each building's code before and after the move, side by side | Setup |
| 4 | Mission briefing | Get the keys to the city | Setup |
| 5 | Scan the city | Find the hidden wiring | Scan |
| 6 | Blueprint | Put foundations first | Blueprint |
| 7 | Big calls | Strategy, rollback and shared data | Blueprint |
| 8 | Build beside | Port it unit by unit | Build |
| 9 | Incident! | Handle live alerts in production | Build |
| 10 | Parity patrol | Spot every difference | Inspect |
| 11 | Demolition day | Retire the old code | Demolish |
| 12 | Grand opening | Your migration report | Report |
The code preview in Level 3 is worth a minute even if you skip everything else. It shows Login, Cart and the rest written in the framework you picked and again in your target, so the move stops being abstract before you plan it.
Five Phases, Five Real Steps
Under the levels, the game follows the same five steps we use on client projects: Scan, Blueprint, Build, Inspect, Demolish.
You move between levels on the City Map, a road that winds from Old Town to the new city. Cleared levels show a tick and their stars, the level you're on is marked with the Mayor's pin, and the ones ahead stay locked. A bar across the top counts your stars and levels cleared and shows the move you picked. Inside each level, a strip above the board shows the level number and your city health. Real migrations need the same thing: a status everyone can read at a glance, so nobody has to ask what's finished and what's still legacy.
1. Scan: the inventory
You tap clouds to reveal the buildings under them. Most appear straight away. Some only give off a faint signal, and you have to tap again to deep scan. Those are Store and Auth.
Before you start, the Mayor asks where migrations usually get blindsided. The answer the game wants is "shared services and global state nobody drew on a diagram". Screens are the easy part because they're on every list. The surprises live underneath them.
The real-world lesson: an inventory is not a list of routes. It's a list of routes plus everything they reach into: stores, services, globals, event listeners, monkey-patched prototypes. If you skip the deep scan in the game, the unit stays unmapped and costs you 12% city health later, in the Build phase, when a screen moves without the service it needs. The log tells you exactly why: "Inventory gap: Store was never mapped, so Search, Cart, Orders moved without it." That's the most expensive penalty in the game, and on real projects it's the most expensive mistake too.
2. Blueprint: the plan
You drag the eight units into the order you'll rebuild them. A red pill appears on any unit placed before something it depends on. Put Cart above Store and the game flags it at once.
The real-world lesson: foundations go first. A screen can only move once the services it uses exist on the new side. Move a screen before its foundation and it ends up talking to two different versions of the truth. In the game that costs 8% per unit, and the log reads "Users hit a short hiccup." In production the hiccup is a cart showing three items on one page and two on the next.
Then the Mayor brings three questions every migration team argues about:
| Question | The right call | Why the others lose points |
|---|---|---|
| How do we move? | Strangler fig: one unit at a time behind a router | A feature freeze stalls the business for months. A big-bang switch puts every risk on one night with no fallback. |
| How do we undo a bad release? | A router flag that sends traffic back to legacy in seconds | "Keep the old build tagged" means a slow, all-or-nothing redeploy. "We'll test properly" means a bug becomes an outage. |
| How do old and new share data? | One source of truth, with a bridge both sides talk to | Separate copies drift apart. Moving the Store last forces every new screen to reach into legacy state. |
When you lock the plan, the game says "A router now sits in front of the city, so old and new can run side by side." That one sentence is the whole strangler fig pattern.
3. Build: the port
Each React building goes up beside the old one, not on top of it. A bar under every building fills from orange to blue as the router moves users across. The old building keeps working the whole time.
Each move has three steps: check before, move, check after. The checklists are specific to each unit, and they're the ones we actually use. For Login: write down the cookie name, token shape and expiry; make sure both apps can read the same session; check that the wrong-password message is identical; confirm password managers still autofill. For Cart: write down price, tax and rounding rules, because currency and rounding are where carts quietly differ. You can skip the checks. It costs 2% each time.
You also choose canary or all at once. With a canary, 10% of users get the new building first. If something is slightly off, only that 10% sees it. All at once, everyone does. The log spells it out: "No canary: Cart had small differences, and every user hit them at once instead of 10%."
Then Level 9 fires three live alerts, one after another. Each is a real production incident we've seen on migrations:
| Alert | The right call | Why |
|---|---|---|
| Errors on a freshly moved unit jump to 3% | Flip traffic back to legacy, then fix calmly | Users are back on the working version in seconds. Hot-fixing under fire keeps 3% of requests failing, and rushed fixes cause new bugs. |
| Search now takes 2 seconds instead of feeling instant | Compare old and new on the same queries, and flip Search alone back if it's slower | Measure first, then use the per-unit switch. Rolling the whole app back throws away every unit that works fine. |
| Old Orders page shows 3 items in the cart, new Cart page shows 2 | Two copies of the data are drifting. Point both sides at the one shared Store | It isn't a cache or CSS problem. Old and new must read one source of truth, and drift shows up on screen first. |
The kill switch and shared Store you chose in Level 7 are what make the calm answers possible. A rollback you can run in 30 seconds turns an incident into a blip.
4. Inspect: parity
This is the phase people underestimate, in the game and in real life. You see the old version and the new version of a unit side by side, line by line, and you tap every line in the port that doesn't match the original.
| Unit | Line | Legacy | React port | Kind of gap |
|---|---|---|---|---|
| Cart | Order total | $40.00 | 40 | Data |
| Cart | Checkout button | Buy now | Pay | Markup |
| Login | Wrong password | Shows "Wrong password" | Shows a general sign-in error | Behavior |
| Login | Field order | Email, then password | Password, then email | Markup |
| Orders | Status after save | Updates at once | Updates on next page load | Timing |
Five gaps, mixed in with lines that match exactly. None of them would fail a compile or a typical unit test. Every one of them would generate a support ticket. These are the four kinds of drift we check on every real port: data, markup, behavior and timing.
The Mayor's questions here are about judgment, not just spotting:
- The cart total is missing its currency sign. Fix it before cutover? Yes. Match the old behavior first and improve later. Finance, support and international users all read that sign.
- Who signs off that the Login port really matches? Automated parity tests plus a product owner. The person who wrote the port is the one most likely to miss their own blind spots.
- A PM says users will like that order status now updates on the next page load. Keep it? No. Keep the old timing now and propose the change as its own release. Quiet behavior changes inside a migration break habits and scripts people rely on.
Tapping a line that matches is free, so the game rewards looking closely over guessing.
5. Demolish: the cutover
Everyone is on React. Now you retire the old buildings. If you missed a parity gap in Inspect, this is where it surfaces, because removing the old copy removes the fallback. The log reads "Missed in review" for each gap you let through, and each costs 6%.
The final question: when is it safe to delete the old code? The game's answer is after parity is proven and both versions have run side by side for a while, with the kill switch kept until then. That soak period catches the rare, slow bugs while there's still somewhere to fall back to. "Never, keep both just in case" loses points too. Two codebases forever means double the bugs, double the upkeep and a migration that never ends.
What the Score Actually Measures
You start at 100% city health. A grade of A+ needs 95% or more. Here's the full penalty table:
| Mistake | When it shows up | Cost |
|---|---|---|
| Unit never mapped | Build | −12% |
| Unit moved before what it needs | Build | −8% |
| Parity gap not flagged | Demolish | −6% |
| A risky migration call | Any phase | −2% to −10% |
| Skipping a before or after check | Build | −2% |
| Tapping a line that matches | Inspect | Free |
Notice the column in the middle. Mistakes don't cost you when you make them. They cost you later, in a different phase. An inventory gap from phase 1 shows up in phase 3. A parity gap from phase 4 shows up in phase 5. That delay is exactly what makes real migrations hard to steer, and it's why the order of the work matters so much.
A perfect run means finding all eight units, moving Store and Auth first, flagging all five parity gaps and making every call right. It's very doable. It just doesn't allow shortcuts.
Save, Learn and Share
Five minutes is the target, but meetings happen. The game is built so you can stop, come back, read deeper and challenge your team.
Your city is saved
Progress saves in your browser after every move. That covers the frameworks you picked, your skill-check answers, the code preview, your stars and every level. Come back later and the title screen offers Continue at the exact level you left. Start over clears it.
In Level 1 the Mayor prints your City Pass. Give it your work email and it saves your progress across all 12 levels, and we send you the free MigrateX migration guide for the move you picked.
Go deeper on each phase
Every level that plays a phase ends with a short Go deeper box linking to the MigrateX writing behind it. Scan points to our guide on choosing a migration strategy and to the open-source cbx-plugins. Blueprint points to the modernization mistakes post and the Shopify lessons. Build shows the migration guide for the framework you picked, Inspect points to AI agents for QA and our parity-tested examples, and Demolish to multi-agent modernization and Martin Fowler's original Strangler Fig article. The results screen collects all of them.
Share your score card
You can share your progress at any point, and the results screen asks you to challenge your friends and colleagues. Each share comes with a score card image drawn from your own run: your grade, city health, frameworks, incidents and a skyline that turns from orange to blue as you migrate. Share it straight to LinkedIn, X, WhatsApp or email, copy the link, or download or copy the image to attach to your post. On a phone, your share menu works too.
The Glossary, in One Place
These are the terms the game uses as you play. They work well as a shared vocabulary for a team about to start a migration:
- Unit: one piece that moves on its own: a route, a component or a service.
- Strangler fig: grow the new app around the old one and move traffic over piece by piece.
- Router: sends each request to the old or new version, so both run at once.
- Canary: send a small slice of users to the new version first, then widen.
- Kill switch: a flag that sends traffic back to legacy in seconds.
- Parity: the port matches its original in behavior, markup, data and timing.
- Soak: time both versions run side by side before the old one is deleted.
- Cutover: the moment legacy code is retired for good.
- Big-bang: rebuild everything separately, then switch all at once.
About MigrateX
MigrateX is our software and services platform for moving software, data and infrastructure from one technology to another. It brings automation and experienced engineers together, so the repetitive work gets done quickly and the tricky decisions get the human attention they need.
Strangler Fig City is a small version of how we run migrations with MigrateX. Here's what each phase looks like on a real codebase:
- Assessment (Scan). We map every route, component, service, endpoint, background job and piece of hidden wiring, including the Stores and Auths nobody drew on a diagram. You get a clear picture of where the effort really sits before anyone commits to a timeline.
- Migration plan (Blueprint). Together with your team, we build the dependency graph that puts foundations first, decide what each piece becomes on the new stack, mark what can simply be deleted, and agree on the router, the kill switch and the shared data layer.
- Step-by-step migration (Build). Each piece moves behind a switch you can turn off, with a canary before full traffic. Automation handles the repetitive parts. Our engineers handle the parts that need judgement, like state design and the bridge that lets old and new share one site.
- Proof that it works (Inspect). The same UI and API tests run against the old and the new version, and a piece only counts as migrated when it passes on both. Behavior, markup, data and timing differences get flagged before cutover, not after.
- Handover and clean-up (Demolish). We keep a way back until traffic is quiet, then remove the old code, the switches and the temporary glue, and leave your team with a codebase they know and own.
What you get along the way:
- No big-bang release. Your app keeps running and shipping features while the migration happens in the background. The city never closes.
- Less risk. Shared tests, feature flags and a way back mean users don't notice the move, and you can pause at any point.
- A team that's ready. We pair with your developers throughout, so they're comfortable with the new stack long before the last legacy screen is gone.
- More than front ends. The same approach covers backends (Java, Python, Node.js, COBOL, PHP, RPG) and cloud moves between GCP and AWS.
- Run it yourself if you prefer. Our open-source plugins for Claude Code, Cursor and GitHub Copilot follow the same method. Source at cobuild-tech/cbx-plugins.
Play Strangler Fig City, then share your score card with the person on your team who still thinks a big-bang rewrite will be fine. To see the method on real code, visit github.com/cobuild-tech/migratex-examples. Have a real city to move? Tell us a little about your app through Contact Us, or start with a MigrateX assessment, and we'll begin with a free conversation about where the effort is likely to be.
References
Migration strategy
- Strangler Fig, Branch by Abstraction, Vertical Slices: Choosing a Frontend Migration Strategy
- 10 Legacy Modernization Mistakes You're Making (and How to Avoid Them)
- 6 Software Migration Lessons from Shopify's 12-Week AI-Assisted Rewrite
- Modernizing Legacy Apps with RxJS: Streams as the Bridge Between Old and New
Frontend migration guides
- Moving from Angular to React: A Practical Guide
- Leaving Ember for React: What Your Conventions Were Hiding
- The Framework Nobody Wrote Down: Taking a Backbone App to React
- Who Updates the Total? Taking a jQuery App to React
- The State Is in the DOM: Taking a Vanilla JavaScript App to React
- One-Way vs Two-Way Binding: How Each Works and Migrating Both Ways
- Client-Side vs Server-Side Rendering: How Each Works and Migrating Both Ways
Backend migration guides
- Everything Is Static: Taking a Java Web App to Rust
- Everything Is an Array: Taking a PHP App to Rust
- The Program Is the Data Layout: Taking a COBOL System to Rust
Cloud migration guides
- AWS to GCP: compute, big data, serverless, storage
- GCP to AWS: compute, big data, serverless, storage
- When Terraform Plans Lie: Two GKE Issues and How to Catch Them
AI-assisted modernization
- 10x Your Modernization Efforts With Multi-Agent Teams
- Techniques for Making AI Agents Your QA Team for Reliable Modernization
Source code and further reading
- CobuildX AI. cbx-plugins: open-source Claude Code, Cursor and Copilot plugins for frontend migrations. https://github.com/cobuild-tech/cbx-plugins
- CobuildX AI. migratex-examples: reference migrations with the original app, the port and the parity tests. https://github.com/cobuild-tech/migratex-examples
- M. Fowler. Strangler Fig. martinfowler.com, 22 August 2024 (first published 2004). https://martinfowler.com/bliki/StranglerFigApplication.html
CobuildX helps teams migrate legacy applications and cloud infrastructure with MigrateX.
Originally published on the CobuildX blog.








