Skip to content

Local Development

Bring up SurrealDB, RabbitMQ, the control plane and the dashboard on one machine.

The control plane needs a SurrealDB instance and an AMQP broker. Everything else runs from the workspace.

Terminal window
docker run -d --name guru-surreal -p 8000:8000 \
surrealdb/surrealdb:latest start --user root --pass root
docker run -d --name guru-rabbit -p 5672:5672 -p 15672:15672 rabbitmq:4-alpine

Use a SurrealDB 3.2 or newer server. Older 3.0 binaries disagree with the client the workspace links against and mis-handle assertions that read a row written earlier in the same transaction.

The broker URI form matters: use amqp://guest:guest@127.0.0.1:5672/ for the default vhost.

Schema lives in database/schema/*.surql (one file per module) and is managed with surrealkit:

Terminal window
surrealkit sync --host ws://127.0.0.1:8000 --ns guru --db guru
Terminal window
cargo run -p manage-tool -- \
--address ws://127.0.0.1:8000 --username root --password root \
--namespace guru --database guru \
create-admin --email admin@example.com --password 'change-me'

Each mode is a separate process. The operator API the dashboard talks to is dashboard_grpc:

Terminal window
cargo run -p guru-master -- \
--mode dashboard_grpc \
--address ws://127.0.0.1:8000 --username root --password root \
--namespace guru --database guru \
--amqp-uri 'amqp://guest:guest@127.0.0.1:5672/'

Swap --mode for workers_grpc, consumer or cron to run the other workers; consumer is what re-derives configs after a canvas edit.

Terminal window
bun install
GURU_GRPC_URL=127.0.0.1:50051 bun run dev

bun run dev at the workspace root proxies to the guru-frontend package.

These docs are their own workspace package:

Terminal window
bun run --filter guru-docs dev # or: bun run docs:dev
bun run --filter guru-docs build # static output in typescript/docs/dist

proto/ is the single source of truth. After changing it, regenerate the TypeScript client (the Rust side is generated by rpguru_sdk’s build.rs):

Terminal window
bun run generate:proto

Module integration tests run against an in-memory SurrealDB (mem://) and apply the module’s own schema file, so they need no running server:

Terminal window
cargo test