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
dot
command), 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).
Once the layout has been applied, you can upload your workspace to the Structurizr cloud service/on-premises installation as usual.