Published: Last updated:

C4 Model and Docs-as-Code

Architecture diagrams go stale quickly. The C4 Model provides a standardised method for describing systems at different levels of abstraction (Context, Containers, Components, Code).


Core Concept

Diagrams are created as code (e.g. via Mermaid or PlantUML) and maintained directly in the Git repository alongside the source code (Docs-as-Code). This ensures that documentation remains part of the development process.

Application

  • Level 1 (Context): Who uses the system and which external systems are connected?
  • Level 2 (Container): Which applications (web, API, DB) make up the overall system?
  • Mermaid Integration: Visualisation directly in Markdown files for seamless integration with Grav.

Related Topics