collab-board
collab-board is a single-binary fullstack app: a Svelte 5 (runes mode) + TypeScript SPA built by Vite, embedded into a Go server via //go:embed. One binary, zero runtime dependencies on top of the OS, and one deploy. The frontend bundle is ~9 KB JS / ~4 KB CSS gzipped. No UI library, no router, no state framework, just a small reactive client class and a canvas controller that owns the drawing surface.
The UI is pointer-event driven so touch and stylus work alongside mouse without a second code path. The eraser uses canvas destination-out compositing to remove pixels rather than paint over them, and the canvas controller keeps a replay buffer so resizing the window (or arriving late to a room) both rebuild the raster from the same list. New members get a server-sent snapshot of the room's strokes before any new broadcasts, so they walk into a board that already has art on the walls instead of an empty canvas. The visual identity leans into a warm, atelier-toned dark theme with an amber accent rather than the default cool-blue SaaS aesthetic.
Under the hood the concurrency model is unchanged from the all-backend version and is still the project's most interesting design choice. Each connection runs two goroutines (one read pump, one write pump) communicating over a bounded outbound channel. Each room runs one goroutine that owns the member map and the bounded stroke history (no mutexes, no shared state) and processes join/leave/inbound events serially. Broadcasts use a non-blocking TrySend: if a client's send buffer is full, the room evicts that client rather than stall the whole room on the slowest member. The bundled load test demonstrates this: it can deliberately freeze one client and show the server evicting it while the other 49 stay healthy.
The runtime stack stays deliberately small. Server: Go standard library (net/http, log/slog, embed, context, sync/atomic) plus one third-party dependency (coder/websocket). Client: Svelte + Vite at build time only. Observability is a hand-rolled Prometheus /metrics endpoint and JSON-structured slog output. The Dockerfile is a three-stage build (node for the frontend, golang for the backend, distroless/static-debian12:nonroot for the runtime) for a minimal attack surface and a small image.