Skip to content

Add a Project

Add a Project, one Team’s folder in the Workspace, so the Team can declare what it owns.

The Team must be defined in workspace.yaml. Add it under teams if it is new:

workspace.yaml
# Big Bank plc: a fictional bank, after the C4 model's internet banking example.
teams:
digital-banking:
name: Digital Banking
description: Web, mobile and the internet banking API.
core-banking:
name: Core Banking
description: The mainframe and the systems that sit on it.
platform:
name: Platform
description: Cloud platform, messaging and e-mail.
identity:
name: Identity
description: Customer sign-in and the user directory.
payments:
name: Payments
description: Payments, card network and fraud.
environments:
staging:
name: Staging
prod:
name: Production

Create a folder under the Workspace folder, named after the Project’s id. Add a project.yaml to it:

identity/project.yaml
id: identity
name: Identity
owner: identity

Other Projects name this one’s Elements by the id, as identity:auth-service, so choose it with care. Every field is in the project.yaml reference.

Add a file such as model.yaml beside project.yaml. Big Bank’s Identity Project is one System with two Services:

identity/model.yaml
systems:
identity:
name: Identity Platform
description: Signs customers in and keeps their credentials.
services:
auth-service:
name: Auth Service
description: OpenID Connect provider for every customer-facing app.
technology: Keycloak
relationships:
- to: user-directory
description: Reads and writes credentials in
technology: LDAP
- to: platform:email-system
description: Sends password-reset e-mails through
technology: SMTP
user-directory:
name: User Directory
type: datastore
technology: OpenLDAP

To fill it in, add Services and connect them.

Add a line per Project to CODEOWNERS, so each change goes to the Team that owns it:

CODEOWNERS
/archidocs/identity/ @bigbank/identity
Terminal window
archidocs check
0 errors, 0 warnings

Run archidocs dev and open the C2 Landscape. The new Project’s Systems are on it, with the Team as their Owner in the Element panel.

check reports unknown-team when an owner names a Team that workspace.yaml doesn’t define:

archidocs/shop/model.yaml:6:12 error unknown-team Unknown Team "paymnets"; did you mean "payments"?
1 error, 0 warnings
Rule docs:
unknown-team https://archidocs.dev/docs/reference/rules/unknown-team/

Correct the name, or add the Team to workspace.yaml.

check reports nested-project when a Project folder sits inside another. Move it up a level.

create_project writes the folder and project.yaml. upsert_team adds a missing Team. To model an existing codebase in one go, see Bootstrap a Project from code.

Documents the beta branch at cd98671, ahead of the latest release, v1.4.0.