← 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
c4studio – What works offline
c4studio – What works offline
c4studio
[Software System]
Software Architect
[Person]
Models a system in Structurizr DSL
and reads the diagrams it
produces.
Developer
[Person]
Keeps the model honest alongside
the code, usually in the same pull
request.
Core Library
[Container: Python 3.13]
Parsing, the domain model, the
view graph and the generators.
Pure Python, no I/O beyond reading
source files.
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.
Studio (SPA)
[Container: TypeScript, React, Vite]
The browser app: browse, read,
edit, and watch the diagram follow
the text.
Diagram Core
[Container: TypeScript, npm
workspace]
The renderer-agnostic diagram
layer. Knows nothing about the API
or app state, which is what lets the
headless renderer and the SPA…
Headless Renderer
[Container: JavaScript (bundled),
Node 18+]
Committed build artefact: diagram-
core bundled for Node, so the
wheel renders SVG without an npm
install. The only part of c4studio…
CLI
[Container: Python, click]
generate, render, export, check,
list-views, webapp, new.
Workspace Sources
[Container: Files on disk]
The user's .dsl and .json files,
including !include fragments. The
source of truth; c4studio never
generates them from the model.
Layout Sidecars
[Container: JSON files]
<source>.layout.json — per-user UI
state, gitignored, written next to
the source.
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…
GitHub Action
[Container: composite action,
YAML]
Renders every view as SVG on
push, and optionally commits them
or comments on the pull request.
PyPI
[Software System]
Distributes the c4studio wheel,
bundle and renderer included.
CI (GitHub Actions)
[Software System]
Runs the c4studio action on every
push to render views without a
browser.
Models and reads architecture
in
Edits the DSL in
Generates and checks
diagrams with
Previews diagrams while
editing with
Parses and generates through
Parses and builds view graphs
through
Invokes `c4 render`
Runs on every push
Reports skipped constructs to
Writes atomically to
Reads and writes
Lays out and draws with
Calls
Renders one view as SVG with
Starts on request, for Open in
Studio
Opens in a browser on
request
Highlights
Is the bundled form of
Pipes the graph payload to
Distributes
Person
Container
File Store
External System
Boundary
Relationship