Add a Project
Add a Project, one Team’s folder in the Workspace, so the Team can declare what it owns.
Before you start
Section titled “Before you start”- You have a Workspace. See the Quick start.
- You know which Team will own the Project. See Workspace and Projects for how Projects split the Workspace.
1. Define the Team
Section titled “1. Define the Team”The Team must be defined in workspace.yaml. Add it under teams if it is new:
# 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: Production2. Create project.yaml
Section titled “2. Create project.yaml”Create a folder under the Workspace folder, named after the Project’s id. Add a project.yaml to it:
id: identityname: Identityowner: identityOther 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.
3. Declare its Elements
Section titled “3. Declare its Elements”Add a file such as model.yaml beside project.yaml. Big Bank’s Identity Project is one System with two Services:
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: OpenLDAPTo fill it in, add Services and connect them.
4. Route its reviews
Section titled “4. Route its reviews”Add a line per Project to CODEOWNERS, so each change goes to the Team that owns it:
/archidocs/identity/ @bigbank/identity5. Check the Workspace
Section titled “5. Check the Workspace”archidocs check0 errors, 0 warningsCheck it worked
Section titled “Check it worked”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.
If it didn’t
Section titled “If it didn’t”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.
With an agent
Section titled “With an agent”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.
Related
Section titled “Related”Documents the beta branch at cd98671, ahead of the latest release, v1.4.0.