Why DaC?#
Diagram as code (DaC) is particularly useful for creating technical diagrams, such as software architecture diagrams or system flowcharts.
Some benefits include:
Improved maintainability: Can easily update the code to reflect any change.
Collaboration: Easier for teams to work on diagrams together.
DaC Tools#
Here, I’m sharing 2 DaC tools: Python/Go library
and Mermaid
, that I use before.
Python/Go library
is a more comprehensive tool and is good for creating complex network diagram.
And Mermaid
is a simple JS library, and is often used with Markdown document.
And I’m also like to introduce a tool called ASCII flow
that does the opposite, which render the output as ASCII diagram.
Diagrams (Python/Go library)#
This is a Python
library that let us draw cloud system architecture in code.
It was created for rapid prototyping new designs without separate diagramming tools.
Diagrams
supports visualizing infrastructure across major providers and stacks: AWS, Azure, GCP and K8s.
It can model on-premise nodes, SaaS services, and even programming frameworks and languages.
If you prefer
Go
, there isGo-Diagrams
too.
Mermaid#
Mermaid
, a Javascript library, uses markdown-style text definition to create diagrams, flowcharts and visualizations.
The goal is to help documentation keep pace with developement.
It enables even non-programmers to create detailed visuals through the Mermaid Live Editor.
See the my blog post at Diagramming with Mermaid.
ASCII Flow#
ASCII FLow
allows us to draw diagrams visually or in text and then render the output as ASCII art.
It is a client-side only eb-based application for drawing ASCII diagrams.
There is a online version at asciiflow.com. Or get the source at GitHub.