Skip to main content
Liveblocks is a cloud platform for real-time collaboration. It handles all the infrastructure so you can add collaboration without managing servers.

Setup

1. Create account

  1. Go to liveblocks.io
  2. Sign up for free
  3. Create a new project
  4. Copy your Public API Key (pk_...)

2. Install dependencies

3. Basic implementation

SuperDoc JS always uses the same collaboration contract, regardless of provider: modules.collaboration = { ydoc, provider }.

Room management

Each room represents a collaborative session. Use unique room IDs for different documents:

Room naming best practices

User presence

Showing active users

Custom user colors

Authentication

For production, use secret keys with your backend:

Frontend

Backend (Next.js API Route)

Persistence

Liveblocks automatically persists your Yjs document. Data is stored securely and restored when users rejoin.
Free tier includes 30 days of storage. Paid plans include unlimited storage with custom retention policies.

Error handling

Cleanup

Always clean up when the component unmounts:

Pricing

TierMAUPrice
Free250$0
Starter10,000$99/mo
Pro100,000Contact
MAU = Monthly Active Users. Each user who connects to a room counts once per month.

Resources

Liveblocks Docs

Official documentation

Working Example

Complete source code

Next steps

Client Configuration

All SuperDoc collaboration options

Self-Hosted Alternative

Run your own collaboration server