Convert

Convert a Mermaid flowchart into an architecture diagram.

Mermaid gives you the graph. What it cannot give you is tiers, icons, and a layout that survives the diagram growing.

Download for macOS
v0.1.33 · .dmg · Apple Silicon & Intel
Signed & notarized by Apple · opens without a Gatekeeper warning
sha256 698955a0187bc039f4c74f5d05a9f10fbb27376a45788a0a241d1326b73873c7
Download for Windows instead
$curl -fsSL https://lucidtrain.com/install.sh | sh

From a flowchart to an architecture

A Mermaid flowchart of a system is a graph without semantics: every node is a box and every edge is an arrow. Converting adds the things an architecture diagram needs, which are tier assignment so dependency direction is visible, real service icons so components are identifiable at a glance, and a solver-computed layout that keeps working as nodes are added.

Tiers are the addition that matters

Grouping nodes into client, edge, application, data and external means a reader knows which way dependency flows before reading a label, and an upward edge looks wrong immediately. Mermaid has subgraphs, which can approximate this, and no notion that the groups are ordered.

Keep Mermaid where it fits

For a small diagram in a README that renders on GitHub, Mermaid is doing its job and converting is a downgrade. This is for diagrams that have grown past what its layout can render legibly.

Fidelity

Comes throughDoes not
Nodes and labelsYes
Edges, direction and labelsYes
SubgraphsBecome sections or tiers
Tier assignmentAdded, inferred from namesNot present in the source
Service iconsAdded, matched by nameNot present in the source
classDef stylingReplaced by tier colouring
LayoutRecomputed, deliberately

The prompt

shell
$ Convert this Mermaid flowchart into an architecture diagram: assign tiers, add service icons, and lay it out.
FAQ

Questions

Will it guess tiers correctly?

Usually, when names are descriptive. Anything ambiguous is worth correcting, which is a single edit to the graph.

Can I go back to Mermaid?

The agent will write Mermaid from the graph, so the structure survives. Tiers, icons and layout do not, because Mermaid cannot express them.

What about Mermaid's newer architecture diagram type?

It reads fine as a source. The same limits apply: its layout is built in, and icons come from a fixed set.

Related