Skip to content

pluraleverythings/MarkCRDT

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MarkCRDT

A Conflict-Free Replicated Data Type for collaborative rich-text editing based on the Peritext paper, plus a sync server.

Packages

  • @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.

Layout

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)

Develop

npm install
npm test           # runs both packages' test suites
npm --workspace @markcrdt/core run build
npm --workspace @markcrdt/server run build

Run the server locally

node packages/server/dist/main.js              # in-memory storage
DATABASE_URL=postgres://… node …/main.js      # Postgres

See packages/server/README.md for the HTTP / WS protocol and architecture.

About

Conflict free replicated Markdown

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages