Static dashboard for the LoopGain telemetry. Vanilla HTML + JS + Chart.js via CDN. No build step. Deployable to Cloudflare Pages, GitHub Pages, or any static host.
Three panels in v0.1:
- Loop Health Map — recent loops colored by outcome (converged / stalling / oscillating / diverged / max_iterations).
- Convergence Profiles — smoothed Aβ median + max per loop over time. Drift upward = prompts or models getting harder. Optional filter by
workload_id. - Waste Report — iterations saved vs an assumed fixed cap of 10, with a configurable per-iteration cost for $-conversion. The ROI panel.
Plus a KPI strip (30-day totals: loops, iterations saved, rollbacks, outcome breakdown).
Future panels (Gain Margin Distribution, Rollback Log detail, ETA Accuracy) are deferred to v0.2 — see the LoopGain product spec for the full six-panel design.
[user browser] --bearer-auth--> [telemetry-receiver Worker] --D1--> [loop_events]
The dashboard is fully client-side. It reads from the receiver's API directly using the user's bearer token, stored in localStorage (never sent anywhere except the configured endpoint). No backend; no database; no cookies; no third-party tracking; no telemetry of its own.
External dependencies, all CDN-loaded with defer:
- Chart.js 4.4.0 — line charts only
That's the entire dependency surface.
Any static file server works:
# Python 3
python3 -m http.server 5173
# Or Node
npx serve .Open http://localhost:5173. Click Connect, paste your endpoint URL and bearer token, and the dashboard loads.
# One-time
npx wrangler pages project create loopgain-dashboard
# Deploy
npx wrangler pages deploy . --project-name=loopgain-dashboardAfter deploy, point your domain DNS (e.g., dashboard.loopgain.ai or just loopgain.ai) at the Pages project. Cloudflare auto-issues TLS.
You need:
- The endpoint URL of your telemetry receiver (e.g.,
https://telemetry.loopgain.ai). - A bearer token. The receiver's operator issues this — see the receiver README.
On first load, the dashboard shows a connect prompt. Paste both values; they're stored in localStorage and reused on subsequent visits.
To rotate or disconnect: click config in the header and update or clear the form.
Both the receiver and the dashboard are Apache-2.0. To run the full stack under your own control:
- Clone and deploy the telemetry-receiver to your Cloudflare account.
- Clone this repo and deploy to Cloudflare Pages (or any static host).
- Issue a token via the receiver's
scripts/issue-token.mjs. - Point the library's
send_telemetry(endpoint=...)at your receiver. - Point your browser at your dashboard, paste the endpoint + token, done.
Nothing leaves your infrastructure.