01
Concurrent edits converge
Two people type into the same paragraph on different continents. Coalesce interleaves their operations and both screens settle on one text — no lock, no prompt, no “theirs or mine”.
v1.0 · local-first sync engine · MIT
Coalesce is an open-source CRDT engine for apps that work offline, on every device, at once. Each replica keeps writing on its own. When they meet, they merge — automatically, deterministically, without a server deciding who wins.
pnpm add @coalesce/coreHow it merges
01
Two people type into the same paragraph on different continents. Coalesce interleaves their operations and both screens settle on one text — no lock, no prompt, no “theirs or mine”.
02
Peers trade changes in the background over any transport you hand it: WebSocket, WebRTC, a USB stick. The status hook tells your UI exactly how many ops are still in flight.
03
A replica that loses signal keeps working on its own copy. When it reconnects, its history buds back into the main document instead of overwriting it.
Quickstart
Wrap any plain object in a document, point it at a relay or a peer, and mutate it like you always have. Every change becomes an operation; every operation is safe to apply twice, out of order, a week late.
// board.ts
import { doc } from '@coalesce/core'
const board = doc('kanban', {
peers: 'wss://relay.example.dev',
persist: 'indexeddb',
})
board.change((d) => {
d.columns.todo.push({ title: 'Ship 1.0' })
})
board.status() // → { peers: 6, pending: 0 }Coalesce is a fictional project, made to demo a gooey blob system. Built by its community, governed in the open.