Overview
Real-time collaborative workspace with rich-text editor, Kanban board, live presence, and version history. Built with CRDT conflict-free replication using Yjs + ProseMirror so multiple users can edit simultaneously with automatic conflict resolution. Features per-user multiplayer undo/redo, drag-and-drop Kanban with fractional indexing, snapshot-based version history, invite system with editor/viewer roles, JWT in-memory auth with rotating refresh tokens and reuse detection.
The Problem
Remote and hybrid teams struggle with fragmented tooling — documents in Google Docs, tasks in Trello, communication in Slack — causing context switching, version conflicts, and lost work history. Existing collaborative editors lack true real-time conflict-free editing, and most Kanban tools have no live presence awareness. There is no lightweight, self-hostable workspace that unifies rich-text editing, task management, and live collaboration in a single coherent platform without vendor lock-in.
The Solution
Pulse is a real-time collaborative workspace built with Go and Next.js that unifies a rich-text document editor, Kanban board, and live presence system. The editor uses Yjs CRDT (Conflict-Free Replicated Data Type) with ProseMirror for automatic conflict resolution — multiple users edit simultaneously without overwriting each other. The Kanban board uses fractional indexing with optimistic concurrency control for smooth drag-and-drop. Live presence shows cursors, selections, and online status in real time. JWT in-memory auth with rotating refresh tokens and reuse detection provides secure, stateless authentication.
Key Features
CRDT Collaborative Editor
Yjs-powered conflict-free rich-text editing with ProseMirror. Multiple users edit simultaneously with automatic conflict resolution — no manual merging required. Supports headings, lists, bold, italic, code blocks, and more.
Live Presence System
Real-time cursor tracking, selection highlighting, and online indicators. See exactly who is editing which part of a document with smooth animations. Presence data throttled for performance at scale.
Multiplayer Undo/Redo
Per-user undo scoping — undoing only removes your own changes, not your teammates'. Implemented via Yjs UndoManager with per-client tracking.
Kanban Board
Drag-and-drop task management with fractional indexing for stable ordering and optimistic concurrency control. Real-time board sync via WebSocket so all members see updates instantly.
Snapshot Version History
Document history with restore capability. Create named snapshots at any point and restore to any previous state without losing the current version.
Secure Auth & RBAC
JWT access tokens stored in-memory (never localStorage) with rotating httpOnly refresh tokens and reuse detection. Owner, editor, and viewer roles enforced at both API and WebSocket level.
Architecture
Go 1.25+ backend (chi router, pgx/v5) handles REST API and WebSocket connections. Next.js 14 (App Router) frontend proxies all API calls through rewrites for same-origin requests (no CORS). Yjs CRDT syncs document state via WebSocket at /ws/doc/{id}. Kanban boards sync via /ws/board/{id}. PostgreSQL 16 stores all persistent data with goose migrations. Redis 7 handles presence state and session caching. Docker Compose orchestrates all services.
How to Use
Register an account and a default workspace is created automatically. Create documents within a workspace and invite team members via shareable invite links with editor or viewer roles. Open a document to start collaborative editing — presence indicators show other users' cursors and selections in real time. Use the Kanban board to manage tasks with drag-and-drop across columns. Version history allows snapshot-based restore of any document state. Workspace owners can manage member roles via the members panel.
Impact & Results
Demonstrates production-grade real-time collaboration using CRDT technology that eliminates merge conflicts entirely. Per-user multiplayer undo/redo ensures individual edits are reversible without affecting teammates' work. The Go backend with pgx and Redis achieves high concurrency with minimal memory footprint. Docker Compose deployment makes self-hosting straightforward. The rotating refresh token system with reuse detection prevents token theft attacks. WebSocket presence throttling (20 msg/s client, 50ms batch server) keeps real-time sync efficient at scale.



