This library provides automatic facilities for Structurizr views. It's a wrapper around the Graphviz tool, which allows you to apply the Graphviz layout algorithm to the views in a Structurizr workspace.
You will need Graphviz installed.
For example:
Workspace workspace = ...
GraphvizAutomaticLayout graphviz = new GraphvizAutomaticLayout();
graphviz.apply(workspace);The structurizr-autolayout library does the following for every view in the workspace:
- Export the view to a DOT file.
- Run Graphviz (via the
dotcommand), with the output format set to SVG. - Parse the generated SVG to extract layout information, and apply this to the Structurizr view (element x,y positions, relationship vertices, and paper size).