Agent-based dashboard: how a deepfake spreads through a school network, and where a limited education budget actually helps. Illustrative, not validated.
Find a file
Justin Visser e9f36f509e api: JSON API over the engine; server mode in cmd/spreadlab
internal/api stays a translation layer: decode (with
DisallowUnknownFields so typos 400 instead of silently defaulting),
run the engine, encode; all validation stays in the engine. Routes use
Go 1.22 mux patterns ('POST /api/comparison'), so wrong methods get
405 from the stdlib for free. httptest runs handlers fully in memory;
the API test re-pins the 99/70/7 golden values end to end.
ComparisonResponse is added to tygo.yaml with a type mapping so the
generated web/src/types/api.ts reuses the engine's TS types.
cmd/spreadlab now serves on -addr (default localhost:8080); -table
keeps the CLI comparison as a sanity check.
2026-06-10 13:03:12 +02:00
cmd/spreadlab api: JSON API over the engine; server mode in cmd/spreadlab 2026-06-10 13:03:12 +02:00
internal api: JSON API over the engine; server mode in cmd/spreadlab 2026-06-10 13:03:12 +02:00
web api: JSON API over the engine; server mode in cmd/spreadlab 2026-06-10 13:03:12 +02:00
.gitignore batman 2026-06-10 11:57:10 +02:00
generate.go types: generate TypeScript from engine structs with tygo 2026-06-10 12:58:13 +02:00
go.mod types: generate TypeScript from engine structs with tygo 2026-06-10 12:58:13 +02:00
go.sum types: generate TypeScript from engine structs with tygo 2026-06-10 12:58:13 +02:00
LICENSE batman 2026-06-10 11:57:10 +02:00
README.md batman 2026-06-10 11:57:10 +02:00
tygo.yaml api: JSON API over the engine; server mode in cmd/spreadlab 2026-06-10 13:03:12 +02:00

spreadlab

Self-hosted dashboard that runs an agent-based deepfake-spread model live: change the levers, watch the spread, and (later) search for the best intervention under a budget. Output is illustrative, not validated.

Status: milestone 1, porting the simulation engine.

Layout:

  • internal/engine/ - the pure simulation engine (no web dependencies)
  • cmd/spreadlab/ - the server binary (milestone 2)
  • web/ - Vue 3 + TypeScript frontend (milestone 2+)

MIT licensed.