Skip to content

Introduction

LikeC4 is a DSL for describing software architecture (not only).
It might look like Structurizr DSL, though it is not fully compatible.

The source files must have extension .likec4 or .c4.
All sources merged into a single model (explained later in Workspace).

A project may look like this:

  • Directorybackend
    • Directoryservice1
      • model.c4
      • views.c4
    • Directoryservice2
      • model.c4
  • Directoryexternals
    • amazon.c4
  • landscape.c4
  • specs.c4

Top-level statements

Source file 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 relationships
  • views - visualizations
example.c4
specification {
//...
}
model {
//...
}
views {
//...
}

It is not allowed to have multiple statements of the same kind:

invalid.c4
model {
}
// ⛔️ not allowed to have multiple statements
model {}

But it is allowed to skip any of them, so only model, or only views, or only specification, or any combination of them.