Skip to main content

Development

Prereqs:
  • Node.js 20.x (.nvmrc / .node-version)
  • Docker (optional; for Postgres/MinIO local stack)

Serving mode scope (local-dev)

  • This page is for local-dev workflows only.
  • local-dev is non-production: no customer traffic and no production cutover decisions.
  • For hosted/self-host operational boundaries, use docs/ops/SERVING_MODES_BOUNDARY.md and docs/ops/MINIMUM_PRODUCTION_TOPOLOGY.md.

Install

nvm use
npm ci

Start The API (In-Memory Store)

PROXY_OPS_TOKEN=tok_ops npm run dev:api

Local Dev Stack (Postgres + MinIO + Services)

Start the full local dev stack (Postgres + MinIO + API + receiver + finance sink):
./bin/nooterra.js dev up
Developer helper flow (recommended for local Neon/PG usage):
npm run dev:env:init
# edit .env.dev once (DATABASE_URL, etc.)
npm run dev:start
Optional: start local Postgres + MinIO only (for STORE=pg and S3-style evidence storage):
docker compose up -d
Run the full stack (API + maintenance + receiver + finance sink) via compose profile:
docker compose --profile app up --build
Initialize MinIO buckets (optional; required for S3/MinIO-backed evidence/artifact demos):
docker compose --profile init run --rm minio-init
Run the API backed by Postgres:
export STORE=pg
export DATABASE_URL=postgres://proxy:proxy@localhost:5432/proxy
npm run dev:api
Use MinIO for evidence objects (S3-compatible, via presigned URLs):
export PROXY_EVIDENCE_STORE=minio
export PROXY_EVIDENCE_S3_ENDPOINT=http://localhost:9000
export PROXY_EVIDENCE_S3_REGION=us-east-1
export PROXY_EVIDENCE_S3_BUCKET=proxy-evidence
export PROXY_EVIDENCE_S3_ACCESS_KEY_ID=proxy
export PROXY_EVIDENCE_S3_SECRET_ACCESS_KEY=proxysecret
export PROXY_EVIDENCE_S3_FORCE_PATH_STYLE=1

Run The Agent Simulator

Registers an executor and runs a sample job lifecycle:
npm run agent:sim

OpenAPI

Regenerate the OpenAPI spec and ensure no drift:
npm run -s openapi:write
git diff --exit-code -- openapi/nooterra.openapi.json

Tests

npm run -s lint
npm test

Conformance

Bundle verification oracle:
./bin/nooterra.js conformance test
Kernel control plane (disputes + holdback):
./bin/nooterra.js conformance kernel --ops-token tok_ops