A Conflict-Free Replicated Data Type for collaborative rich-text editing based on the Peritext paper, plus a sync server.
@markcrdt/core— the CRDT itself (Peritext sequence + marks, plus a comment-management layer with threads/resolve/persistence). Pure TypeScript, no I/O.@markcrdt/server— HTTP + WebSocket sync server, Postgres-backed op log, snapshot optimisation.
packages/
core/
src/ # Peritext, CommentStore, CommentManager
test/ # 25 tests
examples/walkthrough.ts
server/
src/ # Fastify app, HTTP + WS, storage adapters
schema.sql # Postgres schema
test/ # 10 integration tests (HTTP + WS + snapshots)
npm install
npm test # runs both packages' test suites
npm --workspace @markcrdt/core run build
npm --workspace @markcrdt/server run buildnode packages/server/dist/main.js # in-memory storage
DATABASE_URL=postgres://… node …/main.js # PostgresSee packages/server/README.md for the
HTTP / WS protocol and architecture.