First of all, thank you for showing interest in contributing to LikeC4! All your contributions are extremely valuable!
- Improve documentation: Fix incomplete or missing docs, bad wording, examples or explanations.
- Give feedback: We are constantly working on making LikeC4 better. Please share how you use LikeC4, what features are missing and what is done well via GitHub Discussions or Discord.
- Share LikeC4: Share links to the LikeC4 docs with everyone who might be interested!
- Contribute to the codebase: Propose new features via GitHub Issues, or find an existing issue that you are interested in and work on it!
- Give us a code review: Help us identify problems with the source code or make LikeC4 better.
- Decide on what you want to contribute.
- If you would like to implement a new feature, discuss it with the maintainers (GitHub Discussions or Discord) before jumping into coding.
- After finalizing issue details, you can begin working on the code.
- Run tests with
pnpm testand submit a PR once all tests have passed. - Get a code review and fix all issues noticed by the maintainer.
- If you cannot finish your task or if you change your mind – that's totally fine! Just let us know in the GitHub issue that you created during the first step of this process. Our community is friendly – we won't judge or ask any questions if you decide to cancel your submission.
- Your PR is merged. You are awesome ❤️!
-
Fork the repository, then clone or download your fork.
-
Ensure you have all required tools
Install manually or use asdf:asdf install
-
Install dependencies with pnpm –
pnpm install -
Pre-generate sources by running
build(orgenerate) in root:pnpm build
-
Mostly used dev tasks:
pnpm devinapps/playgroundpnpm dev(or anypnpm dev:*) inpackage/likec4pnpm vitest:uiin rootpnpm typecheckin root
-
To work on VSCode extension:
- Launch
Run Extensionto start a new VSCode instance with the extension loaded.
- Launch
/e2e contains isolated workspace. Test steps are:
- pack
likec4to tarball - install this tarball in isolated wokspace
- generate spec files from model (using LikeC4Model)
- run playwright
To run from root workspace:
pnpm test:e2eThis repository's contents are:
/apps/docsAstro-app, contains the content for our docs site at likec4.dev/apps/playground- Vite SPA, site playground.likec4.dev/packagescontains the source for packages
- Purpose: Command-line interface and integration point, main entry point for the tool.
- Technology: Uses yargs
- Technology: Pure TypeScript, no frameworks. Heavy use of generators and remeda
- Purpose: Core type definitions and domain model.
compute-viewcontains logic for computing diagram views - Suggestions: A great way to start contributing is by adding more tests for compute-view. This will help you understand how it works while also benefiting the project. There are also open questions from @pavelpykhtin, who has made significant contributions.
- Purpose: Parses DSL, builds models, and computes views
- Technology: Built with Langium
- Purpose: Transforms computed views into visual graph layouts
- Technology: Uses Graphviz for layout algorithms
- Purpose: Integrates LikeC4 into Visual Studio Code.
- Technology: Uses reactive-vscode and follows VS Code extension patterns.
create-likec4: Scaffolding tool for new projectsgenerators: Converts LikeC4 to other formatsicons: Pre-bundled icon setslog: Common logger implementationtsconfig: TypeScript configurationvscode-preview: Preview panel component for VS Code extension