This guide uses Liveblocks because it’s the fastest way to get started. See all providers for alternatives.
Need to start local and create the room later? See
Upgrade to Collaboration.
Prerequisites
- SuperDoc installed in your project
- A Liveblocks account (free tier available)
Step 1: Get your API key
- Go to liveblocks.io and create an account
- Create a new project
- Copy your Public API Key (starts with
pk_)
Step 2: Install dependencies
Step 3: Add the code
- React
- Vue
- Vanilla JS
Step 4: Test it
- Open your app in two browser windows
- Start typing in one window
- Watch changes appear in real-time in the other window
You now have real-time collaboration working!
What’s happening?
- Liveblocks handles the WebSocket connection and data sync
- Yjs manages the document state and conflict resolution
- SuperDoc renders the editor and syncs with Yjs
Adding user presence
Show who’s currently editing:Environment variables
For production, use environment variables:Next steps
Liveblocks Deep Dive
Room management, persistence, and advanced features
Self-Hosted Options
Compare self-hosted Yjs server options
Client Configuration
All events, options, and customization
Working Example
Complete source code on GitHub

