andersch.dev

<2025-03-26 Wed>

Mermaid

Mermaid is an open-source JavaScript diagramming and charting tool that uses a plain-text, markdown-like syntax to define diagrams.

The diagram types include flowcharts, sequence diagrams, ER diagrams, pie charts and git graphs.

Many platforms (e.g. GitHub and GitLab) automatically render Mermaid diagrams embedded in Markdown files and the Mermaid JS library can be integrated into a web app to generate diagrams dynamically. The tool mermaid-cli can be used to generate diagrams on the terminal.

Flowchart Example

graph LR
    A[Start] --> B{Is it?};
    B -- Yes --> C[OK];
    B -- No ----> D[Not OK];
    C --> E[End];
    D --> E;

Resources