The worker uses Cloudflare Durable Objects for real-time WebSockets. Each collaboration "room" = 1 Durable Object with persistent WebSocket connections. Changes are broadcast instantly (<1 second) to all collaborators.
The server only sees AES-256-GCM-encrypted blobs — zero knowledge of the data.
npm install -g wrangler
wrangler login
→ Opens the browser; click "Allow"
cd worker/
wrangler kv namespace create ROOMS
→ The command displays an ID. Update wrangler.toml:
[[kv_namespaces]]
binding = "ROOMS"
id = "YOUR_ID_HERE"
wrangler deploy
→ Displays the worker's URL: https://mg-sync.YOUR-SUBDOMAIN.workers.dev
curl "https://mg-sync.YOUR-SUBDOMAIN.workers.dev/room/test/presence?client=test1"
# Should return: {"count":0}
The worker URL is pre-filled in MasterGantt (Settings → Collaboration → Server). To use your own worker, replace the URL.
After modifying sync-worker.js:
cd worker/
wrangler deploy
That's it — deployment takes ~15 seconds.
Cloudflare account : steevebecker
Subdomain : mastergantt.workers.dev
Worker URL : https://mg-sync.mastergantt.workers.dev
KV namespace ID : c2fe1889c94b4d55ad68f9d244bd812f
Plan : Workers Paid ($5/month)
| File | Role |
|---|---|
sync-worker.js | Main worker + Durable Object SyncRoom |
wrangler.toml | Deployment configuration (KV, DO bindings) |
Client A (browser) Cloudflare Worker Client B (browser)
| | |
|-- WebSocket connect ------>| |
| |<-- WebSocket connect ----|
| | |
|-- WS: encrypted blob ----->| |
| DO broadcast |
| |---> WS: encrypted blob ->|
| | decrypt + merge
| | |
| Component | Free plan | Workers Paid ($5/month) |
|---|---|---|
| Worker requests | 100k/day | 10M/day |
| Durable Objects | — | $0.15/million req |
| WebSocket messages | — | $0.50/million msg |
| KV reads | 100k/day | Unlimited |
| KV writes | 1k/day | Unlimited |
Realistic estimate: 10 active users × 8 hours = ~$0.05/day = ~$1.50/month in additional costs.
To use sync.mastergantt.com:
sync.mastergantt.comProvide the worker/ folder — they deploy it to their own Cloudflare account. The worker only sees encrypted blobs, no plaintext data.
| Problem | Solution |
|---|---|
| 500 Internal Error | wrangler tail to view logs in real time |
| WebSocket not connecting | Check that the plan is Workers Paid (DO required) |
| Blobs not received | Check that both clients are on the same room/password |
| "KV put limit exceeded" | Switch to the Paid plan or wait for the daily reset |
| Deployment fails | wrangler login to renew the token |
The default server is ready to use. Deploying your own worker only becomes useful for specific sovereignty requirements.
Download MasterGantt