Skip to content

Elements

Structurizr DSL models are built from a small set of element types, each with a different level of scope.

Represents a human user or role:

user = person "End User" "A person who uses the system"

A top-level software system — the coarsest unit of scope:

system = softwareSystem "My System" "Handles business logic"

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"
}

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"
}

An infrastructure host or environment — see Deployment Views for the full deployment model.

deploymentEnvironment "Production" {
deploymentNode "Azure" "Cloud provider" {
deploymentNode "App Service" {
containerInstance webapp
}
}
}

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.