This guide uses Liveblocks because it’s the fastest way to get started. See all providers for alternatives.
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 Option
Run your own collaboration server
Client Configuration
All events, options, and customization
Working Example
Complete source code on GitHub

