Elements
An Element is a node of the Model: a Person, a System, a Service or a Component. The four kinds come from the C4 model, and they nest in one fixed order: System › Service › Component.
Four kinds
Section titled “Four kinds”| Kind | What it is | Nests in |
|---|---|---|
| Person | A human or role that uses a System, such as a customer or a support agent. | Nothing |
| System | A named group of Services that together deliver a business capability. | Nothing |
| Service | A deployable unit of software: the thing with a URL and Deployments. | A System, or nothing |
| Component | A part inside a Service that isn’t deployed on its own. | A Service |
Elements are declared in any file of a Project, keyed by id, with children under their parent. This is the Kitchen sink’s Shop System:
systems: shop: name: Shop description: An internal System with every Service type. services: web: name: Web description: An app Service. technology: React owner: edge tags: [customer-facing] links: - label: Runbook url: https://wiki.sink.example/runbooks/web relationships: - to: api description: Calls technology: JSON/HTTPS api: name: API description: | An app Service with Components. Its description is **Markdown**:
- `orders` takes and charges orders - `catalogue` searches the catalog technology: Node.js repository: https://github.com/sink-example/api metadata: tier: 1 on-call: core-oncall pci-scope: true components: orders: name: Orders technology: TypeScript module relationships: - to: orders-db description: Stores orders in technology: SQL - to: payment-gateway description: Charges cards through technology: HTTPS catalogue: name: Catalog technology: TypeScript module relationships: - to: search description: Searches with technology: HTTPS orders-db: name: Orders DB description: A datastore Service. type: datastore technology: PostgreSQL owner: data events: name: Events description: A broker Service. type: broker technology: Kafka owner: data mailer: name: Mailer description: Subscribes to order events. technology: Go relationships: - to: api description: Emails a receipt for each order interaction: async via: events channel: orders.placed payments-provider: name: Payments Provider description: An External System. external: true owner: edgeEvery Element has a name and an Owner, the one Team accountable for it. A Service also has a type that says what kind of software it is, such as a datastore or a message broker, and each type is drawn differently. The Elements and Relationships reference lists every field.
Describing an Element
Section titled “Describing an Element”Besides its name and Owner, an Element can say more about itself. The viewer’s Element panel shows each of these on its Overview tab:
description: what the Element is or does, in Markdown: emphasis, code, lists and links.technology(Services and Components): what it is built with, such asGoorPostgreSQL.repository(Systems, Services and Components): the URL of the repository its code lives in.links: other pages about it, such as a runbook or a dashboard, each with alabel.metadata: free-form facts the Model has no field for, such as a tier or an on-call rota, askey: valuepairs. Nothing in the Model reads them; they are there for people and agents to look up.
The Kitchen sink’s API, in the Shop System above, uses all of them.
Nesting
Section titled “Nesting”Nesting is strict. Systems don’t nest in Systems, and Components don’t nest in Components. A Service may also stand outside any System, as the Kitchen sink’s Search does.
A child usually sits under its parent in the YAML. When a Project splits its Model across files, a Service declared at the top of another file can name its System with in, and a Component its Service.
External Elements
Section titled “External Elements”An External System or Service runs outside your organization, such as a payment provider or a card scheme. Its Owner is the Team accountable for the integration.
You can’t see inside an External Service, so it has no declared Components. archidocs check reports any as external-with-components.
Levels
Section titled “Levels”The viewer and Views show the Model at one of three levels:
- C1, the System landscape: People and Systems.
- C2, the Service landscape: Services, grouped in their Systems.
- C3: the Components inside one Service.
Each level is drawn from the same Elements. A diagram never adds an Element of its own.
Why it works this way
Section titled “Why it works this way”- Fixed kinds. Every Workspace has the same four kinds, so a C2 diagram means the same thing in every organization. An agent knows what a Service is without reading a custom schema.
- Strict nesting gives the levels. Because a Component is always inside a Service and a Service inside at most one System, the viewer can collapse any diagram to C1, C2 or C3 without asking how.
- External is a flag, not a kind. An External Service is still a Service: other Elements depend on it, and impact questions reach it. The flag only says that its inside is out of view.
repositoryis a field, not a link. A link labeled “Repository” is a convention nothing checks, so an agent asking where a Service’s code lives would have to guess the label.metadatatakes the rest, so a Team’s own facts never need a new field.- Ids don’t depend on nesting. Moving a Service into another System keeps its id, so nothing that refers to it breaks.
Related
Section titled “Related”Documents the beta branch at cd98671, ahead of the latest release, v1.4.0.