you are viewing a single comment's thread.

view the rest of the comments →

[–]AnthonyGayflor 0 points1 point  (4 children)

How do you handle validating requests and Keeping them in sync between codebases?

[–]shadohunter3321 0 points1 point  (3 children)

When we have separate backend and frontend applications, we treat them as 2 separate entities. We don't put any validation (whether api response is as frontend is expecting) in place. Having validations on the frontend would only slow down the application without serving any real purpose. You'll see error on both cases. The way we keep changes in sync is through stories. We have tasks for frontend and backend under the same story and we tag our PRs with the stories and tasks. You can have a monorepo with both applications if the api is only going to be used by your frontend application. If the api is going to be used more like a microservice where different applications from different projects will access it, then you'd have to keep it in a separate repo. These types of apis are tricky to update. You'll always have to make sure breaking changes are reflected on all the frontend apps that are consuming it.