Nothing Special   »   [go: up one dir, main page]

Skip to content
/ likec4 Public

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

License

Notifications You must be signed in to change notification settings

likec4/likec4

Repository files navigation

Architecture as a code

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

docs | playground | demo

vscode extension

What is LikeC4? Why "like"?

LikeC4 is a modeling language for describing software architecture and tools to generate diagrams from the model.

LikeC4 is inspired by C4 Model and Structurizr DSL, but provides some flexibility. You customize or define your own notation, element types, and any number of nested levels in architecture model.
Perfectly tailored to your needs.

What does LikeC4 look like?

LikeC4 source:

Run CLI to preview:

npx likec4 start

And result:

Template repository - likec4/template
Deployed - https://template.likec4.dev

Open in StackBlitz

StackBlitz does not support extensions, so no validation, syntax highlighting and etc.
You can try with github.dev and suggested extension.

Check Tutorial - for a quick overview of LikeC4.

About this repository

Top-level layout

This repository's contents are:

  • /apps/docs Astro-app, contains the content for our docs site at likec4.dev
  • /apps/playground - Vite SPA, site playground.likec4.dev
  • /packages contains the source for packages

Packages

  • core: model and type definitions
  • create-likec4: scaffolding tool
  • diagram: react components rendering diagrams
  • generators: LikeC4 -> Other formats
  • icons: prebundled icons
  • language-server: parser and language server
  • layouts: layout algorithms for views
  • likec4: CLI, published to npm as likec4
  • log: Shared instance of consola
  • tsconfig: typescript configuration
  • vscode: vscode extension
  • vscode-preview: preview panel in vscode extension

Development

  1. Ensure you have all required tools
    Use asdf or install manually:

    asdf install
  2. Generate sources by running build in root:

    yarn build
  3. Mostly used dev tasks:

    1. yarn dev in apps/playground
    2. yarn dev (or any yarn dev:*) in package/likec4
    3. yarn vitest:ui in root

To work on VSCode extension:

  • Launch Run Extension to start a new VSCode instance with the extension loaded.

E2E

/e2e contains isolated workspace. Test steps:

  • pack likec4 to tarball
  • install this tarball in isolated wokspace
  • generate spec files from model (using LikeC4Model)
  • run playwright

To run from root workspace:

yarn test:e2e

License

This project is released under the MIT License