Designing APIs
In Chapter 3, Architecting an Enterprise App, I cover the importance of a stateless, data-driven design as part of Router-first architecture. As part of this goal, I highlight identifying major data entities that your app will operate around as an important activity. It’s no mistake that API design also greatly benefits by designing around major data entities.
In full-stack development, nailing down the API design early on is important. If your frontend and backend teams can agree on major data entities and the shape of those entities, then both teams can agree on a contract to go off and build their own respective pieces of software. In Router-first architecture, I highlight the importance of leveraging TypeScript interfaces to quickly stub out the architecture of your app. Backend teams can conduct similar activities.
A little bit of early design work and agreement ensures integration between these components can be established very early on, and with...