Implement collaboration effortlessly. Powered by CRDTs.
Built for local-first software.

ReimagineStateManagementwithCRDTs

✨ Loro 1.0 is released!
Read the announcement to learn more

Follow us on GitHub

High Performance

Optimized for memory, CPU, and loading speed with advanced performance primitives.

Rich CRDT Types Support

Turn JSON-like data into collaborative types effortlessly

Real-Time Collaboration with Version Control

Preserve full version history like Git, even during real-time collaboration

Simple and Intuitive API

Designed with developer experience in mind

Who's Using Loro

Latch.bio
Dora.run
Subset
ax-semantics
Nema
"We use Loro as the document representation for our web-based computational notebook software... This library is a great step forward toward making 'multiplayer' apps the norm."
Read more
"... Loro has become my top choice due to its comprehensive API for managing versions and changesets, and its thoughtful (yet simple) TypeScript declarations."
Read more
Cole Lawrence

Cole Lawrence

ColeLawrence.com

"Powerful, performant, and well-designed. The best CRDT for anyone building serious collaborative software."
AJ Nandi

AJ Nandi

Subset.so

"After extensive research, we made a big early technology bet on Loro... 10/10 experience to date."
Read more
Oliver Beavers

Oliver Beavers

Stealth Startup

Rich Text Editor Demo

Effortless Document Synchronization,
Even in P2P Environments

import { LoroDoc } from "npm:loro-crdt";
const docA = new LoroDoc();
const docB = new LoroDoc();
docA.getText("text").update("Hello!");
docB.getText("text").update("Hi!");
const bytesA: Uint8Array = docA.export({ mode: "update" });
const bytesB: Uint8Array = docB.export({ mode: "update" });
 
// Exchange bytesA and bytesB via any methods
docB.import(bytesA);
docA.import(bytesB);
 
// The merge result is consistent
// They should both be "Hello!Hi!" or "Hi!Hello!"
console.log(docA.getText("text").toString()); 
console.log(docB.getText("text").toString()); 

Rich CRDTs Algorithm Support

Basic Data Structures

Includes support for MovableList for ordered collections, LWW (Last Write Win) Map for key-value pairs, MovableTree for hierarchical data, and Text for rich text manipulation, enabling various of applications.

Text/List Editing with Fugue

Loro integrates Fugue, a novel CRDT algorithm designed to minimize the interleaving anomalies when merging concurrent text/list edits.

Rich Text CRDT

Loro manages rich text CRDTs that excel at merging concurrent rich text style edits, maintaining the original intent of each user's input as much as possible. Please read our blog, Loro's Rich Text CRDT, to learn more.