Mikrom’s local development environment is orchestrated through aDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/mikronita/mikrom/llms.txt
Use this file to discover all available pages before exploring further.
Makefile that wraps Docker Compose, cargo watch, and a tmux session manager. Whether you want the full observability stack or just a minimal Postgres and NATS pair, the commands below get you to a working environment quickly. Before starting, make sure all prerequisites are installed.
Prerequisites
You need the following tools on yourPATH before running any make target:
| Tool | Purpose |
|---|---|
| Rust stable toolchain | Compiling all workspace crates |
| Docker and Docker Compose | Running Postgres, NATS, BuildKit, and observability |
| Node.js and pnpm | Building and running mikrom-app |
| Dagger CLI | Required for all make ci-* targets |
protoc | Generating Rust code from .proto files |
The Makefile automatically looks for
protoc at /tmp/opencode/protoc/bin/protoc and falls back to whatever is on your system PATH. You do not need to set PROTOC manually — the PROTOC_ENV variable is injected for every build that needs it.Recommended Full-Stack Workflow
The fastest path to a running development environment usesmake up-full to start all infrastructure and make dev to open a tmux session with every service watching for file changes.
Start the full infrastructure stack
Launch Postgres, NATS, BuildKit, and the Grafana/Prometheus/Loki/Tempo observability bundle in the background:This runs Docker Compose with both the
buildkit and observability profiles active. All containers start detached and health-checked before the command returns.Open the tmux development session
Attach to (or create) the The session opens four windows:
mikrom tmux session. Each service gets its own named window running cargo watch:api, scheduler, builder, and app. If the session already exists, make dev reattaches instead of creating a duplicate.Develop and iterate
Make changes to any Rust service or to
mikrom-app. cargo watch rebuilds on save. The SvelteKit dev server at port 3001 also hot-reloads automatically.Infrastructure Setup Options
- Full Stack
- Minimal (Postgres + NATS)
- Postgres Only
Includes Postgres, NATS, BuildKit, and the full LGTM observability suite (Grafana on port Useful when you are working on metrics, traces, or log aggregation in addition to core service functionality.
3000, Prometheus on 9090, Loki on 3100, Tempo on 3200, and OTLP endpoints on 4317/4318):Optional Infrastructure Components
You can start BuildKit and the observability stack independently if you need only one of them:buildkit and observability) so they share the same network bridge as the core stack.
Running Individual Services
Instead of the tmux session, you can start individual services in separate terminals. Each command usescargo watch so the binary restarts on source changes:
mikrom CLI binary into ~/.cargo/bin so it is available on your PATH:
Environment Files
Every service reads its configuration from a.env file in its own directory. Copy the provided example and fill in the required secrets before running:
mikrom-api requires DATABASE_URL, NATS_URL, JWT_SECRET, and MASTER_KEY. See configuration/api for the full variable reference.
Protobuf Code Generation
mikrom-proto contains shared .proto definitions that are compiled into Rust during the normal Cargo build. No manual protoc invocation is needed — the Makefile passes PROTOC="<path>" automatically to every build target that depends on generated code.
Ceph Libraries (Agent with RBD Support)
Themikrom-agent crate optionally links against librados and librbd for Ceph RBD block storage. These libraries are only required when building or running agent RBD integration tests. To set up the symlinks in target/ceph-libs/:
target/ceph-libs/librados.so and target/ceph-libs/librbd.so pointing at the system-installed Ceph client libraries. The run-agent and Ceph-related build targets set LIBRARY_PATH and RUSTFLAGS automatically to pick up these symlinks.