This commit is contained in:
2026-01-11 14:42:54 +01:00
parent 2f0b83f030
commit 90b6e73a22
27 changed files with 980 additions and 2513 deletions

View File

@@ -0,0 +1,38 @@
# Use Case Wiring (API) (Strict)
This document defines how the API wires HTTP requests to Core Use Cases.
Core contract:
- [`docs/architecture/core/USECASES.md`](docs/architecture/core/USECASES.md:1)
## 1) Non-negotiable rules
1. Controllers are transport boundaries.
2. Controllers validate request DTOs.
3. Controllers map request DTOs to Core inputs.
4. Controllers execute Core Use Cases.
5. Controllers map Core results to response DTOs.
## 2) Presenter meaning in the API
In the API, a Presenter is an output adapter that maps Core results to HTTP response DTOs.
Rule:
- API presenters are request-scoped. They must not be shared across concurrent requests.
## 3) Canonical flow
```text
HTTP Request DTO
Controller mapping
Core Use Case
Presenter mapping
HTTP Response DTO
```