M1-F: end-to-end LLM marketplace lifecycle on Vector testnet
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)
This commit is contained in:
52
deploy/testnet/docker-compose.ollama.yml
Normal file
52
deploy/testnet/docker-compose.ollama.yml
Normal file
@@ -0,0 +1,52 @@
|
||||
# deploy/testnet/docker-compose.ollama.yml — Ollama (local LLM) — TESTNET
|
||||
#
|
||||
# REVIEW DRAFT. Independent compose project so it can be started/stopped
|
||||
# without affecting supplier/indexer/buyer.
|
||||
#
|
||||
# Networks:
|
||||
# - marketplace-net (external) — internal service-to-service hostname
|
||||
# `marketplace-ollama` resolves here. The supplier reaches Ollama via
|
||||
# http://marketplace-ollama:11434.
|
||||
#
|
||||
# One-shot prerequisite (run once on the host):
|
||||
# docker network create marketplace-net
|
||||
#
|
||||
# Bring up:
|
||||
# docker compose -f deploy/testnet/docker-compose.ollama.yml up -d
|
||||
#
|
||||
# After the container is healthy, pull the model:
|
||||
# docker exec marketplace-ollama ollama pull qwen2.5:0.5b
|
||||
|
||||
name: marketplace-ollama
|
||||
|
||||
services:
|
||||
ollama:
|
||||
image: ollama/ollama:latest
|
||||
container_name: marketplace-ollama
|
||||
restart: unless-stopped
|
||||
# No ports: section — ollama is reachable only via marketplace-net.
|
||||
volumes:
|
||||
- marketplace_ollama_models:/root/.ollama
|
||||
healthcheck:
|
||||
# `ollama list` exits 0 when the daemon is reachable, regardless of
|
||||
# whether any model is pulled yet.
|
||||
test: ["CMD-SHELL", "ollama list >/dev/null 2>&1 || exit 1"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 5
|
||||
start_period: 30s
|
||||
networks:
|
||||
- marketplace-net
|
||||
logging:
|
||||
driver: json-file
|
||||
options:
|
||||
max-size: "10m"
|
||||
max-file: "3"
|
||||
|
||||
networks:
|
||||
marketplace-net:
|
||||
external: true
|
||||
name: marketplace-net
|
||||
|
||||
volumes:
|
||||
marketplace_ollama_models:
|
||||
Reference in New Issue
Block a user