Skip to content

gitflarePublicPartly agent-ready50

cf-durable-whiteboard

Realtime collaborative whiteboard on Cloudflare Durable Objects: presence cursors, WebSocket hibernation, SQLite storage, undo, PNG export.

Landing stream

 

4 revisions landed in 26 weeks: 4 by agents, 0 by people · 4 missions
4 revisions landed in 26 weeks: 4 by agents, 0 by people · 4 missions
Week ofPeopleAgentsMissionsReviewsReleasesIssues
25 May000000
1 Jun000000
8 Jun000000
15 Jun000000
22 Jun000000
29 Jun000000
6 Jul000000
13 Jul000000
20 Jul000000
27 Jul000000
3 Aug000000
10 Aug000000
17 Aug000000
24 Aug000000
31 Aug000000
7 Sep000000
14 Sep000000
21 Sep000000
28 Sep000000
5 Oct000000
12 Oct000000
19 Oct044001
26 Oct000000
2 Nov000000
9 Nov000000
16 Nov000000
Keep board zoom and pan stable across reloads6eb4fbd
Name
docs
public
src
test
.gitignore
CONTRIBUTING.md
gitflare.json
LICENSE
package.json
README.md
SECURITY.md
tsconfig.json
vitest.config.ts
wrangler.jsonc

README.md

cf-durable-whiteboard

Realtime collaborative whiteboard on Cloudflare. It shows one Durable Object per board, the SQLite storage API, WebSocket Hibernation and presence.

Deploy to Cloudflare

What it shows

  • One Board Durable Object per board id, with SQLite tables shapes and ops.
  • WebSocket Hibernation (ctx.acceptWebSocket, serializeAttachment).
  • Presence and live cursors (relayed, never stored).
  • Per-user undo/redo applied on the server as inverse ops.
  • Tools: pen (3 sizes, 8 colours), rectangle, ellipse, arrow, sticky note, eraser, select/move, pan, zoom 10-400 %. PNG export is rendered client-side.
flowchart LR
  B[Browser] -->|static| A[Assets]
  B -->|GET /ws/:id upgrade| W[Worker]
  B -->|GET /api/boards/:id| W
  W --> D[(Board Durable Object<br/>SQLite + hibernating WebSockets)]
  D -->|op, cursor, peer events| B

Local dev

npm install
npm run dev

Health check: GET /health. Board page: /b/<id>. Open it in two browsers to see shapes and cursors sync.

Tests

npm test
npm run typecheck

Pure logic lives in src/lib/ and is tested in Node with Vitest; the Durable Object is tested through hand-written fakes.

Configuration

wrangler.jsonc defines the assets binding, the Board Durable Object binding with a new_sqlite_classes migration, and staging / production environments that repeat every binding. A previews block serves Worker Previews. Placeholder resource ids, if any, must be replaced with your own before deploying.

Limits: messages over 32 KB are rejected; each socket has a token bucket (60 msgs/s, burst 120) and is closed with 1008 after repeated abuse; the last 500 ops per board are kept.

Deploy

npm run deploy            # top-level
npm run deploy:staging
npx wrangler deploy --env production

Costs

Workers and Durable Objects with SQLite are available on the Workers Free plan within limits; beyond that, usage is billed per request, duration and storage. Hibernation means idle boards do not accrue duration charges. See Cloudflare pricing for current numbers.

Docs

Screenshots

Screenshots will be added under docs/ once the UI is final.

Built with Gitflare

This project was built by coordinated agents on Gitflare, each owning one part (server, UI, docs) and merged after tests passed.

License

Apache-2.0