GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com β€” GitHub - loro-dev/loro: Make your JSON data collaborative and version-controlled with CRDTs

BranchesTags
Open more actions menu

Latest commit

 

History

2,289 Commits
2,289 Commits

Folders and files

NameName
Last commit message
Last commit date
.changeset
.changeset
 
 
.cursor
.cursor
 
 
.devcontainer
.devcontainer
 
 
.github
.github
 
 
.vscode
.vscode
 
 
context
context
 
 
crates
crates
 
 
docs
docs
 
 
examples
examples
 
 
loro-js
loro-js
 
 
moon
moon
 
 
packages/fractional-index
packages/fractional-index
 
 
plans
plans
 
 
scripts
scripts
 
 
skills
skills
 
 
sponsorkit
sponsorkit
 
 
supply-chain
supply-chain
 
 
.editorconfig
.editorconfig
 
 
.gitignore
.gitignore
 
 
AGENTS.md
AGENTS.md
 
 
CLAUDE.md
CLAUDE.md
 
 
CONTRIBUTING.md
CONTRIBUTING.md
 
 
Cargo.lock
Cargo.lock
 
 
Cargo.toml
Cargo.toml
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
cliff.toml
cliff.toml
 
 
deno.lock
deno.lock
 
 
deny.toml
deny.toml
 
 
package.json
package.json
 
 
pnpm-lock.yaml
pnpm-lock.yaml
 
 
pnpm-workspace.yaml
pnpm-workspace.yaml
 
 
rust-toolchain
rust-toolchain
 
 
sponsorkit.config.js
sponsorkit.config.js
 
 

Repository files navigation

Loro

Make your JSON data collaborative and version-controlled 🦜

loro-dev%2Floro | Trendshift

Documentation | Getting Started | Rust Doc

1.23.2.mp4

✨ Loro 1.0 is out! Read the announcement.

Loro is a CRDTs(Conflict-free Replicated Data Types) library that makes building local-first and collaborative apps easier. You can now use it in Rust, JS (via WASM), and Swift.

Features

Features Provided by CRDTs

  • P2P Synchronization
  • Automatic Merging
  • Local Availability
  • Scalability
  • Delta Updates

Supported CRDT Algorithms

  • πŸ“ Text Editing with Fugue
  • πŸ“™ Rich Text CRDT
  • 🌲 Moveable Tree
  • πŸš— Moveable List
  • πŸ—ΊοΈ Last-Write-Wins Map
  • 🀝 Mergeable map-key children via ensureMergeable* / ensure_mergeable_* for lazy child container creation

Advanced Features in Loro

  • πŸš€ Fast Document Loading
  • ⏱️ Fast Time Travel Through History
  • πŸ›οΈ Version Control with Real-Time Collaboration
  • πŸ“¦ Shallow Snapshot that Works like Git Shallow Clone
loro-cli-import-loro-repo.mp4

In this example, we demonstrate importing an entire Loro codebase into a Loro-powered version controller, preserving the complete Git DAG history while enabling fast version switching.

Example

Open in StackBlitz

import { expect, test } from "vitest";
import { LoroDoc, LoroList } from "loro-crdt";

test("sync example", () => {
  // Sync two docs with two rounds of exchanges

  // Initialize document A
  const docA = new LoroDoc();
  const listA: LoroList = docA.getList("list");
  listA.insert(0, "A");
  listA.insert(1, "B");
  listA.insert(2, "C");

  // Export all updates from docA
  const bytes: Uint8Array = docA.export({ mode: "update" });

  // Simulate sending `bytes` across the network to another peer, B

  const docB = new LoroDoc();
  // Peer B imports the updates from A
  docB.import(bytes);

  // B's state matches A's state
  expect(docB.toJSON()).toStrictEqual({
    list: ["A", "B", "C"],
  });

  // Get the current version of docB
  const version = docB.oplogVersion();

  // Simulate editing at B: delete item 'B'
  const listB: LoroList = docB.getList("list");
  listB.delete(1, 1);

  // Export the updates from B since the last sync point
  const bytesB: Uint8Array = docB.export({ mode: "update", from: version });

  // Simulate sending `bytesB` back across the network to A

  // A imports the updates from B
  docA.import(bytesB);

  // A has the same state as B
  expect(docA.toJSON()).toStrictEqual({
    list: ["A", "C"],
  });
});

DevTools

Loro Inspector

You can use the Loro Inspector to inspect the state and history of a Loro document.

loro-inspector.mp4

Bindings

You can find bindings for other programming languages in loro-ffi.

Blog

  • Loro 1.0
  • Movable tree CRDTs and Loro's implementation
  • Introduction to Loro's Rich Text CRDT
  • Loro: Reimagine State Management with CRDTs

Sponsors

Sponsors

Credits

Loro draws inspiration from the innovative work of the following projects and individuals:

  • Diamond-types: The Event Graph Walker (Eg-walker) algorithm from @josephg has been adapted to reduce the computation and space usage of CRDTs.
  • Automerge: Their use of columnar encoding for CRDTs has informed our strategies for efficient data encoding.
  • Yjs: We have incorporated a similar algorithm for effectively merging collaborative editing operations, thanks to their pioneering work.
  • Matthew Weidner: His work on the Fugue algorithm has been invaluable, enhancing our text editing capabilities.
  • Martin Kleppmann: His work on CRDTs has significantly influenced our comprehension of the field.

About

Make your JSON data collaborative and version-controlled with CRDTs

loro.dev

Topics

collaborative-editingcrdtlocal-firstoffline-firstp2pprivacy-firstrich-text

Resources

Readme
MIT license

Contributing

Contributing
Activity
Custom properties

Stars

6.3k stars

Watchers

33 watching

Forks

204 forks
Report repository

Releases

Sponsor this project

Used by

Contributors

Languages

You are visitor 01402503 β€” GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800Γ—600. No cookies required.