Skip to content

Introduction

LikeC4 is a DSL for describing software architecture.

Source files must have .likec4 or .c4 extensions.
All sources merged into a single model (explained later in extending model).

A project may look like this:

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

Source file should have at least one of these statements:

  • specification - defines element kinds to be used in the model, like system, app, microservice
  • model - architecture elements, hierarchies, compositions and relationships
  • views - visualizations
  • global - globally shared predicates (explained later in Views)
example.c4
specification {
//...
}
global {
//...
}
model {
//...
}
views {
//...
}

You have multiple statements of the same type:

// Views group 1
views {
}
// Views group 2
views {
}