Skip to content

doc-sync ​

Define your document schema. Edit locally. Merge changes by stable token identity.

@barocss/doc-sync · TypeScript · Development workspace

doc-sync is a document CRDT with a synchronization client, a transport-independent server, and ProseMirror, Tiptap, Slate and Lexical bindings. The application provides the schema. The core works with document shapes rather than built-in paragraph or table names.

Start with a small document ​

ts
import {Client, type Schema} from "@barocss/doc-sync";

const schema: Schema = {
    root: "content",
    marks: ["bold"],
    nodes: {
        content: {shape: "flow", children: ["paragraph"], default: "paragraph"},
        paragraph: {shape: "text"},
    },
};

const client = new Client({schema});
client.edit([{op: "insert", at: [0, 0], content: "Hello, shared document."}]);
console.log(client.model());

Use the same Client with or without a transport →

Learn the contracts ​

Know the current limits ​

The ten packages export compiled JavaScript and declarations but remain private: true. They are not yet npm releases. The macOS MCP app has bounded restart and lease-expiry recovery with the demo server; production recovery, authorization, incompatible schema migration and long-term deployment validation remain open. Convergence does not guarantee every user's semantic intent.

Read status and limits →

Independent packages. Schema-defined document behavior.