Bonded-escrow marketplace for prompt → response between buyers and
local-LLM suppliers, settling on Vector (UTxO) via Aiken Plutus V3
validators. Lifecycle PostEscrow → Claim → Submit → Accept proven on
Vector testnet 2026-05-06; AcceptEscrow tx 125e3cfe…7dc100d distributes
payment + bonds per the validator's distribution rule.
Workspace layout (pnpm + TypeScript):
contracts/marketplace/ Aiken validators (advert + escrow) + plutus.json
packages/shared/ Tx-builders (lucid-evolution), CBOR codecs,
chain providers (mock / read-only / live Ogmios)
supplier/ OpenAI-compatible HTTP node (Ollama by default;
vLLM / llama.cpp / OpenRouter / OpenClaw all
swap-in via OLLAMA_URL); 202+poll chat handler
buyer/ Express + React SPA; server-side runs the full
chain lifecycle via /v1/submit-prompt and
/v1/accept; SPA never holds the buyer key
indexer/ Chain-follower (extends apex-dashboard pattern),
SSE event stream + REST queries
indexer-ui/ Operator dashboard (events + suppliers + escrow
lookup)
tests/ 1098 vitest unit + integration tests (10 skipped
under M1-F-D-defer for UPLC test plumbing)
deploy/testnet/ Per-service docker-compose for the Hetzner stack
docs/EXECUTIVE_SUMMARY.* Marp deck (PDF + PPTX) — 11 slides, mermaid
diagrams pre-rendered for portable export
docs/CLOUDFLARE_WAF_BYPASS.md CF Skip-rule runbook for /v1/* paths
docs/ARCHITECTURE.md canonical spec
Live demo (testnet, 2026-05-06):
https://mp-buyers.vector.testnet.apexfusion.org (buyer SPA)
https://mp-suppliers.vector.testnet.apexfusion.org (supplier API)
https://mp-indexer.vector.testnet.apexfusion.org (indexer + UI)
73 lines
2.6 KiB
YAML
73 lines
2.6 KiB
YAML
# MAINNET DEPLOYMENT — DEFERRED
|
|
# Wired but not yet exercised. Mainnet rollout requires:
|
|
# - ARCHITECTURE.md §9 #5 (mainnet safety: env-gate, wallet allowlist, MAINNET=1 flag)
|
|
# - Real funded mainnet wallets
|
|
# - Vector mainnet ogmios stack (apex-dashboard-mainnet) running on the same host
|
|
# Do NOT `docker compose up` until those land.
|
|
#
|
|
# deploy/mainnet/docker-compose.supplier.yml — Supplier — MAINNET
|
|
#
|
|
# Mirrors the testnet supplier compose, with three changes:
|
|
# - container_name + project name use the marketplace-mainnet- prefix
|
|
# - apex-net is bound to apex-dashboard-mainnet_mainnet-net
|
|
# (created by the apex-dashboard-mainnet stack)
|
|
# - Traefik router name + Host rule drop the `testnet.` infix
|
|
#
|
|
# Pre-flight networks (must already exist):
|
|
# docker network create marketplace-mainnet-net # one-shot
|
|
# # apex-dashboard-mainnet_mainnet-net is created by apex-dashboard-mainnet
|
|
# # dashboard_default is created by the Traefik project
|
|
|
|
name: marketplace-mainnet-supplier
|
|
|
|
services:
|
|
supplier:
|
|
build:
|
|
context: ../..
|
|
dockerfile: supplier/Dockerfile
|
|
container_name: marketplace-mainnet-supplier
|
|
restart: unless-stopped
|
|
env_file:
|
|
- path: ../../supplier/.env
|
|
required: false
|
|
environment:
|
|
OLLAMA_URL: http://marketplace-mainnet-ollama:11434
|
|
OGMIOS_URL: ws://ogmios:1337
|
|
PORT: "8080"
|
|
# NETWORK_ID intentionally not pinned here — it MUST come from the
|
|
# operator-provided supplier/.env on a mainnet host. Setting it via
|
|
# compose would be a footgun: a stray re-up on testnet hardware could
|
|
# silently re-tag the supplier as mainnet.
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "wget -qO- http://localhost:8080/healthz >/dev/null || exit 1"]
|
|
interval: 20s
|
|
timeout: 5s
|
|
retries: 3
|
|
start_period: 15s
|
|
networks:
|
|
- marketplace-mainnet-net
|
|
- apex-net
|
|
- traefik-net
|
|
labels:
|
|
- "traefik.enable=true"
|
|
- "traefik.docker.network=dashboard_default"
|
|
- "traefik.http.routers.mp-suppliers-mainnet.entrypoints=web"
|
|
- "traefik.http.routers.mp-suppliers-mainnet.rule=Host(`mp-suppliers.vector.apexfusion.org`)"
|
|
- "traefik.http.services.mp-suppliers-mainnet.loadbalancer.server.port=8080"
|
|
logging:
|
|
driver: json-file
|
|
options:
|
|
max-size: "10m"
|
|
max-file: "3"
|
|
|
|
networks:
|
|
marketplace-mainnet-net:
|
|
external: true
|
|
name: marketplace-mainnet-net
|
|
apex-net:
|
|
external: true
|
|
name: apex-dashboard-mainnet_mainnet-net
|
|
traefik-net:
|
|
external: true
|
|
name: dashboard_default
|