Realtime rooms on Cloudflare Workers + Durable Objects.
RoomBox is a small collaboration app where each room is owned by one Durable Object. That makes it a clean example for:
- live room state
- ordered message handling
- presence tracking
- per-room storage
GET /landing pageGET /room/:roomIdroom UIGET /api/rooms/:roomId/stateroom snapshotPOST /api/rooms/:roomId/messagesend a messageGET /api/rooms/:roomId/connectWebSocket connection
wrangler devwrangler deployThe worker is configured for:
roombox.ucalyptus.me
Each room gets its own Durable Object instance. The object stores message history, broadcasts updates to connected clients, and keeps presence counts in one place.