One Express backend serves 13+ different apps. The reason it doesn't break them all at once is 17 contract tests.
One backend, 13+ apps, contract tests
One Express backend serves 13+ different apps. The reason a change to it doesn't break all of them at once is 17 contract tests.
Shared backends have a specific failure mode. Someone renames a field for app A, and app B's login silently dies in production three days later. Nobody connected the dots, because nobody could see the coupling.
Contract tests make the coupling visible and enforced. Each consumer app has a test that pins the exact shape it depends on: the fields it reads, the types it expects. Break the shape and the test fails in CI before the change ever ships. The backend can't quietly lie to its consumers, because the consumers wrote down what they were promised.
This is the difference between having an API and having an API contract. One is a hope. The other is a guarantee the build enforces.
If you run a platform where one API feeds many frontends, this is the safety net that lets you evolve it without a coordination meeting for every field.
Want the pattern for pinning API shapes in CI? Ask below and I'll break it down.