Real-Time Collaborative Document Editor
A Google-Docs-style editor where multiple users edit the same document live.
When two people edit the same document at once, the system must merge their changes so that both see the same result, even when their edits arrive in a different order because of network delay. Getting this wrong loses text or leaves each person with a different document. This project builds a Google-Docs-style editor in which several users edit the same document live.
The core problem is solved with a conflict-free approach: either operational transformation, which adjusts each operation against concurrent ones, or a CRDT, in which every character has a unique identity so that edits commute and always converge. The project explains both, implements one in TypeScript and proves its behaviour with randomized tests that apply operations in different orders. A WebSocket server relays changes between clients, keeps the authoritative document, and stores it in Redis and a database with periodic snapshots. The React editor shows each collaborator's cursor and selection through presence indicators, supports offline edits that merge on reconnection and keeps a version history so that changes can be undone. Performance is measured with many simultaneous editors and large documents.
You will learn distributed consistency, WebSocket communication and rich-text editing. The Project Reference Guide explains the algorithms with worked examples, and the Reference Implementation includes the editor, server and test suite.