Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

Keep the editable source for each architecture diagram in the same repository as the code and documentation it describes, and change that source in the same pull request that changes the architecture. Text-based diagram sources can be versioned, diffed, reviewed, and reverted like any other file, which makes architecture changes visible to the people reviewing code. That is the real benefit. A Git history does not prove that a diagram still matches the deployed system. Someone or something still has to notice when the system changes and update the picture.

What repository placement gives you, and where it stops

Diagrams that live in a slide deck or a binary image export drift because nothing ties them to a change. Once the diagram source is plain text in the repo, the normal development loop can cover it:

  • Visible changes. A reviewer sees the added service, the removed queue, or the new data flow as a line in the diff.
  • Recoverable history. You can see when a boundary moved and which change moved it.
  • Co-located context. The diagram sits next to the README, ADR, or service docs that explain why it looks the way it does.

What repository placement does not give you is automatic accuracy. Diagram source is editable and versionable, but synchronization with the running system requires a process (a review habit, an owner, a trigger) or tooling. Treat the repo as the place where drift becomes visible, not as a guard against drift.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Choose the format your documentation host can render

The three formats most often used for this approach differ in what they describe and in how much of the rendering chain you must control. The table below compares them on the points that matter when choosing.

Option Strong fit Workflow to explain Trade-off to mention
Mermaid Teams that want diagrams embedded in Markdown and rendered by their repository host Commit Markdown containing a Mermaid code block and review it alongside the documentation change Rendering and syntax support depend on the host and the Mermaid version it runs. The Mermaid project’s architecture-diagram syntax page is titled for v11.1.0 and later.
PlantUML Teams that prefer PlantUML notation or want diagrams in separate source files Keep the .puml source in the repo and include or render it through the documentation platform Platform configuration and renderer support must be verified. GitLab’s Markdown documentation says PlantUML can be included from separate files.
Structurizr DSL Teams that want one architecture model from which several views can be produced Author a workspace file, version it, then view or export diagrams; exports can feed Mermaid or PlantUML workflows More concepts to learn, and an export step before the output renders in the destination. Structurizr’s own comparison notes the learning curve and says export adds slower feedback.

When comparing options for your team, test each one against five questions:

  • Does the destination render the format directly, or does it need an export step?
  • Do you need a shared model across several diagrams, or a set of standalone diagrams?
  • How easily can a reviewer read the source in a pull request?
  • How fast is the feedback loop, including any export?
  • Can your actual architecture be expressed without awkward workarounds?

Format notes

Mermaid

Mermaid lets authors describe diagrams in text, and it is the simplest option when the diagram should sit directly inside a Markdown page. GitLab’s GitLab Flavored Markdown documentation states that its Markdown support uses Mermaid version 11, and that it documents both Mermaid and PlantUML support. GitHub Markdown has also supported Mermaid rendering, but hosts and versions change, so confirm the behavior on your own instance before you rely on a specific syntax. Mermaid’s architecture diagram syntax documentation covers the architecture-specific diagram type and is titled for v11.1.0 and later.

PlantUML

PlantUML suits teams that already use its notation or want diagram sources as separate files rather than inline blocks. The advantage is that a diagram can be kept as its own file and included from one or more pages. GitLab’s documentation says PlantUML can be included from separate files, which fits this pattern. Verify the renderer configuration on your platform before you assume a file will display in the rendered page.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Structurizr DSL

Structurizr is a models-as-code approach built on the C4 model. Instead of drawing each picture separately, you describe the people, software systems, containers, and components once in a workspace file, and then define views over that model. Structurizr’s documentation describes storing DSL workspace files in version control and exporting views to Mermaid or PlantUML. That export step is the key workflow detail: the model is authored in Structurizr, and the Mermaid or PlantUML output is what your documentation host renders. Keep that distinction clear in your team docs, because a diagram written directly in Mermaid and a Structurizr view exported to Mermaid have different maintenance paths. Structurizr’s documentation home page also describes embedding workspace diagrams in supplementary technical documentation, which is useful when the prose must sit beside the picture.

The Structurizr “as code” page is written by the Structurizr project and describes the approach as version-control friendly. It is vendor-authored, so read its claims about relative advantages as the vendor’s position.

A workflow that keeps diagrams in review

The following sequence works with any of the three formats. Adjust the details to your platform.

  1. Pick the smallest useful scope. Start with a system context, a container or service view, a deployment view, or a focused request or data flow. Avoid one all-encompassing diagram, because it becomes hard to review and hard to keep correct.
  2. Put the source beside what it explains. A diagram of one service’s flow can live in that service’s docs directory. A system-wide view can live in a clearly named architecture docs directory. This placement is a team convention, not a requirement of any tool.
  3. Change the diagram in the same pull request as the architecture change. Review the source diff and, where your toolchain lets you, the rendered output. If the diagram is generated from a Structurizr workspace, review the workspace change and the exported output together.
  4. Add a syntax or render check to CI if your format and host make it practical. This is a recommendation. Whether a universal checker exists depends on your toolchain, and no single validation setup is established for all three formats.
  5. Name an owner or a review trigger for high-level diagrams. Revisit a system-level diagram when its interfaces, dependencies, deployment boundaries, or data flows change.
  6. Keep the rationale in prose next to the picture. A diagram shows structure well and rarely records why a decision was made. Write that in an ADR or the service’s README, and link to it from the diagram’s page.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Signals that a diagram has gone stale

Because nothing automatic flags drift, reviewers should look for these signs during a pull request or a periodic docs review:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • A new service, queue, database, or external dependency appears in code but not in the relevant diagram.
  • A deployment boundary changes, such as a service moving to a different network zone or cluster, while the deployment view stays the same.
  • A data flow changes direction or gains a new hop, but the flow diagram still shows the old path.
  • The diagram source has not changed in a long period while the code it describes has changed often.

Limits to state in your team’s documentation

  • Do not describe diagram source as staying in sync with application code. It stays editable and reviewable; the sync is a practice your team maintains.
  • Do not assume Mermaid or PlantUML renders identically across Git hosts or versions. Check each target platform.
  • Keep Structurizr-exported diagrams distinct from hand-written Mermaid or PlantUML in your conventions, since they have different authoring and export steps.
  • Treat CI validation as a conditional recommendation. Embedding, rendering, and export workflows are documented for these tools, but no single universal validation setup is.

Used this way, text diagram sources give a team a concrete place to review architecture change. The gain is the review, not a promise that the picture stays right on its own.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.