Development
If you are looking to contribute to Komodo, this page is a launching point for setting up your Komodo development environment.
Dependencies
Running Komodo from source requires either Docker (and can use the included devcontainer), or can have the development dependencies installed locally:
- Backend (Core / Periphery APIs)
- Rust stable via rustup installer
- MongoDB or FerretDB available locally.
- On Debian/Ubuntu:
apt install build-essential pkg-config libssl-dev
required to build the rust source.
- Frontend (Web UI)
runnables-cli
mbecker20/runnables-cli can be used as a convience CLI for running common project tasks found in runfile.toml
. Otherwise, you can create your own project tasks by references the cmd
s found in runfile.toml
. All instructions below will use runnables-cli v1.3.7+.
Docker
After making changes to the project, run run -r test-compose-build
to rebuild Komodo and then run -r test-compose-exposed
to start a Komodo container with the UI accessible at localhost:9120
. Any changes made to source files will require re-running the test-compose-build
and test-compose-exposed
commands.
Devcontainer
Use the included .devcontainer.json
with VSCode or other compatible IDE to stand-up a full environment, including database, with one click.
VSCode Tasks are provided for building and running Komodo.
After opening the repository with the devcontainer run the task Init
to build the frontend/backend. Then, the task Run Komodo
can be used to run frontend/backend. Other tasks for rebuilding/running just one component of the stack (Core API, Periphery API, Frontend) are also provided.
Local
To run a full Komodo instance from a non-container environment run commands in this order:
- Ensure dependencies are up to date
rustup update
-- ensure rust toolchain is up to date
- Build and Run backend
run -r test-core
-- Build and run Core APIrun -r test-periphery
-- Build and run Periphery API
- Build Frontend
- Run this once --
run -r link-client
-- generates TS client and links to the frontend - After running the above once:
run -r gen-client
-- Rebuild clientrun -r start-frontend
-- Start in dev (watch) moderun -r build-frontend
-- Typecheck and build
- Run this once --
Docsite Development
Use run -r docsite-start
to start the Docusaurus Komodo docs site in development mode. Changes made to files in ./docsite
will be automatically reloaded by the server.