Structurizr
Fleeting- External reference: https://github.com/bensmithett/structurizr-mini
- External reference: https://docs.structurizr.com/
C4 model for visualising software architecture
diagram and documentation as code
Structurizr tooling encourages the adoption of a “diagrams and documentation as code” approach, with everything being stored in source code control
tools
- External reference: https://docs.structurizr.com/cli
cli
A command line utility designed to be used in conjunction with the Structurizr DSL, supporting pull/push via the web API and exports to a number of formats including PlantUML and Mermaid.
- push content to the Structurizr cloud service/on-premises installation
- pull workspace content as JSON
- lock a workspace
- unlock a workspace
- export diagrams to PlantUML, Mermaid, WebSequenceDiagrams, DOT, and Ilograph; or a DSL workspace to JSON
- merge layout information from one workspace into another
- list elements within a workspace
- validate a JSON/DSL workspace
- inspect a JSON/DSL workspace
structurizr mini
static site for C4 diagrams from a Structurizr workspace
It needs to export the workspace into a json file, making iteration annoying. It also generated messed up diagrams.
structurizr-site-generatr
-
External reference: https://github.com/avisi-cloud/structurizr-site-generatr
Static site generator for architecture models created with Structurizr DSL
docker run -it –rm -v $(pwd):/var/model ghcr.io/avisi-cloud/structurizr-site-generatr generate-site -w architecture.dsl
Status: Downloaded newer image for ghcr.io/avisi-cloud/structurizr-site-generatr:latest Exception in thread "main" java.io.FileNotFoundException: build/site/index.html (No such file or directory) at java.base/java.io.FileOutputStream.open0(Native Method) at java.base/java.io.FileOutputStream.open(Unknown Source) at java.base/java.io.FileOutputStream.<init>(Unknown Source) at java.base/java.io.FileOutputStream.<init>(Unknown Source) at kotlin.io.FilesKt__FileReadWriteKt.writeBytes(FileReadWrite.kt:108) at kotlin.io.FilesKt__FileReadWriteKt.writeText(FileReadWrite.kt:134) at kotlin.io.FilesKt__FileReadWriteKt.writeText$default(FileReadWrite.kt:134) at nl.avisi.structurizr.site.generatr.site.SiteGeneratorKt.generateRedirectingIndexPage(SiteGenerator.kt:38) at nl.avisi.structurizr.site.generatr.GenerateSiteCommand.execute(GenerateSiteCommand.kt:70) at kotlinx.cli.ArgParser.parse(ArgParser.kt:657) at kotlinx.cli.ArgParser.parse(ArgParser.kt:530) at nl.avisi.structurizr.site.generatr.AppKt.main(App.kt:13)
based on structurizr ui
browser-based UI […] shared across the Structurizr cloud service, the on-premises installation, and Lite.
structurizr lite
A single workspace version of Structurizr, providing a way to quickly view diagrams, documentation, and architecture decision records.
docker run -it –rm -e STRUCTURIZR_WORKSPACE_FILENAME=“architecture” -p 8080:8080 -v $(pwd):/usr/local/structurizr structurizr/lite
You edit the dsl file with your favorite editor and keep the lite tool auto updating to see the changes1.
Use the auto refresh feature with:
create a file named structurizr.properties in your Structurizr Lite data directory and add the following line, changing the number of milliseconds as required. A value of 0 will disable auto-refresh.
structurizr.autoRefreshInterval=2000
Internet access is not required by Structurizr Lite
structurizr onpremise
docker run -it –rm -p 8080:8080 -v PATH:/usr/local/structurizr structurizr/onpremises
seems complicated. I need to create users before playing with it.
A multi-workspace version of Structurizr that can be run on your own infrastructure (local servers or cloud), providing a way to publish diagrams, documentation, and architecture decision records.
web interface to play with it
- External reference: https://structurizr.com/dsl
Permalink
-
Structurizr Lite is optimised for working with the DSL, and this is the recommended approach for most teams
↩︎Structurizr Lite does not require you to push your workspace to it via a web API. Instead it works directly off the file system