Elements and Relationships
Any .yaml file in a Project folder other than project.yaml can declare Elements under people, systems, services and components, and the Relationships of each under its relationships. The same files also hold Deployment Targets and Deployments and Saved Views, so a Project can keep everything in one file or split it however it likes.
Example
Section titled “Example”The Kitchen sink declares one of every kind of Element: a Person, an internal System with an app, a datastore and a broker Service, Components, an async Relationship through the broker, an External System, and Services outside any System:
people: customer: name: Customer description: A Person. relationships: - to: web description: Uses technology: HTTPS
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. technology: Node.js 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: Catalogue 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: edge
services: search: name: Search description: A Service outside any System. technology: OpenSearch owner: data payment-gateway: name: Payment Gateway description: An External Service outside any System. external: true technology: Stripe API owner: edgeA Service declared in another file joins a System with in:
# A Service declared in a file of its own and placed in a System with `in`.services: reports: name: Reports description: A Service in Shop, declared outside the System's file. technology: Python in: shop owner: data relationships: - to: orders-db description: Reads order history from technology: SQLFields
Section titled “Fields”Every other .yaml file in a Project folder follows one schema. These keys declare its Elements and, under each consumer, its Relationships.
Generated from schemas/model.schema.json, which editors can use for completion and validation. <id> stands for a key you choose; [] for each item of a list.
people
Section titled “people”| Field | Type | Required | Notes |
|---|---|---|---|
people |
map of id → object | ||
people.<id>.name |
string | yes | |
people.<id>.description |
string | ||
people.<id>.owner |
string | ||
people.<id>.tags |
list of string | ||
people.<id>.links |
list of object | ||
people.<id>.links[].label |
string | yes | |
people.<id>.links[].url |
string | yes | Format: uri. |
people.<id>.relationships |
list of object | ||
people.<id>.relationships[].to |
string | yes | An id in this Project, or project:id for one in another Project. |
people.<id>.relationships[].id |
string | ||
people.<id>.relationships[].description |
string | ||
people.<id>.relationships[].technology |
string | ||
people.<id>.relationships[].interaction |
"sync" or "async" |
||
people.<id>.relationships[].via |
string | An id in this Project, or project:id for one in another Project. |
|
people.<id>.relationships[].channel |
string | ||
people.<id>.relationships[].tags |
list of string |
systems
Section titled “systems”| Field | Type | Required | Notes |
|---|---|---|---|
systems |
map of id → object | ||
systems.<id>.name |
string | yes | |
systems.<id>.description |
string | ||
systems.<id>.owner |
string | ||
systems.<id>.tags |
list of string | ||
systems.<id>.links |
list of object | ||
systems.<id>.links[].label |
string | yes | |
systems.<id>.links[].url |
string | yes | Format: uri. |
systems.<id>.relationships |
list of object | ||
systems.<id>.relationships[].to |
string | yes | An id in this Project, or project:id for one in another Project. |
systems.<id>.relationships[].id |
string | ||
systems.<id>.relationships[].description |
string | ||
systems.<id>.relationships[].technology |
string | ||
systems.<id>.relationships[].interaction |
"sync" or "async" |
||
systems.<id>.relationships[].via |
string | An id in this Project, or project:id for one in another Project. |
|
systems.<id>.relationships[].channel |
string | ||
systems.<id>.relationships[].tags |
list of string | ||
systems.<id>.external |
boolean | ||
systems.<id>.services |
map of id → object | ||
systems.<id>.services.<id>.name |
string | yes | |
systems.<id>.services.<id>.description |
string | ||
systems.<id>.services.<id>.owner |
string | ||
systems.<id>.services.<id>.tags |
list of string | ||
systems.<id>.services.<id>.links |
list of object | ||
systems.<id>.services.<id>.links[].label |
string | yes | |
systems.<id>.services.<id>.links[].url |
string | yes | Format: uri. |
systems.<id>.services.<id>.relationships |
list of object | ||
systems.<id>.services.<id>.relationships[].to |
string | yes | An id in this Project, or project:id for one in another Project. |
systems.<id>.services.<id>.relationships[].id |
string | ||
systems.<id>.services.<id>.relationships[].description |
string | ||
systems.<id>.services.<id>.relationships[].technology |
string | ||
systems.<id>.services.<id>.relationships[].interaction |
"sync" or "async" |
||
systems.<id>.services.<id>.relationships[].via |
string | An id in this Project, or project:id for one in another Project. |
|
systems.<id>.services.<id>.relationships[].channel |
string | ||
systems.<id>.services.<id>.relationships[].tags |
list of string | ||
systems.<id>.services.<id>.type |
"app" or "datastore" or "broker" |
||
systems.<id>.services.<id>.technology |
string | ||
systems.<id>.services.<id>.external |
boolean | ||
systems.<id>.services.<id>.in |
string | Id of the parent declared in another file of this Project. | |
systems.<id>.services.<id>.components |
map of id → object | ||
systems.<id>.services.<id>.components.<id>.name |
string | yes | |
systems.<id>.services.<id>.components.<id>.description |
string | ||
systems.<id>.services.<id>.components.<id>.owner |
string | ||
systems.<id>.services.<id>.components.<id>.tags |
list of string | ||
systems.<id>.services.<id>.components.<id>.links |
list of object | ||
systems.<id>.services.<id>.components.<id>.links[].label |
string | yes | |
systems.<id>.services.<id>.components.<id>.links[].url |
string | yes | Format: uri. |
systems.<id>.services.<id>.components.<id>.relationships |
list of object | ||
systems.<id>.services.<id>.components.<id>.relationships[].to |
string | yes | An id in this Project, or project:id for one in another Project. |
systems.<id>.services.<id>.components.<id>.relationships[].id |
string | ||
systems.<id>.services.<id>.components.<id>.relationships[].description |
string | ||
systems.<id>.services.<id>.components.<id>.relationships[].technology |
string | ||
systems.<id>.services.<id>.components.<id>.relationships[].interaction |
"sync" or "async" |
||
systems.<id>.services.<id>.components.<id>.relationships[].via |
string | An id in this Project, or project:id for one in another Project. |
|
systems.<id>.services.<id>.components.<id>.relationships[].channel |
string | ||
systems.<id>.services.<id>.components.<id>.relationships[].tags |
list of string | ||
systems.<id>.services.<id>.components.<id>.technology |
string | ||
systems.<id>.services.<id>.components.<id>.in |
string | Id of the parent declared in another file of this Project. |
services
Section titled “services”| Field | Type | Required | Notes |
|---|---|---|---|
services |
map of id → object | ||
services.<id>.name |
string | yes | |
services.<id>.description |
string | ||
services.<id>.owner |
string | ||
services.<id>.tags |
list of string | ||
services.<id>.links |
list of object | ||
services.<id>.links[].label |
string | yes | |
services.<id>.links[].url |
string | yes | Format: uri. |
services.<id>.relationships |
list of object | ||
services.<id>.relationships[].to |
string | yes | An id in this Project, or project:id for one in another Project. |
services.<id>.relationships[].id |
string | ||
services.<id>.relationships[].description |
string | ||
services.<id>.relationships[].technology |
string | ||
services.<id>.relationships[].interaction |
"sync" or "async" |
||
services.<id>.relationships[].via |
string | An id in this Project, or project:id for one in another Project. |
|
services.<id>.relationships[].channel |
string | ||
services.<id>.relationships[].tags |
list of string | ||
services.<id>.type |
"app" or "datastore" or "broker" |
||
services.<id>.technology |
string | ||
services.<id>.external |
boolean | ||
services.<id>.in |
string | Id of the parent declared in another file of this Project. | |
services.<id>.components |
map of id → object | ||
services.<id>.components.<id>.name |
string | yes | |
services.<id>.components.<id>.description |
string | ||
services.<id>.components.<id>.owner |
string | ||
services.<id>.components.<id>.tags |
list of string | ||
services.<id>.components.<id>.links |
list of object | ||
services.<id>.components.<id>.links[].label |
string | yes | |
services.<id>.components.<id>.links[].url |
string | yes | Format: uri. |
services.<id>.components.<id>.relationships |
list of object | ||
services.<id>.components.<id>.relationships[].to |
string | yes | An id in this Project, or project:id for one in another Project. |
services.<id>.components.<id>.relationships[].id |
string | ||
services.<id>.components.<id>.relationships[].description |
string | ||
services.<id>.components.<id>.relationships[].technology |
string | ||
services.<id>.components.<id>.relationships[].interaction |
"sync" or "async" |
||
services.<id>.components.<id>.relationships[].via |
string | An id in this Project, or project:id for one in another Project. |
|
services.<id>.components.<id>.relationships[].channel |
string | ||
services.<id>.components.<id>.relationships[].tags |
list of string | ||
services.<id>.components.<id>.technology |
string | ||
services.<id>.components.<id>.in |
string | Id of the parent declared in another file of this Project. |
components
Section titled “components”| Field | Type | Required | Notes |
|---|---|---|---|
components |
map of id → object | ||
components.<id>.name |
string | yes | |
components.<id>.description |
string | ||
components.<id>.owner |
string | ||
components.<id>.tags |
list of string | ||
components.<id>.links |
list of object | ||
components.<id>.links[].label |
string | yes | |
components.<id>.links[].url |
string | yes | Format: uri. |
components.<id>.relationships |
list of object | ||
components.<id>.relationships[].to |
string | yes | An id in this Project, or project:id for one in another Project. |
components.<id>.relationships[].id |
string | ||
components.<id>.relationships[].description |
string | ||
components.<id>.relationships[].technology |
string | ||
components.<id>.relationships[].interaction |
"sync" or "async" |
||
components.<id>.relationships[].via |
string | An id in this Project, or project:id for one in another Project. |
|
components.<id>.relationships[].channel |
string | ||
components.<id>.relationships[].tags |
list of string | ||
components.<id>.technology |
string | ||
components.<id>.in |
string | Id of the parent declared in another file of this Project. |