MermaidDiagramExporter

MermaidDiagramExporter

Generate Mermaid class diagrams from C# source using Roslyn. CLI + an interactive Avalonia GUI with a Sugiyama-style layout engine and a Design Mode for authoring diagrams from scratch.

MermaidDiagramExporter analyzes C# at the source level — no build required — so it works on any folder of .cs files. It extracts types, members, and relationships (inheritance, interface implementation, associations) and produces a Mermaid class diagram grouped by namespace.

The CLI writes .md or .mmd files. The GUI features an interactive graph canvas with pan/zoom, a minimap, namespace-based filtering, focus-based subgraph navigation (D1/D2/D3 depth), symbol search, manual node rearrangement in analyze mode, and export to PNG/.mmd/.md/clipboard.

On the inside, the layout is a Sugiyama-style layered pipeline with separate passes for cycle removal, layer assignment, crossing reduction, and coordinate assignment, plus a force-directed alternative, cluster-aware edge routing, and a compound (clustered) layout engine. A Design Mode lets you author class diagrams from scratch with undo, serialization, and an LLM generation dialog.

Key features

Stack

C#.NET 9RoslynAvaloniaSkiaSharpMermaidDotNetxunit

Gallery

← All projects