Sobes.tech
Middle+

We have a large monorepo project with a unified release flow. We decided to split it and move the frontend to separate repositories with their own release cycle. This causes a version desynchronization problem between the backend and the client. How would you see a solution to this problem? How to organize work to be as protected as possible from failures in production?

sobes.tech AI

Answer from AI

Problems with version desynchronization between frontend and backend when splitting a monorepository can be addressed in several ways:

  • API versioning. The backend should support multiple API versions simultaneously so that old clients do not break when the server is updated.

  • Contracts and schemas. Use schemas (e.g., OpenAPI/Swagger) to describe the API and verify that the client and server conform to these contracts.

  • Integration tests. Automatically test the interaction between frontend and backend to identify incompatibilities before release.

  • Feature flags and gradual rollout. Allow new features to be enabled gradually and quickly rolled back if issues arise.

  • CI/CD with compatibility checks. Run tests against a stable backend version in the frontend build pipeline and vice versa.

Thus, the organization of work should include clear API versioning, automated tests, and communication between teams to minimize the risk of failures in production.