Spaces:
Sleeping
Matrix Context β frontend (control plane / admin UI)
The single source of truth for the web UI. A self-contained, zero-dependency
operator console (Overview Β· Inspector Β· Ingest Β· Memory Β· Experts Β· Routing Β·
Benchmarks Β· MoC Contract Β· Settings) wired to the live MoC Contract v1 API.
Used both for native/local runs and as the app inside the Hugging Face Space
(../hf/, which builds from this folder β the UI is not duplicated).
frontend/
βββ server.py # launcher: serves app/ + the live /v1 API (reuses the backend), seeds demo data
βββ app/ # the SPA (no React/Babel/CDN for logic; fonts from Google Fonts)
βββ index.html # shell + matrix-rain canvas
βββ styles.css # emerald-glass theme
βββ api.js # live /v1 adapter (maps backend shapes for the UI)
βββ app.js # the views
βββ assets/ # logo
Run (native / local)
pip install -e ".[dev]" # from the repo root
python frontend/server.py # -> http://127.0.0.1:7860
Environment: HOST (default 127.0.0.1), PORT (default 7860),
MATRIX_CONTEXT_PATH (default :memory:).
Hugging Face
The Space packaging (Dockerfile + card + deploy) lives in ../hf/ and
builds from this folder. Deploy with python hf/deploy.py --repo <user>/<space>.
How it talks to the backend
The UI calls the same-origin /v1 surface; the Ingest wizard runs in Compatible
Mode (client-side chunking β POST /v1/remember, metadata stored as tags). It is
additive β server.py imports the published backend and serves the existing
dispatch; nothing in the engine is modified.