Module 08 Summary
What this module established
One router per resource with the prefix declared once; services that hold the rules and import no FastAPI; repositories that touch storage. The middle constraint is what makes the logic portable.
Carry forward
- Services raise domain exceptions and routers map them to statuses in one place. The service never knows what a 404 is.
- Confine the provider to one client module. The service depends on a shape, which makes vendor changes and offline testing both cheap.
- Judge the structure by whether a newcomer finds the right file unaided.
Before moving on
Move on when a service function runs with no client and no app, and someone unfamiliar can answer three 'where does X go?' questions.
