706 B
706 B
API File Structure (Strict)
This document defines the canonical physical structure for apps/api/**.
It describes where code lives, not the full behavioral rules.
1) API is feature-based
The API is organized by feature modules.
apps/api/
src/
domain/
shared/
Within feature modules:
apps/api/src/domain/<feature>/
<Feature>Controller.ts
<Feature>Service.ts
<Feature>Module.ts
dto/
presenters/
2) What belongs where (strict)
- Controllers: HTTP boundary only
- DTOs: HTTP contracts only
- Presenters: map Core results response DTOs
API flow rules: