Contributing to the documentation
This page explains how to contribute to the FirstBreath documentation (Docusaurus site in apps/docs).
Where to write
- English (source):
apps/docs/docs/— add or edit.mdfiles in the appropriate section (backend, frontend, vision, mobile, showcase, infrastructure, qa). - French:
apps/docs/i18n/fr/docusaurus-plugin-content-docs/current/— mirror the same folder structure and translate the content.
Structure and conventions
- Use Markdown (and MDX if needed). Diagrams: Mermaid (supported by the theme).
- Each doc should have a frontmatter with at least
sidebar_position(and optionallytitle,last_update: { date: "YYYY-MM-DD" }). - Avoid broken links: internal links use paths like
/docs/backend/overview/intro. Runnpm run buildto catch broken links (onBrokenLinks: 'throw').
Editing from the site
Each documentation page has an "Edit this page" link (or equivalent) that points to the repository. It uses the editUrl in docusaurus.config.ts (e.g. FirstBreath/FirstBreath-Platform/tree/main/apps/docs). Use it to open the right file on GitHub.
Local preview
From apps/docs:
npm install
npm run start
Open http://localhost:3000. For French: npm run start -- --locale fr then http://localhost:3000/fr/.
Adding a new doc
- Create the
.mdfile indocs/under the right section (e.g.docs/backend/guides/my-feature.md). - The sidebar is autogenerated from the folder structure; use
_category_.jsonin a folder to set its label and order. - If the doc is in French, add or update the corresponding file under
i18n/fr/docusaurus-plugin-content-docs/current/with the same path.
Full repo contributing
See CONTRIBUTING.md in apps/docs for clone, branch, and PR workflow specific to the docs app.