Lab demo

Minimal interop flow (v0.1.1) in a controlled environment.

This lab demo runs a full MaterialDNA → Offer → Match → Transfer flow using the sandbox API. It is not a pilot or production deployment.

Run the demo locally

  1. Start infrastructure
    Bring up Postgres + Redis + MinIO with docker compose.
  2. Execute the demo
    Run the single command to migrate, seed, and simulate.
  3. Review output
    Use the timeline log and events stream for validation.
cp .env.docker.example .env.docker
docker compose --env-file .env.docker up -d
bun run lab:demo
Events stream
`/api/loop/stream` (SSE)
Event log
`/api/loop/events`
Metrics
`/api/metrics`
Privacy notice
`/api/privacy`

Optional API key protection

If you enable API key protection, write endpoints require an `x-api-key` header (or `Authorization: Bearer <key>`). This is optional and disabled by default.

API_KEY_ENABLED=true
API_KEY=change-me

Federation relay demo (two nodes)

Spins up two local node instances and relays events to demonstrate lab-only federation messaging. Nodes share a single lab database for convenience and do not represent production federation.

bun run lab:federation
Relay endpoint
`/api/loop/relay`
Events stream
`/api/loop/stream` (SSE)

Interop flow snapshot

Conceptual view of the four-step lab flow.

Lab demo flow snapshot

Event timeline preview

Sample output from the lab simulation script.

Lab demo event timeline
Express interestJoin the public interest list