Sunstead trust scoring project
0

Configure Feed

Select the types of activity you want to include in your feed.

at main 38 lines 1.8 kB View raw View rendered
1# sunstead-web 2 3SvelteKit 5 UI for the Tangled trust scorer. Thin client over the FastAPI JSON 4endpoints (`trust-api`, :8003) — it never touches DuckDB. Surfaces: 5 6- `/`**Triage queue**: every open PR, searchable/sortable/filterable, each row expands to the full provenance (trust path, top factors, TreeSHAP model factors, Claude flags, content/slop risk, compliance block). 7- `/dashboard` — fast-lane & false-approval rates, score histogram, decision donut, and a force-directed **vouch graph** (`/graph`). 8- `/leaderboard` — contributors ranked by calibrated trust. 9- `/backfill` — live scrape progress (polls `/backfill/status`). 10 11## Run 12 13```sh 14bun install 15bun run dev # http://localhost:5173 ; assumes the scorer on :8003 16API_BASE=http://host:port bun run dev # point at a different scorer 17``` 18 19`mprocs` brings up the whole stack (scorer + this UI) from the repo root. 20 21`bun run build``node build` for the adapter-node production server (set 22`API_BASE` in its env). 23 24## Stack 25 26Svelte 5 runes · bits-ui · Lightning CSS (6-layer cascade in `app.css`) · 27unplugin-icons/lucide · svelte-sonner · zod (validates every API response) · 28better-result · adapter-node. 29 30`/api/*` is a same-origin proxy (`routes/api/[...path]`) to the scorer, so there's 31no CORS and dev/prod fetch the same way. 32 33Skipped from the house stack — not needed by a read-only dashboard, add when warranted: 34superforms/formsnap & sveltednd (no forms or DnD), paraglide (single locale), 35tanstack/table-core (`$derived` sort/filter/paginate covers thousands of rows; 36add table-core for column virtualization or faceting), layerchart (the published 371.x is Tailwind-coupled and renders axes invisible on dark — the two charts are 38hand-rolled SVG; revisit if charts need axes/tooltips/zoom).