
Co-Edit
Built a real-time collaborative editor with CRDT-based synchronization, AI-powered writing commands, and offline-first document persistence.
Timeline
HCL Hackathon (GUVI)
Role
Fullstack
Team
Piyush Dhoka
Status
CompletedTechnology Stack
Key Challenges
- Bun conflicts while deploying websocket servers via ssh
- Handling conlict resolution between collaborators
- Managing latest packages of tiptap extensions
Key Learnings
- Deep dive into Yjs and CRDT data structures
- Real-time sync patterns using y-websocket and awareness layers
- Version control implementation on documents
Co-Edit: Real-Time Collaborative Editor
Overview
Co-Edit is a collaborative editor built during the HCL Hackathon (GUVI) to deliver fast, conflict-free multi-user editing using Yjs CRDTs. The app focuses on low-latency sync, offline-first reliability, and a smooth writing experience with rich text formatting and AI-assisted commands.
It combines a Next.js frontend, a Node.js + Express backend, WebSocket-based synchronization, and Neon PostgreSQL for persistence.
Why I Built This
- Traditional collaborative editors can feel delayed when many users edit at once.
- I wanted to integrate auto complete and professional rewrite of the document in the editor itself instead of playing between Editor and ChatGPT
- I also wanted to explore CRDT architecture deeply and build a practical, production-style project around it.
Key Features
- CRDT-Powered Real-Time Sync: Conflict-free collaboration with Yjs over WebSocket.
- Offline-First Editing: Local persistence with IndexedDB and seamless reconnect sync.
- Presence and Awareness: Live cursors, active-user indicators, and collaborator state.
- AI Writing Commands: Refine, summarize, and continue-writing commands powered by Groq.
- Rich Text Experience: Tiptap editor with professional formatting tools.
- Versioning and Recovery: Timeline-based history and restore flow.
- Export and Sharing: Document export and share-ready collaboration links.
System Architecture

Lessons Learned
- CRDTs require an eventual-consistency mindset rather than server-ordered operations.
- Binary Yjs updates dramatically reduce payload size for high-frequency edits.
- Presence synchronization is as important as document synchronization for collaboration UX.
- Offline-first persistence improves both reliability and perceived performance.
- Low-latency LLM APIs are practical for interactive editor workflows.
