Skip to content

den-diagram

den-diagram visualizes how den resolves aspects. It consumes the structured trace entries captured while den runs its fx pipeline, builds a format agnostic graph intermediate representation, and renders that IR into multiple diagram formats and fleet views.

It is organized as a five-stage pipeline, each stage with a single responsibility:

graph LR
  capture["Capture<br/>(in den)"] --> graph["Graph<br/>graph IR"]
  graph --> filter["Filter<br/>prune / fold / slice / diff"]
  filter --> render["Render<br/>mermaid · dot · plantuml"]
  render --> export["Export<br/>.md · .svg"]
  • Five-stage pipeline: Capture (in den) → Graph → Filter → Render → Export, each communicating through well defined data shapes
  • Format agnostic graph IR: nodes, edges, and entity kinds with no visual concerns baked in
  • Pure filter transforms, prune, fold, slice, and diff the graph IR as plain functions
  • Multi-format renderers, emit mermaid, dot, plantuml, and other diagram sources; theming and layout are render-time concerns
  • Derivation export, build .md and .svg outputs via mermaid-cli, graphviz, or plantuml, and assemble galleries
  • Minimal impurity, only the export stage touches pkgs; every other stage is a pure function over plain attrsets

den-diagram is den’s visualization companion. The capture stage lives in den because it drives the fx pipeline; everything downstream is den-diagram, making the otherwise-invisible aspect-resolution process auditable for debugging, documentation, and fleet overviews.

Source Code Support this project