| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
parent directory.. | ||||
One HTML page (plus a JSON API) showing every plugin loaded on the server, each probed live over loopback on every request. It is deliberately the simplest possible ops surface — and it is the first live consumer of two shipped plugin-API seams: it auto-discovers its co-loaded siblings from api.plugins (#610) and reaches the host over loopback via api.serverInfo (#601), both landed in JSS 0.0.218. This plugin drove the need for both seams and now runs on them — no hand-maintained list, no origin in config.
import { createServer } from 'javascript-solid-server/src/server.js';
const fastify = createServer({
root: './data/pods',
plugins: [
{ id: 'relay', module: 'plugins/relay/plugin.js', prefix: '/relay' },
{ id: 'capability', module: 'plugins/capability/plugin.js', prefix: '/cap' },
{ id: 'rss', module: 'plugins/rss/plugin.js', prefix: '/feed',
config: { baseUrl: PUBLIC_URL } },
// No plugins list, no loopbackUrl — the dashboard discovers everything
// above via api.plugins and finds the host via api.serverInfo. The only
// config is optional per-plugin probe *refinement*:
{ id: 'dashboard', module: 'plugins/dashboard/plugin.js', prefix: '/dashboard',
config: {
probes: {
relay: { kind: 'ws' }, // a WebSocket endpoint
rss: { probe: '/feed/atom' }, // a better liveness path than bare /feed
// capability: { expect: [200] }, // declare a stricter "up"
},
} },
],
});{
"generated": "2026-07-11T12:00:00.000Z",
"server": { "alive": true, "status": 200, "latency_ms": 2 },
"plugins": [
{ "id": "rss", "probe": "/feed/atom", "kind": "http",
"alive": true, "state": "degraded", "status": 400, "latency_ms": 3 }
]
}The plugin list comes from api.plugins — you don't supply it. Each discovered plugin is probed at its own prefix by default; config.probes optionally refines a single plugin's probe as { probe?, expect?, kind? }:
Live /dashboard/ from npm run serve — 32 plugins auto-discovered via api.plugins, each probed over loopback. up = 2xx/3xx or a matched expect; degraded = a 4xx from a guarded surface (alive, but a bare-prefix probe can't say more — finding 1's residual); nothing down.
A single narrow column, system font, honest table: plugin | probe | status | http | latency. First row is the server itself, then one row per discovered plugin — id, probe path in code (ws probes tagged with a small ws chip), a pill badge (green up, amber degraded, red down), the HTTP status ("—" when nothing answered), latency in tabular numerals. Everything inline: no external assets, one small script that re-fetches status.json every refreshMs (default 5s). Dark-mode via prefers-color-scheme. Without JS you still get the discovered list, so curl shows the inventory.
| capability | status |
|---|---|
| list every loaded plugin | ✅ auto-discovered from api.plugins (#610) — no hand-copied list |
| find the host to probe it | ✅ api.serverInfo (#601) — no loopbackUrl in config |
| live liveness per plugin | ✅ anonymous loopback GET, <500 = alive, expect to sharpen |
| host self-check | ✅ GET / non-5xx |
| meaningful per-plugin probe | ⚠️ default = the plugin's prefix; refine via config.probes (finding 1) |
| ws endpoint health | ⚠️ plain-HTTP approximation only (finding 3) |
| deep health (deps, storage, queue lag) | ❌ out of scope; surface liveness only |
node --test --test-concurrency=1 dashboard/test.js
Boots one JSS (≥ 0.0.218) carrying the dashboard plus three real siblings (rss, capability, relay), with no hand-fed list and no loopbackUrl, and asserts: auto-discovery names every sibling, the JSON shape, the alive/expect/down semantics, the no-cache property, an empty-server render, and the config.probes validation throws (ordered before the long-lived boot — the DATA_ROOT footgun).
| Back | FazBrowse Home | New Git URL |