Monorepo layout:
frontend/— browser UI (Vite SPA +xterm.jsfor the MVP terminal).broker/— public HTTPS + WebSocket server that pairs the browser and the agent.agent/— Linux binary on your machine; outbound connection to the broker + PTY.
Integration contract (cross-cutting): docs/mvp-integration.md
Per-component specs (for parallel implementation):
- broker/SPEC.md — HTTP + WebSocket server, pairing, relay, env, CORS
- agent/SPEC.md — Linux binary, outbound WS, PTY, ready file, CLI
- frontend/SPEC.md — Vite SPA, status/login/terminal,
xterm.js,VITE_BROKER_URL
Run broker locally: copy .env.example to .env, fill in secrets (generate BROKER_PASSWORD_HASH with cd broker && go run ./cmd/hash-password '…'), then load env and start:
cd broker && set -a && . ../.env && set +a && go run ./cmd/brokerUse bash (or export the variables however your host expects). See broker/README.md for defaults like the 90s heartbeat window.