Use when structuring a LikeC4 workspace with multiple project folders that share specs, assets, or conventions, or when bootstrapping a new project from a minimal baseline.
Defines folder structure, shared-spec patterns, and project boundaries for LikeC4 workspaces containing multiple projects. Each project owns its own likec4.config.json plus local model/view files, while shared definitions stay in a shared area.
Start new projects from a minimal baseline (likec4.config.json + model file + views file), not by treating an example project as the canonical source of truth. If a starter project exists locally, use it only as a scaffold and remove its example-specific content immediately.
Tip: Use configure-project-includes when updating include paths or image aliases.
| Decision | Recommended Choice |
|---|---|
| Shared kinds/tags | Keep in projects/shared/spec-*.c4 |
| Project boundaries | One domain/team/layer per project folder |
| Config ownership | Each project owns its likec4.config.json |
| New project bootstrap | Start from a minimal baseline: config + model + views |
| Cross-project dependencies | Keep explicit, minimal, and documented |
Organize workspace by domain, team, or architectural layer:
workspace/
├── projects/
│ ├── shared/ # Shared specifications
│ │ ├── spec-global.c4
│ │ ├── spec-context.c4
│ │ ├── spec-containers.c4
│ │ └── images/
│ ├── backend-services/ # Project 1
│ │ ├── likec4.config.json
│ │ ├── system-model.c4
│ │ └── system-views.c4
│ ├── frontend-apps/ # Project 2
│ │ ├── likec4.config.json
│ │ ├── apps-model.c4
│ │ └── apps-views.c4
│ └── infrastructure/ # Project 3
│ ├── likec4.config.json
│ ├── deployment.c4
│ └── deployment-views.c4
Each project needs likec4.config.json with shared includes:
Tip: Use configure-project-includes when updating include paths or image aliases.
{
"$schema": "https://likec4.dev/schemas/config.json",
"name": "backend-services",
"title": "Backend Services Architecture",
"include": {
"paths": ["../shared"]
},
"imageAlias": {
"tech": "https://icons.terrastruct.com/tech/",
"gcp": "https://icons.terrastruct.com/gcp/"
}
}
Define reusable element kinds and relationship types:
shared/spec-global.c4
specification {
// Colors
color primary
color secondary
// Sizes
size small
size medium
size large
// Global tags
tag deprecated
tag experimental
tag production
}
shared/spec-containers.c4
specification {
element Container_WebApp {
style {
shape browser
color primary
}
}
element Container_API {
style {
shape rectangle
color secondary
}
}
element Container_Database {
style {
shape cylinder
color muted
}
}
}
Reference shared specs and define project elements:
backend-services/system-model.c4
model {
// Uses Container_API from shared spec
backendSystem = System_Backend 'Backend System' {
api = Container_API 'REST API' {
technology 'Node.js, Express'
}
database = Container_Database 'User DB' {
technology 'PostgreSQL'
}
api -[reads]-> database 'queries'
}
}
When projects need to reference each other:
Option 1: Shared External Systems
Define external systems in shared specs:
// shared/external-systems.c4
model {
externalAuth = System_External 'Auth0' {
#external
}
}
Projects include shared directory and reference:
// backend-services/system-model.c4
model {
api -> externalAuth 'authenticates via'
}
Option 2: Separate External Project
Create dedicated external systems project:
projects/
├── shared/
├── externals/ # External systems project
│ ├── likec4.config.json
│ ├── external-systems.c4
│ └── external-views.c4
├── backend-services/
└── frontend-apps/
When creating a new project:
likec4.config.json for the new projectsystem-model.c4 and system-views.c4If your workspace already has a starter project, use it only as a scaffold:
Let users define their own structure based on needs:
❌ Project-specific models in shared specs — projects/shared/ must only contain reusable definitions; never put project elements (systems, containers) there
❌ Absolute paths in config — all include.paths must be relative (../shared), never absolute
❌ Circular project dependencies — project A includes project B which includes project A; restructure so shared content lives in shared/
❌ Missing or inconsistent image aliases — all projects should use the same "@": "../shared/images" alias to keep icon references consistent
❌ Copying an example project verbatim — examples can seed a baseline, but they should not leak example names, systems, or views into new projects
likec4.config.jsonUse LikeC4 MCP tools:
Use Context7 MCP query-docs with library /likec4/likec4 to verify:
Well-organized multi-project workspace with clear separation of concerns, reusable specifications, and maintainable cross-project references.38:["$","$L40",null,{"content":"$41","frontMatter":{"name":"organize-multi-project","description":"Use when structuring a LikeC4 workspace with multiple project folders that share specs, assets, or conventions, or when bootstrapping a new project from a minimal baseline."}}]