Athas Boilerplate

API Interfaces

shared

Contract-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

  • public
  • client
  • admin

Each namespace must map to explicit projection schemas.

Contract-first flow

  1. Define schemas/contracts in @athas/contracts.
  2. Implement backend handlers against shared contracts.
  3. Consume typed clients from frontend feature APIs.
  4. keep projection policy checks enabled in CI.

OpenAPI surfaces

  • /api/openapi.json (HTTP)
  • /api/orpc/openapi.json (oRPC)

Detailed policy: docs/architecture/32-api-architecture.md.

On this page