Skip to main content
Local-first  ·  Deterministic  ·  CRDT

Build collaborative systems
that converge

NodalMerge is a replication engine built around deterministic history replay. Write locally, merge concurrently, converge deterministically — with full audit-grade replay semantics.

CRDT
State model
DAG
History structure
Offline queue
P2P
Peer topology
Deterministic replayCanonical resolutionSpeculative writesAuthority policiesWebSocket-firstIndexedDB persistenceAudit-grade history
You’re building a collaborative UI — real-time editing, presence, offline-first UX.
1

Install the SDK

npm install nodalmerge-sdk-js
2

Connect a room

const sdk = await createNodalMergeSdk({
  wsUrl: "ws://localhost:7878/ws/runtime",
  roomId: "my-room",
  transport: { mode: "auto" },
  reconnect: { enabled: true }
});
await sdk.room.connect();
3

Read and write synced state

sdk.sync.set("profile/name", "Alice");
sdk.sync.push();
const name = sdk.sync.get("profile/name");

JavaScript SDK

Full API reference — sync, text, presence, blobs, offline, and config.

SDK overview

Pick the right surface, understand intent vs canonical patterns.

Subscriptions

Event subscriptions, runtime message types, lifecycle hooks.

Collab text playground

Interact with RGA text ops and DAG replay live.
🔀

Deterministic CRDT merge

All peers converge to the same canonical state regardless of write order or network partitions.

📼

Replay-grade history DAG

Every change is a node in an append-only DAG. Replay any window, branch, or ancestor state on demand.

✈️

Full offline queue

Writes queue locally while disconnected and flush deterministically on reconnect — no data loss.

🏛️

Authority-scoped policies

Lock write authority to specific key paths and peers. Policy violations are rejected, not silently dropped.

🧵

RGA collaborative text

Character-level RGA with tombstone semantics, anchor-based positioning, and per-glyph attribution.

🔍

Canonical projections

Register query specs, build paginated projections at any checkpoint, and invalidate on schema change.

Architecture

System model, CRDT behavior, replay semantics, speculative vs authoritative, and topology boundaries.

Protocol

Message-level sync, reconciliation flow, blob transfer, and failure semantics.

SDK

JavaScript and React integration — sync, text anchors, presence, offline, projections, and config.

API and commands

Full WebSocket command/response contract, capability gates, and rejection taxonomy.

Operators

Setup, persistence, GC lifecycle, observability, topology, and replay operations.

Benchmarks

Performance expectations and runtime attribution guidance.

Guides

Practical implementation guides for real product workflows.

Tutorials

Hands-on walkthroughs: protocol tracing, incident triage, replay inspection.

Five interactive playground apps

Infinite room workspace, collab text, protocol inspector, replay lab, and collab maps — local playgrounds for exercising SDK, replay, and protocol behavior live. See developer-experience/apps for what each app demonstrates and how to run them.
1

Run the quickstart

Start a local server and validate your first room end-to-end. → Quickstart
2

Follow the first-hour onboarding path

Validate SDK + WASM flows, inspect protocol behavior, check presence and replay evidence. → First hour path
3

Explore the interactive apps

Use the collab-text and protocol-inspector playgrounds to observe runtime behavior live. → Developer experience apps
4

Read the architecture fundamentals

Mental model + CRDT model are the highest-leverage reads before writing integration code. → Mental model · → CRDT model
5

Configure your production baseline

Server setup, persistence strategy, security posture. → Server setup · → Persistence