Architecture as a code

Visualize, collaborate, and evolve the software architecture with always actual and live diagrams from your code
Get Started

What is LikeC4? Why "like"?

LikeC4 is a modeling language for describing software architecture, and tools to generate diagrams from the model.
Inspired by C4 Model (opens in a new tab) and Structurizr DSL (opens in a new tab), but with some flexibility.

You define your own notation, custom element types and any number of nested levels in the architecture model.
Perfectly tailored to your needs.

What does LikeC4 look like?

specification { // define "types" of architecture elements
  element actor {
    style {
      shape person // how to render
    }
  }
  element system
  element component
  relationship async // allow "typed" relationship
}
 
model { // describe your architecture, single source of truth
  customer = actor 'Customer' {
    description 'A user of our product with active subscription'
    -> ui 'opens in browser' // how relationships are
  }
  cloud = system 'Our SaaS' {
    backend = component 'Backend' {
      description '
        Implements business logic
        and provides GraphQL API
      '
    }
 
    ui = component 'Frontend' {
      description 'NextJs application'
      style {
        shape browser
      }
    }
 
    ui -[async]-> backend 'requests via HTTPS'
  }
}
 
views {
  view index {
    include *, cloud.*
 
    style cloud.* {
      color green
    }
  }
}

Run to preview:

npx likec4 start

And this is rendered (click to explore):

rendering...

Check the Tutorial for better overview of LikeC4.