← c4studio
· This site was generated by
c4 publish
from
the model of c4studio itself
.
c4studio
c4studio described in its own DSL, rendered by itself.
Start
Overview
Views
c4studio – System Landscape
systemLandscape
c4studio – System Context
systemContext
c4studio – Containers
container
Core Library – Components
component
Web Backend – Components
component
Studio SPA – Components
component
Diagram Core – Components
component
VS Code Extension – Components
component
Dynamic – typing a change and seeing it
dynamic
Dynamic – the same diagram, with no browser
dynamic
Developer machine – one process, one browser
deployment
CI – the same code, headless
deployment
c4studio – What works offline
filtered
Documentation
c4studio, described in its own DSL
Why Node appears exactly once
Decisions
Record architecture decisions
Accepted
The editor edits text, never the model
Accepted
Every renderer consumes one view graph
Accepted
Core Library – Components
Core Library – Components
Core Library
[Container: Python 3.13]
DSL Parser
[Component: Python, recursive
descent]
Tokenises and parses Structurizr
DSL. Rewrites the source before
tokenising — !include flattened,
!script stripped, constants…
JSON Parser
[Component: Python]
Reads Structurizr workspace JSON
into the same model the DSL parser
builds.
Source Map
[Component: Python]
Maps positions in the flattened
source back to the file and line they
came from, so a diagnostic names
the fragment rather than the root.
Expression Engine
[Component: Python]
Resolves include/exclude
expressions — tags, types, parents,
relationship forms — with deferred
resolution so forward references…
Implied Relationships
[Component: Python]
Derives the relationships upstream
would imply, deduplicated and
linked back to what implied them.
Docs & ADR Reader
[Component: Python]
Loads the markdown behind !docs
and !adrs.
Domain Model
[Component: Python dataclasses]
Typed dataclasses for the whole
Structurizr metamodel: elements,
views, deployment, documentation.
View Graph
[Component: Python]
Workspace + view -> nodes and
edges, with C4 visibility, boundary
nesting and endpoint lifting applied.
The one contract every renderer…
Diagnostics Bridge
[Component: TypeScript]
Runs `c4 check --json` on save
and publishes the results into the
Problems panel.
Mermaid Generator
[Component: Python]
C4Context/C4Container/C4Comp…
syntax, rendered from the view
graph.…
Flowchart Generator
[Component: Python]
Mermaid flowchart + subgraph,
covering every view type including
dynamic and deployment.
JSON Exporter
[Component: Python]
Writes Structurizr workspace JSON
back out, round-tripping what was
read.
Theme Loader
[Component: Python]
Fetches theme JSON and embeds
service icons as data URIs, so an
exported file renders offline.
Starter Templates
[Component: Python]
Four workspaces shipped as
package data — valid DSL exactly
as they sit on disk, so the suite can
parse each one directly.
Web Backend
[Container: Python, FastAPI]
Serves the JSON API and the built
SPA. Holds all mutable state on one
injected AppState rather than in
module globals.
VS Code Extension
[Container: TypeScript, esbuild,
.vsix]
DSL highlighting, inline diagnostics,
and a preview that draws one view
as an SVG beside the editor. Runs
whatever c4studio is on the…
Structurizr Theme CDN
[Software System]
Serves theme JSON and the service
icons a themed diagram embeds.
Records flattened positions in
Builds
Reports skipped constructs to
Loads !docs and !adrs via
Builds
Reads
Resolves includes and
excludes with
Resolves element and
relationship styles with
Adds derived relationships to
Renders from
Renders from
Serialises
Are parse-tested by
Parses with
Reshapes the output of
Walks
Starts on request, for Open in
Studio
Finds the same backend
through
Fetches theme JSON and
icons from
Component
Container
Network
Boundary
Relationship