API Interfaces
sharedContract-first API model using oRPC for first-party and HTTP/OpenAPI for external consumers.
Interface strategy
- oRPC is primary for first-party apps.
- HTTP/OpenAPI remains available for external integrations and webhooks.
- both adapters call the same application/use-case layer.
Audience model
publicclientadmin
Each namespace must map to explicit projection schemas.
Contract-first flow
- Define schemas/contracts in
@athas/contracts. - Implement backend handlers against shared contracts.
- Consume typed clients from frontend feature APIs.
- keep projection policy checks enabled in CI.
OpenAPI surfaces
/api/openapi.json(HTTP)/api/orpc/openapi.json(oRPC)
Related deep reference
Detailed policy: docs/architecture/32-api-architecture.md.