Mendora
Documentation · Quickstart

Quickstart

Run the whole platform locally: PostgreSQL, the API, a worker and the web app. Everything runs on your machine; nothing is sent to Bittensor and no real customer app is touched.

Requirements

  • Python 3.12 and uv
  • Node.js 24 LTS (20.9 or newer works)
  • Docker (for PostgreSQL)

Or run everything in containers, with Docker only:

make up         # builds the images; database, migrations, API :8710, worker, web :3710
make up-seed    # demo accounts and computed demo data, inside the stack (a few minutes)
make down       # stop; data stays in docker volumes

Settings are read from deploy/.env (copy deploy/env.example); the defaults are a local demo. Change host ports with MENDORA_API_PORT, MENDORA_WEB_PORT and MENDORA_DB_PORT.

Start

make setup      # pinned Python and Node dependencies
make demo       # PostgreSQL, migrations, and computed demo data (a few minutes)
make api        # terminal 1: API on http://127.0.0.1:8710
make worker     # terminal 2: background worker
make web        # terminal 3: web app on http://127.0.0.1:3710

make demo does real work: it submits the repository's sample recovery programs through the intake pipeline, evaluates two rounds with the real evaluator, publishes them, and runs six customer demo jobs through the recovery runtime, including genuine process crashes. Everything it creates is labeled Demo.

Sign in

Open http://127.0.0.1:3710/login. In the local demo the sign-in page lists the demo accounts and their shared password. Each role sees a different workspace:

AccountRoleWhere to go
operator@mendora.localoperatorOperator console: rounds, queue, validators, disputes, releases, chain dry run, audit
miner.a@mendora.localminerMiner workspace: the starter, practice, packaging, submissions and results
admin@northwind.democustomer adminRecovery workspace: interrupted jobs, the job inspector, demo jobs
reviewer@northwind.democustomer reviewerRecovery workspace: review escalations

What to try

  1. Network status (/network) shows what is running and exactly why rewards are not paid.
  2. Competition (/competition) compares programs and explains why a higher score did not win.
  3. As the customer admin, start a demo job. The simulated agent is stopped on purpose; within a few seconds the worker detects the interruption and recovery takes over. Watch the job inspector fill in.
  4. As the operator, freeze and evaluate the open round, then publish it.
  5. Reproduce a published result yourself: download an evidence bundle from a round page and run backend/.venv/bin/mendora recompute <bundle.json>.

The Temporal adapter has its own demo: make temporal-demo starts a local Temporal dev server (downloaded on first use), runs an enrollment workflow whose "grant access" response is lost, and shows Mendora refusing Temporal's unsafe retry and recovering the job. It prints a link to the job inspector.

Stop and reset

Ctrl-C the three processes; make down stops PostgreSQL (data is kept). make reset deletes the demo data.

Checks

make test       # fast backend tests
make test-all   # also the real-process crash drills
make lint       # ruff, TypeScript, ESLint, sample-package drift
python3 scripts/check_secrets.py   # no credentials in tracked files
make e2e        # Playwright journeys (api, worker and web must be running)

See troubleshooting if something does not start.