Here is the whole story in this example: a user opens the web app, the app calls an API, and the API uses an AI model and a database. You can follow that without knowing the codebase.
Where would you use it?
- A README: give someone a map before asking them to read the code.
- A design review: show the services involved in a proposed change.
- Team onboarding: walk through one request instead of listing every component in the company.
Make your first diagram
The quickest starting point is D2, a text format wherea -> b means “draw a connection from a to b.” You do not need to know YAML or configure an AI agent.
With Go 1.25 or later installed, run:
PATH. If you prefer a prebuilt binary, use the installation guide.
Save this as app.d2:
Open out/topology.html in a browser. The SVG image is at out/topology.svg; it stays sharp when resized and can go in your documentation.
The picture above is the actual output of that short D2 example. The colored overview at the top uses YAML for more control over placement, icons, and styling. Both describe the same five components and four connections.
Change the system without starting a new drawing
Suppose the API now needs to hand off a slow task. You add a job queue and a worker, and move that task’s database write to the worker.
In app.d2, replace api -> db with:
Prefer editing in a browser?
Run:http://localhost:8731. Edit the source and see a preview. Studio saves parseable source changes to the file you opened; rerun render when you want to refresh the exported SVG.
If you already use Claude Code or Codex, there is also an optional MCP server—a way for an AI assistant to call the local diagram tools. You can ask it to draft or revise a diagram and inspect the result. Setup instructions are here; you do not need MCP for anything in this tutorial.
Try it on something you know
Make a README diagram in local Studio: open the saved source, rename a component, and export the SVG while keeping its editable YAML. Pick a small part of your own app: a user, an API, and whatever the API depends on. Draw that first. If someone can understand the request path without a tour of the repository, the diagram is doing useful work. Get iso-topology on GitHub · Quickstart · More examplesCommon first questions
Do I need an AI assistant to make a diagram?
No. The CLI and local Studio work with source files you write yourself. MCP is an optional integration for compatible coding assistants.Can I edit the diagram after exporting it?
Keep the D2 or YAML source as the editable version. Change it and render again to refresh the SVG. Source and layout explains what is authored and what is generated.Will adding a service keep every node in the same place?
Not necessarily. D2 recalculates layout as the graph changes. Use YAML when you need explicit placement, and review the rendered output after a change.Continue with a real project
- Choose D2 or YAML for your editing workflow.
- Add groups and boundaries as the diagram grows.
- Browse architecture examples for microservices, Kubernetes, and data systems.
- Explore editable data architecture through DuckDB, Databricks, and Snowflake examples.
- Get this article’s scene sources and build script to reproduce the styled figures.