Request-to-contract path
Route code is the visible part; the hard boundary is the ordered policy chain before and around it.
- requestContexttrace IDs, correlation, dependency injection
- security + rateLimitheaders, dynamic CORS, token buckets
- tenant + idempotencytenant extraction, mutation dedupe
- route groupsadmin, ai, billing, events, legal, webhooks
- OpenAPI + Inngesttyped clients and background sync jobs
What it owns
- BFF routing, OpenAPI generation, middleware order, and tenancy extraction
- Gateway-level rate limiting, idempotency, audit logging, and versioning
- Typed API contracts consumed by web and generated clients
Where it stops
- Backend policy lives in middleware, not duplicated in each route.
- Apps do not bypass the gateway for tenant-sensitive operations.
How we know it works
- OpenAPI generation, gateway route tests, and release verification scripts
- api-reference docs and dashboard typed-client integration