Yjs

A high-performance CRDT that exposes shared data types for building conflict-free, real-time collaborative applications.

Library
npm
v13.6.33
22,973 stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum. How we score it →
87 /100 Excellent
Development Activity 92
Maintenance 92
Community 64
Maturity 60
Momentum 40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation. How we score it →
89 /100 Excellent
Architecture 92
Code Quality 90
Innovation 90
Learning Curve 80

Yjs is a CRDT (Conflict-free Replicated Data Type) implementation that exposes its internal state as shared data types such as Map, Array, and Text. Changes made by any peer are automatically distributed and merged without conflicts, so multiple users can edit the same document simultaneously. Yjs is network-agnostic and works over WebSockets, WebRTC, or any other transport, with first-class support for offline editing, version snapshots, undo/redo, and shared cursors. It powers real-time collaboration in editors and applications like ProseMirror, TipTap, Monaco, CodeMirror, and many production products.

What You Get

  • Shared data types (Y.Map, Y.Array, Y.Text, Y.XmlFragment) that merge concurrent edits without conflicts
  • A compact binary update and state-vector encoding for efficient sync and delta exchange
  • Built-in undo/redo, relative positions, version snapshots, and change observation events
  • A network-agnostic core that plugs into WebSocket, WebRTC, IndexedDB, and custom providers
  • Editor bindings for ProseMirror, TipTap, Monaco, CodeMirror, Quill, Slate, and more

Common Use Cases

  • Adding Google-Docs-style real-time collaboration to a rich-text or code editor
  • Building offline-first apps that sync and merge cleanly when connectivity returns
  • Synchronizing shared application state across many clients without a central lock
  • Implementing collaborative whiteboards, diagrams, and design tools with live cursors

Under The Hood

Architecture — Yjs models a document as a Doc containing shared types that are backed by a doubly-linked list of Item structs stored in a StructStore. Each item carries a unique ID (client id + clock), and concurrent operations are ordered deterministically using the YATA algorithm so every peer converges to the same state. Deletions are tracked in an IdSet/delete set, garbage collection reclaims tombstoned content, and all mutations flow through a Transaction that batches changes and emits observer events. Updates are serialized through UpdateEncoder/UpdateDecoder (V1 and V2 formats) with state vectors enabling differential sync.

Tech Stack — The library is written in modern ES modules (Node >= 22) with types supplied via JSDoc and compiled by TypeScript. Its only runtime dependency is lib0, a low-level utility library (efficient binary encoding, data structures) by the same author. Bundling is handled by Rollup, linting by standard and markdownlint, and circular-dependency checks by dpdm. The package ships tree-shakeable ESM with no side effects.

Code Quality — The repository has a substantial, well-organized test suite (y-array, y-map, y-text, y-xml, encoding, snapshots, undo-redo, relative positions, and compatibility tests) run with high repetition and randomized/fuzz-style testing to stress the CRDT invariants. Code is consistently structured into structs/ and utils/ modules, with an explicit INTERNALS.md, threat model, and security policy. Naming is precise and the public surface is deliberately curated in index.js.

API Design — The public API is ergonomic: shared types read and write like native collections, so ymap.set('key', value) or yarray.insert(0, [item]) is all it takes to produce a synced mutation. Observation is event-driven (observe, observeDeep) and updates are plain Uint8Arrays that you route over any transport, keeping the core decoupled from networking. Extensive documentation at docs.yjs.dev, a large demos repository, and a rich ecosystem of bindings smooth the path from prototype to production.

Used by 25 apps in this directory

TypeScript
64%
Other

Epicenter

Developer Tools · Knowledge Management · Note Taking

4,825

A local-first monorepo led by Whispering, an open-source speech-to-text app, built on an MIT toolkit that turns your data into plain Markdown and SQLite files you own instead of a database you rent.

View details
87
Repo Health
90
Technical
64
Dependency
Built with
TypeScript 64%
Rust 15%
Updated 1 weeks ago
TypeScript
99%
AGPL 3.0

fountain-ink

Blogging

64

A self-hostable, decentralized blogging platform built on Lens Protocol — own your content, audience, and distribution forever.

View details
26
Repo Health
66
Technical
63
Dependency
Built with
TypeScript 99%
Updated 8 months ago
TypeScript
63%
MIT

Ghost

Blogging · CMS

55,598

Open source headless Node.js CMS for professional publishing, paid memberships, and newsletters with a fully owned audience.

View details
96
Repo Health
85
Technical
64
Dependency
Built with
TypeScript 63%
JavaScript 35%
Updated 1 weeks ago
TypeScript
62%
EPL-2.0

Huly Platform

Collaboration · Project Management · Team Chat

27,978

Open-source all-in-one workspace that replaces Linear, Jira, Slack, and Notion for product and engineering teams.

View details
90
Repo Health
86
Technical
62
Dependency
Built with
TypeScript 62%
Svelte 34%
Updated 1 weeks ago
Python
53%
AGPL 3.0

LearnHouse

CMS · Learning Management

2,413

Open-source LMS with AI tutoring, real-time collaboration boards, live code execution, and built-in course monetization — self-hosted in minutes.

View details
90
Repo Health
77
Technical
65
Dependency
Built with
Python 53%
TypeScript 45%
Updated 6 days ago
TypeScript
92%
Other

n8n

Automation · No Code Platforms

208,437

Code when you need it, UI when you don't — the workflow automation platform built for technical teams who refuse to choose.

View details
95
Repo Health
87
Technical
62
Dependency
Built with
TypeScript 92%
Updated 1 weeks ago
TypeScript
97%
GPL 3.0

OpenKnowledge

Code Editors · Knowledge Management · Note Taking

4,674

A beautiful, local-first markdown IDE that turns any git repo into a live collaborative workspace for humans and AI coding agents like Claude, Codex, and OpenCode.

View details
80
Repo Health
89
Technical
64
Dependency
Built with
TypeScript 97%
Updated 6 days ago
TypeScript
90%
MIT

open-pencil

AI Design Tools · Design Tools

9,227

An open-source design editor that reads native Figma files, ships a built-in AI assistant with 100+ design tools, and offers real-time serverless collaboration — all without giving up your files.

View details
84
Repo Health
78
Technical
69
Dependency
Built with
TypeScript 90%
Updated 1 weeks ago
Python
38%
Other

Open WebUI

AI Agents · AI Assistants

156,607

The extensible, privacy-first AI platform that runs Ollama, OpenAI, and any LLM backend behind a polished, feature-packed web interface.

View details
92
Repo Health
75
Technical
66
Dependency
Built with
Python 38%
Svelte 35%
JavaScript 19%
Updated 6 days ago

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers