Layout
frontend/docscontains the Mintlify sitedocs/api-spec.openapi.yamlis the shared OpenAPI source of truthfrontend/docs/openapi/public-api.openapi.yamlis the mirrored file Mintlify reads
Why the OpenAPI file is mirrored
Mintlify expects repository-local OpenAPI files for generated API pages. This starter keeps the actual source of truth in the repo-leveldocs/ folder so it can be reviewed alongside backend changes and reused outside the docs app.
The docs app mirrors that file through frontend/docs/scripts/sync-openapi.mjs.
That gives you a workable split:
- edit the shared source in
docs/api-spec.openapi.yaml - sync it into the docs app before previewing or committing docs changes
- let Mintlify render the mirrored file
Initial API surface
The starter spec is deliberately small and covers onlypublic-api:
GET /healthGET /readyGET /v1/metaGET /v1/public/token-infoGET /v1/public/tenant-info
- shared health and metadata routes
- bearer-token auth
- success/error response envelopes
- multi-tenant public ID payloads
Backend files that anchor the spec
backend/cmd/public-api/main.gofor route behavior and payload fieldsbackend/internal/apiserver/router.gofor shared service routesbackend/internal/platform/respond.gofor the standard response envelopebackend/internal/auth/api_token_middleware.gofor bearer-token auth and failure modes