Architecture and technical rescue ·Guide
Every client has its own version. How do you get back to one?
A product with a separate copy for each client
It starts as a favour: one client needs a slightly different workflow, so their copy is changed. Then another. A few years later every client runs its own version. A bug fixed for one is still live for three others, because the fix had to be carried to each copy and some were missed. Each new feature is built several times, and the team spends more time maintaining versions than improving the product.
The way back is one codebase, with each client's differences kept as configuration and a very small number of explicit extension points. I have worked on consolidations like this in production; they were what made the products stable again.
- Problem
- every client runs its own copy of the product, so a fix is carried by hand and some copies are missed.
- Deciding constraint
- no client may lose behaviour it depends on, and the business cannot stop building for long.
- Choice
- one codebase, each client's differences kept as configuration, and a very small number of explicit extension points.
- Result
- a fix is applied once, and every release is tested against every client's configuration.
If this is your situation
If fixes are applied more than once, or features are built per client, the first step is the list of differences, not of versions. It is usually shorter than anyone expects.
Architecture assessment → discuss a product with too many versions
For your technical team How it was diagnosed, the options rejected and why, what went wrong, and the decision record.
Context and scope
In scope: how to get from many copies to one codebase and keep it that way. Out of scope: what to charge for client-specific work, and rewriting the product. Assumption: the copies still share a common ancestor, and differ in fewer places than their history suggests.
Drivers
Constraints
- Clients depend on their differences and must not lose any in the move.
- The team cannot stop delivering for a long consolidation.
- Whoever changes a client's behaviour afterwards may be support staff, not only developers.
Scenarios
- When a bug is fixed, it is fixed once and every client receives it in the same release. Measured by fixes applied more than once per quarter, which should reach zero.
- When a client's configuration changes, the test suite runs it. Measured by the number of configurations in the suite against the number of clients.
- When a client needs a different step, it is configuration if it is a variant of the same process, and an extension point if it is not. Measured by the number of extension points, which should stay small.
- When a client moves onto the single version, its behaviour is compared with its old copy on real inputs. Measured by a comparison with every difference explained.
Options against those drivers
| Option | Stops the drift | Test surface | Who can change a client | Main drawback |
|---|---|---|---|---|
| Keep versions, automate merging | No | One suite per copy | Developers | Fixes still travel by hand |
| Feature flags | Partly | Grows with the flag combinations | Developers or support | Untested combinations |
| Configuration plus extension points | Yes | One suite, run once per configuration | Support for configuration, developers for extensions | Configuration must stay small |
The decision and how it works
Pick the most common version as the base, not the newest or the cleanest. Absorb differences one at a time into configuration. Sort them first: a different value (a limit, a text) is cheap, a different step is harder, and truly different behaviour is the rare, expensive case. Most copies differ in far fewer places than their history suggests, so list the differences, not the versions.
Two rules hold the design. Configuration stays declarative and small: anything that needs logic is an extension point. And every extension point is reviewed like any other change, never a copy.
How the move is made, and how it is undone
Move clients one at a time, starting with those closest to the base, checking each against its old behaviour before switching. Agree with the business that new features wait, or are built only on the single version. The time recovered is what pays for the consolidation.
To undo a move, keep the client's old copy frozen and runnable until the client has been through a full business cycle on the single version, month-end included. Going back means routing the client to that copy. The cost is that fixes made in the meantime are not in the frozen copy, so keep that window short.
How the decision is kept true
What to measure first: how many fixes in the last year had to be applied more than once, and how many were missed somewhere. That number is the business case, and it must fall to zero. After that: every client's configuration runs in the suite; the count of extension points stays small and is reviewed; and a review rule says a client difference is configuration or an extension, never a copy.
Where this usually goes wrong
| Risk | Likelihood | Impact | Mitigation | Owner |
|---|---|---|---|---|
| Configuration grows into a language nobody can read | High over time | Support cannot change a client safely | Keep it declarative and small; logic becomes an extension point | Tech lead |
| Only the default configuration is tested | High | The next release breaks one client silently | Every client's configuration runs in the suite | Developer |
| Everything is consolidated at once | Medium | Two worlds to support, and a stalled project | One difference, one client at a time | Tech lead |
| "Just this once" brings back the first new copy | High | The effort is undone | The review rule, enforced by whoever approves releases | Tech lead |
Operations, cost and scale boundary
To run: the configuration, owned by someone, with a schema that is versioned like code. To learn: which differences are configuration and which are extensions. Cost: the saving is the work no longer done several times, which is why the count of repeated fixes comes first.
Where the choice flips: if the list of extension points grows beyond a few, the product is really several products sharing a name. Then deliberately separate the genuinely different one, instead of letting it hide inside the core.
On a different stack
Nothing here depends on the language. Where configuration lives (a table, files in the repository) and how the suite iterates over it differ by stack; the rule that it stays declarative does not.
Architecture assessment → discuss a product with too many versions