> ## 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.

# C4, deployment, or request-flow diagram?

> Choose a system context, container, deployment, or request-flow view. Compare two editable Report service sketches and understand where iso-topology fits alongside Structurizr and Mermaid.

Choose an architecture view by the question it answers. Use a system context view for people and neighboring systems, a container view for applications and data stores, a deployment view for instances in a named environment, and a dynamic or sequence view for one ordered interaction scenario. **Isometric and top-down describe presentation, not these meanings.** [中文](https://iso-topology.mintlify.site/zh/guides/choose-architecture-view.md).

iso-topology can render authored architecture sketches from D2, YAML or JSON and let you revise them locally or through an agent. It does not import Structurizr DSL or validate C4 model semantics. If your central requirement is a reusable C4 model, evaluate [Structurizr DSL](https://docs.structurizr.com/dsl), which explicitly represents that model.

## Start with one question

| Question the reader needs answered | Useful view | Leave out until needed |
| - | - | - |
| Who uses our system, and which other systems does it depend on? | [System context](https://c4model.com/diagrams/system-context) | Internal classes, hosts and detailed protocols |
| Which applications and data stores do the work? | [Container](https://c4model.com/diagrams/container) | Environment-specific replica and host details |
| Where do these instances run in staging or production? | [Deployment](https://c4model.com/diagrams/deployment) | Unrelated code structure |
| What happens during one report request, and in what order? | [Dynamic](https://c4model.com/diagrams/dynamic) or sequence | Every unrelated system interaction |

These choices are not an exhaustive catalog of C4 views. Use the smallest set that explains your decision. A container-level drawing with servers added to it does not automatically become a clear deployment view: the reader must be able to distinguish the logical application, its instances, and the infrastructure hosting them.

## Example 1: two logical containers

The fictional Report system has a Go application that builds reports and a PostgreSQL data store that keeps the results. A [C4 container](https://c4model.com/abstractions/container) is an application or data store; the term does **not** mean a Docker container.

![Container-level teaching sketch: Report API, a Go application that builds reports, reads and writes a PostgreSQL Report store inside the Report software system](https://mintcdn.com/iso-topology/CDkehXBEXI72UsfQ/assets/architecture-container-view.svg?fit=max\&auto=format\&n=CDkehXBEXI72UsfQ\&q=85\&s=79a663c2a6d25a6f17f7223a2dabf3ee)

[Editable YAML](../assets/architecture-container-view.yaml) · [Full SVG](../assets/architecture-container-view.svg) · [PNG](../assets/architecture-container-view.png)

The dashed boundary denotes the software system. The rectangular block is the application; the cylinder is the data store. The arrow points from the application to the store it depends on and names the operation and protocol. It does not mean results only travel in that direction. Responses and report consumers are omitted from this deliberately small internal sketch.

This view makes no claim about how many processes, machines or replicas exist. The label `Report API` remains useful even if staging and production deploy it differently.

## Example 2: instances on two staging hosts

Now ask a different question: where do the same logical elements run? This example places one application instance on an App host VM and one data-store instance on a Data host VM. The environment is explicitly **illustrative staging**, not an observation of a real deployment.

![Illustrative staging deployment sketch: Report API instance 1 runs inside App host VM and connects to Report store instance 1 inside Data host VM](https://mintcdn.com/iso-topology/CDkehXBEXI72UsfQ/assets/architecture-deployment-view.svg?fit=max\&auto=format\&n=CDkehXBEXI72UsfQ\&q=85\&s=f17db106b5ffac41fe35dd9f6b9ecda4)

[Editable YAML](../assets/architecture-deployment-view.yaml) · [Full SVG](../assets/architecture-deployment-view.svg) · [PNG](../assets/architecture-deployment-view.png)

Here each dashed boundary means a VM. The contained block or cylinder is a deployed instance. The arrow retains the application dependency meaning from the first view. No network security, TLS configuration, availability or replication guarantees are implied by this drawing.

| Logical element in the first source | Instance in the second source | Placement in this example |
| - | - | - |
| `report_api` | `report_api_1` | App host VM, illustrative staging |
| `report_store` | `report_store_1` | Data host VM, illustrative staging |

These are separate authored files. The mapping above is maintained by the author; the renderer does not infer or synchronize it. For facts shared across many views, see the [shared-inventory example](https://iso-topology.mintlify.site/guides/keep-diagram-views-consistent.md). For an observed baseline versus an unimplemented proposal, keep [current and target states](https://iso-topology.mintlify.site/guides/current-and-target-architecture.md) separate as well.

## A request scenario needs more than a dependency arrow

The application-to-store arrow above says the dependency exists. It does not specify when a transaction starts, which result is returned, or what happens on failure.

For the fictional “build one report” scenario, first write the ordered steps: a caller submits a request; the API computes a report; the API stores the result; the store acknowledges the write; the API returns a report identifier. This scenario makes assumptions that must be checked against your implementation. An asynchronous implementation would need a different interaction contract.

If ordering and replies are the point, a [Mermaid sequence diagram](https://mermaid.js.org/syntax/sequenceDiagram.html) is an option to evaluate. A C4 [dynamic view](https://c4model.com/diagrams/dynamic) can also represent an individual scenario with ordered interactions. Merely rotating a static diagram into top-down projection does not add ordering or timing information.

## Reproduce the two sketches

Use the [installation guide](https://iso-topology.mintlify.site/getting-started/01-install.md), or build from this repository with Git and Go 1.25 or later:

```bash theme={"system"}
git clone https://github.com/NexusFox88/iso-topology
cd iso-topology
git rev-parse HEAD
go build -o isotopo ./cmd/isotopo
./isotopo validate docs/assets/architecture-container-view.yaml
./isotopo validate docs/assets/architecture-deployment-view.yaml
./isotopo render docs/assets/architecture-container-view.yaml ./out-container
./isotopo render docs/assets/architecture-deployment-view.yaml ./out-deployment
```

Each output directory contains `topology.svg` and an HTML preview. Record the source revision; on Windows use `isotopo.exe`. Copy a YAML file before adapting it, then run `isotopo serve your-copy.yaml` to edit that copy in local Studio. Studio saves accepted source changes to the served file.

Try moving the data-store instance into the App host boundary. That changes the deployment sketch; it need not change the logical container view. Then try splitting report generation into a separate worker application. That changes the logical view and requires revisiting the deployment mapping and request scenario. The two edits are different architecture decisions even if both involve moving boxes on a canvas.

## Review meaning before appearance

C4's [notation guidance](https://c4model.com/diagrams/notation) allows different visual styles while emphasizing understandable titles, element types, responsibilities, technologies and relationships. Our two drawings are original teaching sketches, not an assertion of complete C4 conformance.

Before publishing your version, check:

* Does the image identify its scope and, for a deployment view, its environment and evidence status?
* Can a reader distinguish an application from one instance and from its host?
* Does each arrow have one clear meaning? Is that meaning consistent with its direction?
* Do labels and the caption explain the view without relying on color alone?
* Which code, configuration or observation supports each statement? Which parts remain assumptions?

A successful `validate` command checks the diagram document; it cannot establish these system facts. An agent should preserve the selected view, cite the evidence it used, and leave unknown relationships unresolved rather than filling them with plausible-looking connections.

[Compare open-source tools](https://iso-topology.mintlify.site/guides/open-source-architecture-diagram-tools.md) · [Choose an input format](https://iso-topology.mintlify.site/guides/choose-format.md) · [Draw from code evidence](https://iso-topology.mintlify.site/guides/architecture-diagrams-from-code.md)


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