The technique of "diagrams as code" just appeared on the ThoughtWorks Tech Radar (as "Trial"), with the Structurizr DSL also getting a mention.
...
For further actions, you may consider blocking this person and/or reporting abuse
Interesting! The term “diagram as code” seems indeed extremely misleading: it could as well refer to the opposite, i.e. the old dream of visual programming with ultra-detailed UML diagrams and OCL annotations to replace the code (which of course never really materialised but made UML so heavy). What about “diagramming from code” ?
I think we're stuck with the term to be honest! 😀
I personally love ilograph.com
It's neat, but it lacks many many features.
you can't do hierarchies, element MUST be connected
you can't do block layouts for the same reason
it's also not possible to do the diagram they advertise on the front page...

note how elements substitute to provide more details as you drill down....
when you read the doc you will realize it can't be achieved.
it's only good for, basic component diagram and sequences.
I think the visualisation is great, although I'm not a fan of using YAML for defining the model ... that's why I added Ilograph as an export format for the Structurizr CLI. 👍
Interesting post Simon! I'm a big proponent of codifying anything teams want to repeat, collaborate on, or standardize around. I like the concept of diagrams as code for workflow diagrams or even abstract white-boarding, especially now that we're all remote.
For application infrastructure, Stackery takes this idea a bit further with diagrams as code that can be deployed into a public cloud provider, like AWS. I've embedded a simple example that's bidirectional between the code and the diagram, though the technique really shines as architectures (and code) scale.
What do you think? Have you seen teams turn their architectural diagrams as code into deployable artifacts?
I have yes ... here's an example of creating Azure resources with Structurizr for .NET ... github.com/ChristianEder/Structuri...
Don't forget mermaidjs.
I use it on every project, even in one or two of my blog posts.
Yes, Mermaid is great too ... it's actually a supported output format for the Structurizr CLI -> github.com/structurizr/cli/blob/ma...
Try code2diagram.com and select any diagram you need. No setup or installation is required, just use a simple code to generate the best diagram.