Carrel: Real-Time Collaborative Code & Notes Workspace (TypeScript + Yjs)

Built Carrel across a 3-package TypeScript monorepo (@carrel/shared, @carrel/server, @carrel/client) using Yjs CRDTs, Fastify, better-sqlite3 WAL snapshots, and CodeMirror 6. Implemented 1-byte binary WebSocket multiplexing (sync, awareness, JSON control frames), single-use nonce HMAC upgrade tickets, concurrency-4 async scrypt throttling with progressive IP lockouts, 5000ms host reconnect grace with deterministic seniority promotion, 80ms lerped remote carets, and Playwright multi-peer E2E tests.

28 Nov 2026

Keywords
TypeScript
React
Fastify
Yjs
WebSockets
CodeMirror
SQLite
Playwright