Documentation¶
Describe architectures so that different audiences can understand them, and keep the descriptions current.
Entries are sorted by score from 1 to 10 (criteria): 9–10 start here or strongly recommended, 6–8 recommended, 1–5 further reading or conditional.
Adopted references¶
- 10 The C4 model (Simon Brown): our default for architecture diagrams. It has four levels: system context, container, component and code. The
c4-diagramskill uses it. - 9 arc42 (documentation): our default structure for architecture documentation. Use its sections as a checklist.
- 8 Diátaxis: how to split documentation into tutorials, how-to guides, reference and explanation.
- 7 Docs as Code (Write the Docs): treat documentation with the same tools and workflow as code.
Key rules¶
- 7
DOC-1Start with a system context diagram and a container diagram. Add component diagrams only where they add value. (C4 model, diagrams) - 7
DOC-2Store, version and review documentation alongside the code. (Write the Docs, Docs as Code, docs-as-co.de) - 6
DOC-3Give every diagram a title, a key or legend, and labelled, directed relationships. (C4 model, notation) - 6
DOC-4Keep diagrams as text in the repository so they can be reviewed and diffed. Use, for example, Structurizr DSL or Mermaid, which GitHub renders. Mermaid's C4 syntax is still experimental. (Write the Docs, Docs as Code, Structurizr, Mermaid C4 diagrams, GitHub, creating diagrams) - 5
DOC-5Use the C4 abstractions (person, software system, container, component) consistently, whatever the notation. (C4 model, abstractions) - 5
DOC-6Don't mix tutorials, how-to guides, reference and explanation in one document. (Diátaxis, The map)
Tutorials and further reading¶
- 10 The C4 model: the site includes FAQs, examples and tooling lists.
- 8 arc42 documentation and examples.