Elements
Structurizr DSL models are built from a small set of element types, each with a different level of scope.
Person
Section titled “Person”Represents a human user or role:
user = person "End User" "A person who uses the system"Software System
Section titled “Software System”A top-level software system — the coarsest unit of scope:
system = softwareSystem "My System" "Handles business logic"Container
Section titled “Container”A deployable unit within a software system (an API, database, web app, and so on):
system = softwareSystem "My System" { webapp = container "Web App" "Serves the UI" "React" api = container "API" "REST API" "Node.js" db = container "Database" "Stores data" "PostgreSQL"}Component
Section titled “Component”A structural building block within a container:
api = container "API" { authController = component "Auth Controller" "Handles authentication" "Express.js" userService = component "User Service" "Manages users" "TypeScript"}Deployment Node
Section titled “Deployment Node”An infrastructure host or environment — see Deployment Views for the full deployment model.
deploymentEnvironment "Production" { deploymentNode "Azure" "Cloud provider" { deploymentNode "App Service" { containerInstance webapp } }}Identifiers
Section titled “Identifiers”Use identifiers to reference elements in relationships and views:
user = person "User"api = container "API"user -> api "Calls"An identifier is required whenever you need to reference an element elsewhere — in relationships, views, or deployment.
See also
Section titled “See also”- DSL Basics — Workspace structure and fundamental syntax
- Relationships — Connecting elements
- Groups, Tags & Properties — Organizing and annotating elements