- Go (see
go.modfor the required version) - Node.js + npm — to build the admin UI
- protoc with the
protoc-gen-goandprotoc-gen-go-grpcplugins — only if you change the protobuf definitions
make build_dev # build the admin UI, embed it, and produce cmd/server/doqCross-compilation:
make build_linux_amd64 # → dist/doq (linux/amd64)
make build_darwin_arm64 # → dist/doq (darwin/arm64)See configuration.md for the full list of Makefile targets.
make run_node_0 # HTTP 8000, Raft 9000, gRPC 10000
make run_node_1 # HTTP 8001, Raft 9001, gRPC 10001 (joins node-0)
make run_node_2 # HTTP 8002, Raft 9002, gRPC 10002 (joins node-0)Run each in its own terminal. See deployment.md for details.
The admin UI is a React + TypeScript app (built with Vite) under admin_ui/.
cd admin_ui
npm install
npm run dev # start the Vite dev server with hot reload (also: make run_web)
npm run build # type-check and produce a production build in dist/
npm run lint # run ESLintThe dev server proxies /API requests to http://127.0.0.1:8000, so run a DOQ
node on the default HTTP port alongside it. To embed a fresh build into the
server binary, run make build_web (or make build_dev), which builds the UI
and copies dist/ into cmd/server.
The gRPC service and all Raft command messages are defined in
pkg/proto/doq.proto. After editing it, regenerate the
Go code:
make proto_compileGo tests (with the race detector and coverage):
make test # go test ./... -race -cover
go test ./pkg/queue/... -run TestName -race # run a single test
make bench # benchmarksAn end-to-end test suite that exercises the HTTP API lives under python/. It
runs against a live DOQ server, using the BASE_URL environment variable
(default http://localhost:8000).
# Start a DOQ node first (e.g. make run_node_0), then:
cd python
pip install -r requirements.txt
BASE_URL=http://localhost:8000 pytest| Path | Contents |
|---|---|
cmd/server/ |
The doq binary: server entrypoint (main.go) and CLI subcommands (commands.go). |
pkg/ |
Library packages — see the key packages table. |
admin_ui/ |
React + TypeScript admin UI, embedded into the binary at build time. |
deploy/ |
Kustomize manifests (base/ + dev/staging/prod overlays). |
testing/ |
k6 load script (testing/load/) and a Prometheus/Grafana stack (testing/prometheus/). |
python/ |
Python HTTP-API integration tests. |
For a description of how the pieces fit together, start with architecture.md.