Lively Documentation
Lively is a self-hosted, real-time collaboration SDK for the modern web. Add presence, cursor tracking, shared storage, and event broadcasting to any application with a few lines of code.
Architecture
The SDK is organized as a layered package stack. Each layer builds on the one below it:
// Package dependency graph
@waits/lively-types ← shared type definitions
└─ @waits/lively-storage ← CRDTs + history
├─ @waits/lively-client ← WebSocket client
├─ @waits/lively-server ← Bun server
└─ @waits/lively-react ← React hooks
@waits/lively-types ← shared type definitions
└─ @waits/lively-storage ← CRDTs + history
├─ @waits/lively-client ← WebSocket client
├─ @waits/lively-server ← Bun server
└─ @waits/lively-react ← React hooks
Packages
@waits/lively-client
WebSocket client, room management, presence, cursors, and storage sync.
@waits/lively-react
React hooks and providers for presence, storage, cursors, events, and undo/redo.
@waits/lively-server
Bun-native WebSocket server with auth, room callbacks, and Yjs support.
@waits/lively-storage
CRDT primitives — LiveObject, LiveMap, LiveList — with history and fractional indexing.