Setup
Server
Client
Use the provider-agnostic API to connect SuperDoc:modules.collaboration = { ydoc, provider }.
React example
Server configuration
Basic options
Hooks
| Hook | Purpose |
|---|---|
onLoadDocument | Load document from storage |
onStoreDocument | Save document to storage |
onAuthenticate | Validate user tokens |
onChange | React to document changes |
onConnect | Handle new connections |
onDisconnect | Handle disconnections |
Persistence example
Provider options
Events
Provider events
Production deployment
Docker
With Redis (scaling)
Resources
Hocuspocus Docs
Official documentation
Working Example
Complete source code
Next steps
SuperDoc Yjs
Try the official collaboration package
Client Configuration
All SuperDoc collaboration options

