livelyryanwaits/lively
Self-hostable real-time collaboration
- Problem
- Real-time collaboration means a vendor SaaS, or building a CRDT library yourself.
- Architecture
- 10 packages, each depending only on the layer below it.
- Primitives
- LiveObject, LiveMap, and LiveList sync automatically, plus presence and undo/redo.
- Self-host
- Ships as a Dockerfile and a Render blueprint, backed by Postgres.
Vendor SaaS, or Build It Yourself
Every product that wants live cursors, shared state, or presence reaches for a vendor SaaS — and ships user data through someone else's servers to get it. There's no self-hosted path that isn't "go implement a CRDT library yourself and build everything above it."
# Adding real-time collaboration today# 1. Pick a vendor (Liveblocks, PartyKit, ...)# 2. Ship user data through their infra# 3. Pay per connected user, forever# Or: implement Yjs from scratch yourself
Architecture
Ten packages, each depending only on the layer below it. CRDT primitives at the bottom, a framework-agnostic client and WebSocket server above that, React hooks above that, a UI kit on top. Use one layer or all of them.
packages/types/ # shared type definitionsstorage/ # CRDT primitivesclient/ # framework-agnostic SDKserver/ # WebSocket collab serverreact/ # 40+ hooksui/ # cursors, avatars, badgescli/ # scaffolding
One Hook, Full Sync
LiveObject, LiveMap, and LiveList sync automatically across every connected client — plus ephemeral presence, undo/redo, and broadcast events, the primitives Figma-style products are built from.
const { others, myPresence } = usePresence();const [cursor, setCursor] = useMyCursor();const doc = useStorage((root) => root.doc);// sync is automatic — no diffing, no manual reconciliation
Your Infra, Your Data
Ships as a Dockerfile and a Render blueprint, backed by Postgres. Teams that want Figma-style collaboration shouldn't have to choose between building it from scratch or handing user data to a vendor.
docker build -t lively-server .docker run -p 8080:8080 lively-server# or: render.yaml blueprint, one click
Six Example Apps
A whiteboard, a markdown editor, a collaborative editor, a Notion-like editor, a workflow node editor, and a todo list ship in the repo. All live at lively.waits.dev.
examples/nextjs-whiteboard/nextjs-markdown-editor/nextjs-collab-editor/nextjs-notion-editor/nextjs-workflows/nextjs-todo/
Pick a Layer
Each package is independently installable — pull in just the client, or the full React + UI stack.
npm install @waits/lively-client
npm install @waits/lively-reactnpm install @waits/lively-server