Shared board
Go writes to D1, then the topic's Durable Object pushes the fragment to every open tab over hx-ws.
How the board works
- Each change is a form post to a Go handler on the Worker. It writes to D1, Cloudflare's SQLite database and the board's only source of truth, and raises the topic's version.
- The handler then renders the whole board once per language and hands it to the topic's Durable Object, which sends it to every open tab. Nothing is merged in the browser: each push replaces the board.
- Tabs stay connected with htmx 4's hx-ws over WebSocket Hibernation, so a thousand quiet tabs cost almost nothing until something changes. The badge counts who is here.
- Every push carries the version it was made from. A tab ignores a push older than the board it shows, so changes that cross on the network never go backwards.
- Each connection can make 60 changes in 10 seconds, and a topic holds up to 1,000 open tabs.