Choreo - a graph based diagram design and analysis tool

I’d love to share Choreo — a code-first toolkit designed to help map, visualize, and run metrics on your system architectures.

Choreo embraces the idea of architecture as data. You describe your workflows, pipelines, or data paths declaratively in Elixir, and Choreo builds them up using Yog underneath.

You get both customizable Graphviz DOT layouts, and utilize the built-in architectural validation and analysis.

Supported domains out of the box:

  • Finite State Machines (Choreo.FSM): Trace state transitions, detect terminal dead-ends, and identify unreachable states.
  • Workflows (Choreo.Workflow): Map out critical execution paths, identify latency bottlenecks, and verify Saga pattern constraints (e.g. ensuring compensation paths safely reach termination targets).
  • Data Pipelines (Choreo.Dataflow): Simulate backpressure scenarios, measure stage constraints, and flag unhandled error branches.
  • Dependency Trees (Choreo.Dependency): Unpack cyclic bottlenecks, clean transitive bloat, and compute Uncle Bob’s structural Instability Metrics.
  • Threat Models (Choreo.ThreatModel): Run stride evaluations automatically over mapped vectors.

Quick Example:

alias Choreo.FSM

fsm =
  FSM.new()
  |> FSM.add_state(:cart, initial: true)
  |> FSM.add_state(:processing)
  |> FSM.add_state(:completed, final: true)
  |> FSM.add_state(:failed, final: true)
  |> FSM.transition(:cart, :processing, "checkout")
  |> FSM.transition(:processing, :completed, "success")
  |> FSM.transition(:processing, :failed, "error")

# Export stunning diagrams with theming
IO.puts FSM.to_dot(fsm, theme: :dark)

Give the documentation a spin or check the source repo:

I am actively working with it and bug-fixes will be made, and new features will be added frequently.

1 Like

I checked FSMs and I wonder what does mean plural initial states? It kinda violates everything I know about FInite Automata.

1 Like

I thought it would make it possible to model NFA too.

But that being said, this does reveal a shortcoming - the function deterministic? would return false if you have multiple initial states, so a MapSet.size(FSM.initial_states(fsm)) == 1 is missing.

Thanks for noticing this.

Added a few LiveBooks here.

The documentation still needs a lot of improvements. And I will be trying to learn from Mingrammer and pytm and see if I can update any features or non-trivial cases.

Large diagram generation sucks though.