Short reference for the team. Open any .dsl below in Structurizr Lite.
Each file is a standalone workspace: its own model { } and views { }. One primary diagram per file (one main view), plus styles { } in that same file so styling is self-contained.
Example web storefront: customer (browser), Online store, Payment gateway (external).
| File | Diagram | What it shows |
|---|---|---|
| architecture/c4-model/context.dsl | System context | Customer, online store, gateway. |
| architecture/c4-model/containers.dsl | Containers | SPA, API, DB, gateway links. |
| architecture/c4-model/components.dsl | Components (API) | Controllers, payment client, repository. |
| architecture/c4-model/checkout-flow.dsl | Dynamic | Ordered checkout steps (not a “code” diagram). |
Use description and protocol on every relationship.
C4’s fourth zoom is code (classes / files). Structurizr DSL does not define a native code diagram like context or components. The dynamic view in checkout-flow.dsl shows runtime behaviour in order. For class-level detail, use your IDE, PlantUML, or an image view in Structurizr.
Purpose: a tiny second workspace that only demonstrates !const for the workspace name and description, with one context diagram and styles. It is not a copy of all c4-model diagrams — use c4-model/ for the full progression.
| File | Role |
|---|---|
| architecture/modular/workspace.dsl | !const + minimal model + one systemContext view + styles. |
Splitting with !include later: you can move model { } into another file and !include it inside workspace { }. Files that contain only model { ... } or only views { ... } are not valid root DSL when opened alone — keep a workspace.dsl entrypoint for editing and for IDE validation.
Keep .dsl in the repo so architecture can change in pull requests like code.