Skip to Content
Documentation maintenance

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

ChangeRequired documentation
Endpoint, request, response, or erroropenapi/openapi.yaml, examples, relevant API SRS section
Domain term or relationshipCONTEXT.md and relevant API SRS model section
Order/payment transitionAPI SRS workflow section, OpenAPI enums/errors, architecture note if ownership changes
Module or dependency directiondocs/ARCHITECTURE.md and API SRS repository/module sections
Setup, command, environment variableREADME.md and .env.example when created
Database schemaMigration plus model/contract documentation when externally meaningful
Operational processRunbook under docs/runbooks/ when operations are implemented
Material docs decisiondocs/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:check

npm 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.