Source document · API/docs/DOCUMENTATION.md
API Documentation Maintenance
Documentation is part of the backend deliverable. Update it in the same change that updates behavior.
Ownership map
| Change | Required documentation |
|---|---|
| Endpoint, request, response, or error | openapi/openapi.yaml, examples, relevant API SRS section |
| Domain term or relationship | CONTEXT.md and relevant API SRS model section |
| Order/payment transition | API SRS workflow section, OpenAPI enums/errors, architecture note if ownership changes |
| Module or dependency direction | docs/ARCHITECTURE.md and API SRS repository/module sections |
| Setup, command, environment variable | README.md and .env.example when created |
| Database schema | Migration plus model/contract documentation when externally meaningful |
| Operational process | Runbook under docs/runbooks/ when operations are implemented |
| Material docs decision | docs/CHANGELOG.md |
Definition of done
A backend change is documentation-complete when a new contributor can determine:
- What behavior changed and why.
- Which module owns it.
- Which endpoint/event/schema changed.
- Which states and errors are possible.
- How to configure and operate it.
- Whether mobile/admin consumers must change.
Synchronizing the documentation site
From the workspace’s docs/ directory:
npm run docs:sync
npm run docs:checknpm run dev and npm run build automatically run synchronization first. docs:sync copies the source Markdown, updates the content manifest, and generates the Nextra MDX routes under docs/app/. docs:check exits unsuccessfully when generated site content is stale or OpenAPI paths differ from the Go router, making it suitable for CI.