LikeC4 Language
LikeC4 is a DSL for describing software architecture. It might look like Structurizr DSL (opens in a new tab), though it is not fully compatible.
The source files must have .likec4 or .c4 extensions.
LikeC4 looks for all source files and merges them into a single model (explained later in Workspace).
A project may look like this:
- model.c4
- views.c4
- model.c4
- amazon.c4
Top-level statements
Source files should have at least one of these statements:
specification- defines element kinds to be used in the model, like app, microservice, grapqlMutation...model- architecture elements, hierarchies, compositions and relationshipsviews- visualizations of the architecture
specification {
//...
}
model {
//...
}
views {
//...
}It is not allowed to have multiple statements of the same kind.
model {
}
// ⛔️ not allowed to have multiple statements
model {}But it is allowed to skip any of them, so you can have only model or only views or only specification or any combination of them.