Athas Boilerplate

Backend Module Workflow

external-ready

Contract-first flow for creating and wiring backend modules.

  1. Scaffold API/feature slice first when possible.
  2. Implement domain/application/infrastructure layers.
  3. Wire module providers and ports in Nest module.
  4. Bind adapters through contract-first oRPC router.

Fast-path commands

bun run scaffold:orpc --audience admin --name reports-list --method GET
bun run scaffold:vertical-slice --audience admin --capability reports --name list --method GET

Layer boundaries

  • domain: entities, value objects, domain errors/events
  • application: use cases + ports
  • infrastructure: repository/provider implementations
  • interface: transport adapters

Verification

bun run typecheck
bun run check:contract-first
bun run check:projection-policy
bun run depcruise:backend

See complete reference in docs/guides/creating-a-module.md.

On this page