Live Demo: https://collaborative-editor-g1t5.vercel.app/
InkSynk is a full-stack real-time collaborative writing platform designed to explore how shared state systems work in multi-user environments. It allows multiple users to edit the same document simultaneously while maintaining consistency across all clients using CRDTs (Conflict-free Replicated Data Types).
The editor is built using Yjs for synchronization, TipTap for rich text editing, and WebSockets for real-time communication. In addition to collaboration, the platform includes document management features and an AI-powered summarization tool to enhance usability.
The goal of this project was to understand how real-time collaboration systems function beyond basic socket communication. Instead of relying on simple broadcast updates, the system uses Yjs to handle conflict resolution and merging of edits across multiple users without data loss.
The project also explores how AI features can be layered on top of interactive systems, rather than being used in isolation.
- Multiple users can edit the same document simultaneously
- Changes are reflected instantly across all connected clients
- Built using Yjs (CRDT) to ensure conflict-free updates
- Each document is associated with a unique room ID
- Users can join via shareable links
- Supports different visibility modes (public / unlisted / private)
- Displays active users in a document session
- Maintains user identity across a session
- Cursor/presence system implemented (basic level)
- Built with TipTap (ProseMirror)
- Supports formatting such as headings, lists, bold, italic, etc.
- Explore public rooms
- View previously accessed documents (local history)
- Access-controlled room entry
- Export document as PDF (via print flow)
- Export document as HTML
- Generate summaries of document content
- Supports multiple providers (Hugging Face, OpenAI, Gemini)
- Designed as an assistive feature within the editor workflow
- Light/Dark mode with persistent theme
- Responsive layout
- Basic animations for smoother interaction
- React (Vite)
- TipTap Editor (ProseMirror)
- Yjs (y-websocket, y-indexeddb)
- React Router
- Node.js + Express
- WebSocket server (ws)
- MongoDB with Mongoose
- Yjs persistence (y-mongodb-provider)
- Hugging Face (via backend proxy)
- OpenAI / Gemini (client-side integration)
The system is divided into two main parts:
- Each room corresponds to a shared Y.Doc
- Clients connect via WebSocket provider
- Updates are propagated and merged using CRDT logic
- Local persistence is handled using IndexedDB for resilience
- Handles room creation, deletion, and access control
- Stores room metadata in MongoDB
- Persists Yjs document updates using MongoDB provider
- Provides API endpoint for summarization (Hugging Face)
When a user joins a room:
- A shared Yjs document is initialized or loaded
- The client connects to the WebSocket server
- Changes made in the editor are converted into Yjs updates
- Updates are broadcast to all connected clients
- CRDT ensures that all changes are merged consistently without conflicts
This approach avoids issues like overwriting content or race conditions that occur in naive real-time implementations.
node server.js