← 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
Web Backend – Components
Web Backend – Components
Web Backend
[Container: Python, FastAPI]
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.
API Routes
[Component: FastAPI]
The HTTP surface: sources, views,
graphs, layout, check, save, files,
templates, capabilities.
Capability Guards
[Component: FastAPI
dependencies]
FastAPI dependencies that make
Studio/Viewer and the assistant
enforceable — a route cannot
forget them, so the guarantee hol…
Workspace Loader
[Component: Python]
Loads a workspace and watches its
!include fragments by mtime. A
failed reload keeps serving the last
good one.
Source Discovery
[Component: Python]
Walks the tree for loadable
sources, revalidated by stat rather
than re-read — the 8 KB probe per
candidate was 79% of the…
React Flow Reshape
[Component: Python]
Turns the view graph into the
node/edge payload the SPA draws,
and attaches saved waypoints,
labels and chrome.
Model Graph
[Component: Python]
The whole static model as one
graph at a chosen abstraction level,
for the Explorer.
Layout Sidecar I/O
[Component: Python]
Reads and writes per-user UI state:
positions, sizes, waypoints, labels,
expansion, chrome. Additive
sections, so an older sidecar still…
Source Writer
[Component: Python]
Atomic writes with content-hash
fingerprints, so an edit made
elsewhere is a conflict rather than a
silent overwrite. Invalid DSL still…
Assistant
[Component: Python, anthropic
SDK]
The only component that opens a
network connection at run time. Off
unless asked for; reads its key from
the environment at the moment of…
Studio (SPA)
[Container: TypeScript, React, Vite]
The browser app: browse, read,
edit, and watch the diagram follow
the text.
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…
Anthropic API
[Software System]
Answers the assistant's requests
for a rewritten DSL file.
Reports skipped constructs to
Is guarded by
Loads and reloads
workspaces through
Lists sources through
Builds view payloads with
Builds the explorer graph with
Reads and writes UI state
through
Saves DSL through
Forwards assistant requests
to
Parses with
Reshapes the output of
Walks
Writes atomically to
Reads and watches
Reads and writes
Calls
Starts on request, for Open in
Studio
Opens in a browser on
request
Highlights
Asks for a rewritten file
Container
Component
File Store
Network
Boundary
Relationship