The Structurizr DSL (as mentioned on the ThoughtWorks Tech Radar - Techniques - Diagrams as code) allows you to create multiple diagrams based upon the C4 model, in multiple output formats, from a single DSL source file. Some features (!docs, !adrs, !script, etc) are unavailable on this demo page - see Help - DSL for details.
workspace "Amazon Web Services Example" "An example AWS deployment architecture." { model { springPetClinic = softwaresystem "Spring PetClinic" "Allows employees to view and manage information regarding the veterinarians, the clients, and their pets." { webApplication = container "Web Application" "Allows employees to view and manage information regarding the veterinarians, the clients, and their pets." "Java and Spring Boot" { tags "Application" } database = container "Database" "Stores information regarding the veterinarians, the clients, and their pets." "Relational database schema" { tags "Database" } } webApplication -> database "Reads from and writes to" "MySQL Protocol/SSL" live = deploymentEnvironment "Live" { deploymentNode "Amazon Web Services" { tags "Amazon Web Services - Cloud" region = deploymentNode "US-East-1" { tags "Amazon Web Services - Region" route53 = infrastructureNode "Route 53" { description "Highly available and scalable cloud DNS service." tags "Amazon Web Services - Route 53" } elb = infrastructureNode "Elastic Load Balancer" { description "Automatically distributes incoming application traffic." tags "Amazon Web Services - Elastic Load Balancing" } deploymentNode "Autoscaling group" { tags "Amazon Web Services - Auto Scaling" deploymentNode "Amazon EC2" { tags "Amazon Web Services - EC2" webApplicationInstance = containerInstance webApplication } } deploymentNode "Amazon RDS" { tags "Amazon Web Services - RDS" deploymentNode "MySQL" { tags "Amazon Web Services - RDS MySQL instance" databaseInstance = containerInstance database } } } } route53 -> elb "Forwards requests to" "HTTPS" elb -> webApplicationInstance "Forwards requests to" "HTTPS" } } views { deployment springPetClinic "Live" "AmazonWebServicesDeployment" { include * autolayout lr animation { route53 elb webApplicationInstance databaseInstance } } styles { element "Element" { shape roundedbox background #ffffff } element "Container" { background #ffffff } element "Application" { background #ffffff } element "Database" { shape cylinder } } themes https://static.structurizr.com/themes/amazon-web-services-2020.04.30/theme.json } }
Structurizr
Diagram
Structurizr
Graph
Export
PlantUML
Export
C4-PlantUML
Export
Mermaid
Export
DOT
Export
WebSequenceDiagrams
Export
Ilograph