
What it is
A shared workspace where several people edit the same page at once. A page can mix rich text, checklists, code blocks (CodeMirror) and tldraw canvases. You see other people’s cursors and presence, and you can leave comments and mentions.
- Sharing. New pages are private. You invite people as owners, editors or viewers. The server enforces viewer permissions, so hiding the edit buttons isn’t the only thing stopping a viewer.
- History. Edits are grouped into 30-second entries. You can compare an entry with the one before it and restore an old version without losing what came after.
- Assistant. You can ask Gemini about the page or ask it for a change. Suggested edits show up as a diff and only apply after you approve them.
- Background jobs. PDF export, search indexing and link previews run in a separate BullMQ worker.
How it works
The client is React and Vite. Every edit is a Yjs update sent over a WebSocket to a Node gateway. The gateway authenticates the user, checks their role, validates the update and saves it to Postgres. Only then does it publish the update to Redis, which fans it out to the other gateway replica and on to the other browsers.
The update is saved to Postgres before it is published to Redis.
Saving before broadcasting means reconnects, replay and version restore all work from the same durable sequence, whichever replica a client lands on.
Locally it runs in Docker Compose: Nginx, two gateways, a worker, Postgres, Redis, Prometheus, Grafana and Jaeger. On AWS, Terraform sets up a load balancer, two ECS Fargate gateway tasks, RDS Postgres, ElastiCache Redis, ECR, Secrets Manager and CloudWatch.

Results
I brought up a short-lived AWS staging environment in us-east-2, ran the benchmarks, and tore it down. Each client authenticated and sent real Yjs updates (3 edits each), and a run passed only if every client ended on the same document state. The times below measure how long an edit took to reach the other clients:
| Clients | Edits | p50 | p95 | p99 | Converged |
|---|---|---|---|---|---|
| 25 | 75 | 561 ms | 1,140 ms | 1,238 ms | 25/25 |
| 50 | 150 | 1,119 ms | 2,029 ms | 2,138 ms | 50/50 |
| 100 | 300 | 3,555 ms | 5,645 ms | 5,979 ms | 100/100 |
All three runs had zero connection errors. Propagation time grows quickly with the number of clients on one page.
I also stopped one gateway task in the middle of a workload. With 8 clients and then 16, ECS replaced the task and every client converged. The surviving gateway kept the sockets open, so no client had to reconnect. That means the AWS run doesn’t test reconnects. A local chaos run does: 8 edits accepted, 8 saved, 0 lost, 0 duplicated, one client reconnected, and the document converged.
The server has 113 tests covering auth, roles, persistence, fan-out, recovery, invitations and concurrent edits.
Limits
- The AWS environment used a single-AZ database and one Redis node, sized for testing.
- I haven’t measured more than 100 clients on one page.