Agent-based dashboard: how a deepfake spreads through a school network, and where a limited education budget actually helps. Illustrative, not validated.
Starts the Go API and the Vite dev server as background jobs; 'wait -n' returns when the first one exits and the EXIT trap kills the rest, so one Ctrl-C (or either server crashing) stops everything. Installs web/node_modules on first run. Verified: both ports respond, SIGINT leaves no orphan processes. |
||
|---|---|---|
| cmd/spreadlab | ||
| internal | ||
| web | ||
| .gitignore | ||
| dev.sh | ||
| generate.go | ||
| go.mod | ||
| go.sum | ||
| LICENSE | ||
| README.md | ||
| tygo.yaml | ||
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 2, thin API + parity page done.
Layout
internal/engine/- the pure simulation engine (no web dependencies)internal/api/- thin JSON API over the enginecmd/spreadlab/- the server binary (-tableprints a CLI comparison)web/- Vue 3 + TypeScript frontend (Vite)web/src/types/- TypeScript types GENERATED from the Go structs; never edit by hand, regenerate withgo generate ./...
Development
One command (installs frontend deps on first run, Ctrl-C stops everything):
./dev.sh
Or manually, in two terminals:
go run ./cmd/spreadlab # API on localhost:8080
cd web && npm run dev # Vite dev server, proxies /api to :8080
Checks:
go test ./... # engine + API tests
golangci-lint run ./... # Go linter
go test -bench=. -benchmem ./internal/engine/ # benchmark baseline
cd web && npm run test:unit && npm run lint && npm run type-check
After changing Config, Result, or the API response types, run
go generate ./... and commit the regenerated files in web/src/types/.
MIT licensed.