> ## Documentation Index
> Fetch the complete documentation index at: https://iso-topology.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Turn a Small App into an Isometric Architecture Diagram

> Create an editable architecture diagram from a short text file. Follow a small AI app, render an SVG, and update the diagram when the design changes.

For a complete example, [create and revise a service diagram with an agent](https://iso-topology.mintlify.site/guides/ai-architecture-diagram-workflow.md), then [keep manual layout edits across revisions](https://iso-topology.mintlify.site/guides/preserve-diagram-layout.md).

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.](https://iso-topology.mintlify.site/assets/articles/first-app/01-overview.png)

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:

```bash theme={"system"}
go install github.com/NexusFox88/iso-topology/cmd/isotopo@main
```

Make sure your Go binary directory is on your `PATH`. If you prefer a prebuilt binary, use the [installation guide](https://iso-topology.mintlify.site/getting-started/01-install.md).

Save this as `app.d2`:

```text theme={"system"}
direction: right
user: User { shape: person }
app: Web app
api: API
model: AI model
db: Database { shape: cylinder }
user -> app -> api
api -> model
api -> db
```

Render it:

```bash theme={"system"}
isotopo render --theme clean-light --readable app.d2 ./out
```

![Nine lines of D2 source beside the diagram generated from that exact file, with the rendering command below.](https://iso-topology.mintlify.site/assets/articles/first-app/02-text-to-diagram.png)

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](https://iso-topology.mintlify.site/guides/choose-format.md) for more control over [placement](https://iso-topology.mintlify.site/guides/layout.md), icons, and [styling](https://iso-topology.mintlify.site/guides/styling.md). 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.](https://iso-topology.mintlify.site/assets/articles/first-app/03-background-jobs.png)

In `app.d2`, replace `api -> db` with:

```text theme={"system"}
queue: Job queue
worker: Worker
api -> queue -> worker -> db
```

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](https://iso-topology.mintlify.site/guides/architecture-diagrams-from-code.md) and [how to keep README diagrams current](https://iso-topology.mintlify.site/getting-started/05-publishing.md#keep-a-readme-diagram-current-with-ci).

## Prefer editing in a browser?

Run:

```bash theme={"system"}
isotopo serve app.d2
```

Open [the local Studio editor](https://iso-topology.mintlify.site/guides/studio.md) 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](https://iso-topology.mintlify.site/agent/MCP.md); you do not need MCP for anything in this tutorial.

## Try it on something you know

[Make a README diagram in local Studio](https://iso-topology.mintlify.site/getting-started/05-publishing.md): 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](https://github.com/NexusFox88/iso-topology)** · [Quickstart](https://iso-topology.mintlify.site/quickstart.md) · [More examples](https://iso-topology.mintlify.site/agent/SAMPLES.md)

## 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](https://iso-topology.mintlify.site/concepts/source-and-layout.md) 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](https://iso-topology.mintlify.site/guides/choose-format.md) for your editing workflow.
* [Add groups and boundaries](https://iso-topology.mintlify.site/getting-started/03-grouping.md) as the diagram grows.
* [Browse architecture examples](https://iso-topology.mintlify.site/gallery.md) for microservices, Kubernetes, and data systems.
* [Explore editable data architecture](https://iso-topology.mintlify.site/articles/editable-data-architecture.md) through DuckDB, Databricks, and Snowflake examples.
* [Get this article’s scene sources and build script](https://github.com/NexusFox88/iso-topology/tree/main/tools/gen-doc-images/editorial/first-app) to reproduce the styled figures.

*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](https://iso-topology.mintlify.site/articles/mermaid-to-isometric-architecture-diagrams.md) with matching components, connections and colors. The worked examples cover an API service, RAG and a DuckDB workflow.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.