yjs-sync

Official

Sync Yjs CRDTs instantly with Durable Streams

Authordurable-streams
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Developers need a reliable way to synchronize Yjs CRDT documents over network connections while handling authentication, connection lifecycles, and error recovery. Without a dedicated provider, implementing these concerns manually leads to duplicated code, fragile reconnection logic, and inconsistent state across clients.

Core Features & Use Cases

  • Configurable Provider Options: Set document, base URL, doc ID, optional awareness, custom headers, live mode (SSE or long‑poll), and auto‑connect behavior.
  • Dynamic Authentication: Supply static tokens or functions that refresh per request, enabling seamless credential rotation.
  • Robust Connection State Machine: Automatic transitions between disconnected, connecting, and connected states with graceful handling of errors.
  • Error Recovery & Reconnection: Built‑in retries for network hiccups, server errors, and snapshot discovery failures, while emitting clear status events.
  • Event‑Driven API: Listen to synced, status, and error events to integrate with UI frameworks such as React.

Quick Start

Ask the assistant to configure a YjsProvider for document “my-doc” using SSE mode with automatic reconnection.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: yjs-sync
Download link: https://github.com/durable-streams/durable-streams/archive/main.zip#yjs-sync

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.