Skip to main content
For a complete example, create and revise a service diagram with an agent, then keep manual layout edits across revisions. You know how your app works. Explaining it to someone else usually takes a drawing. Maybe it is for your README. Maybe a teammate asks where a request goes after it hits the API. You open a drawing tool, arrange some boxes, and start connecting arrows. iso-topology makes that step easier: describe the system in a text file, generate an architecture diagram, and keep the file for the next change. It is open source and runs locally. A small AI application: User connects to Web app, then API. The API connects to an AI model and a database. 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.
Start with a small diagram that answers one question. You can always add detail later.

Make your first diagram

The quickest starting point is D2, a text format where a -> 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:
Make sure your Go binary directory is on your PATH. If you prefer a prebuilt binary, use the installation guide. Save this as app.d2:
Render it:
Nine lines of D2 source beside the diagram generated from that exact file, with the rendering command below. 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. The expanded application: the API sends background work to a job queue, a worker processes it, and the worker writes to the database. In app.d2, replace api -> db with:
Run the same render command again. D2 recomputes the layout; the styled illustration above shows the intended flow with YAML placement. The useful part is that the architecture change lives in a small text edit you can review and keep in Git. It is still your description of the system. The tool does not scan your application and keep the diagram synchronized automatically. See what “diagrams from code” means here and how to keep README diagrams current.

Prefer editing in a browser?

Run:
Open the local Studio editor at 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 examples

Common 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

The examples were rendered and visually checked locally. Illustration headings were added around the generated SVGs. Article prepared with AI assistance. Compare three editable Mermaid and isometric architecture diagrams with matching components, connections and colors. The worked examples cover an API service, RAG and a DuckDB workflow.