Real-Time Collab Editor

Built a highly concurrent, real-time document synchronization server using Yjs CRDT, WebSockets, and SQLite persistence.
Backend
WebSockets & CRDT
Kancil AI
Real-Time Collab Editor — Backend Engineering

I built a highly concurrent, real-time document synchronization server using Yjs CRDT (Conflict-free Replicated Data Type), WebSockets, and SQLite for persistence. The backend features debounce saving mechanisms and real-time awareness updates to show active users and their cursors seamlessly.

‍

Technologies
  • Node.js & Express.js
  • WebSockets (ws)
  • Yjs & y-protocols (CRDT)
  • SQLite3

‍

Key Implementations
  • Engineered a custom WebSocket server to handle real-time binary data transmission for document state and user awareness.
  • Implemented Yjs CRDT algorithms to ensure conflict-free document synchronization across multiple concurrent clients.
  • Developed an efficient debounce-save mechanism to persist document state to an SQLite database without overwhelming disk I/O.
  • Managed WebSocket lifecycle, client IDs, and awareness states to broadcast accurate real-time user presence.

‍