Five backends, one door
Their platform had grown into five separate services, each with its own login and its own idea of what a response looks like. The mobile app had to talk to all of them. I was the engineer closest to the client, so the integration was mine.
I put one typed layer over the whole thing, organised by subject rather than by service,
so the other developer could call api.auth.signIn() and never learn which
backend was behind it. When one of them changed, and they changed constantly, the fix
happened in one file instead of across every screen that touched it.
I did consider putting a real service in the middle, which is the textbook answer. But a sixth deployable, pointed at five moving targets, is a maintenance bill with no ceiling. The client-side layer took two weeks, added nothing to run, and gave us one place to absorb whatever they did next.
- 5 services behind one interface
- 2 weeks to build the layer
- <2 months for two of us to ship the app