This repository describes the archiecture of the Crime Common Platform. It uses the LikeC4 tools and DSL to describe the model, and the principles of the C4 modelling approach.
The output of this project can be viewed in interactive form at https://hmcts.github.io/cp-c4-architecture/
Install/update node using your terminal or download and run the .pkg installer
LikeC4 works best in an IDE, there are extensions/plugins for both Visual Studio Code and IntelliJ idea, however the IntelliJ plugin is not currently maintained and therefore Visual Studio Code is the suggested editor of choice.
The following instructions are for Visual Studio Code on MacOS, once completed you should be able to run likec4 locally from the command line, using the instructions on the cli section below.
Download and install Visual Studio Code from the official VS Code page. The simplest installation is to download the zip file and extract the app, but choose the option you're most familiar with.
Once installed, complete the setup wizard within the app and see the setup overview guide for familiarisation.
Navigate to the exension page and click the install button,
it should take you to the extensions window inside VSC to complete the installation.
After installation, when a .c4 file is opened in the editor there will be an 'open preview' link directly above any view definition. Clicking this link opens the view in the Diagram Preview tab.
LikeC4 requires Node.js version 20+
Check if you have a compatible version already installed
node -vYou can install globally, locally and use scripts from package.json, or just via npx
Check documentation
To start local server with live reload (for development or quick preview)
The app should start and load a localhost webapp in your default browser (e.g. http://localhost:5173/) showing your models
Inside the project folder:
npx likec4 startExport to PNG:
npx likec4 export png -o pngDocumentation: https://likec4.dev/docs/tools/cli/
likec4.config.ts includes an example of custom generator that generates CSV file with relationships:
npm run generate:relationships-csvtest/validate-model.spec.ts includes an example of model validation tests:
npm run testCheck documentation for more details
Deployment is the same as for any project built with vite.
- Build static site (export to HTML, ready for deployment):
npx likec4 build -o ./distCheck
npx likec4 build --helpfor options and examples
- Upload
./distfolder to your hosting
This tproject deploys to github pages on every push to main branch.
Check .github/workflows/pages.yml
This project is licensed under the MIT License.