AI C4 model diagram generator.
One system, drawn at three levels of zoom, so each diagram has one audience instead of trying to serve all of them.
What the C4 model is
A convention for describing software architecture as a hierarchy of diagrams at decreasing zoom: system context, containers, components and, rarely, code. Its actual contribution is not the notation, which is deliberately minimal, but the insistence that each diagram has one level of abstraction and one audience. Most bad architecture diagrams are bad because they mix levels.
How Lucid Train draws one
Describe what you want, or point it at a repository. The agent emits a semantic graph of nodes and edges with no coordinates, and the ELK layout engine computes positions and orthogonal routing. That separation is the reason the output cannot come back with boxes overlapping or arrows crossing through cards, which is the characteristic failure when a language model is asked to place things on a canvas itself. It also means editing is editing the graph: change a component and the layout re-solves rather than drifting out of alignment.
Level by level
Context is the whole system as one box with its users and the systems it talks to, and it is for people who do not work on it. Containers are the deployable and runnable things, applications, services, databases, and this is the level most teams actually need. Components are the major parts inside one container, and are worth drawing only for containers complex enough to justify it. The fourth level, code, is best left to your IDE.
Why the diagrams stay in step
The usual C4 failure is that the container diagram is updated and the context diagram is not, so they describe different systems. Generating each level from the same underlying model of the system, rather than drawing them independently, is what keeps them consistent, and regenerating is cheap enough to do on change.
Local, offline, your models
It runs as a desktop application. Against a local Ollama model the whole thing works offline with no API key and no telemetry, which is the practical difference from every browser-based diagram tool: your architecture never leaves the machine.
The four C4 levels
| Level | Shows | Audience |
|---|---|---|
| 1. Context | The system, its users, and the systems it talks to | Anyone, technical or not |
| 2. Container | Applications, services and data stores | Engineers and architects |
| 3. Component | The major parts inside one container | Engineers on that container |
| 4. Code | Classes and their relationships | Rarely worth drawing; use an IDE |
Try it
Questions
Related
- AI Architecture Diagram GeneratorDescribe the system, or point it at the repository and let it find out for itself.
- AI System Design Diagram GeneratorFor a design doc, a review, or the whiteboard round where you have forty minutes and need the shape to be right.
- AI Sequence Diagram GeneratorFor when the question is not what the components are but in what order they talk, and what happens when step four fails.
- AI ER Diagram GeneratorPoint it at the schema you already have. The relationships are declared, so the diagram is a rendering rather than an interpretation.