A set of plug and play modules for enabling Realtime Collaboration in WebViewer
WebViewer Collaboration is free to use with a WebViewer license. Claim your license here.
This project allows users to quickly enable realtime collab in their WebViewer application using any database (new or existing) they choose.
It also comes with a default database implementation if you do not have an existing database you want to use.
The server module acts as a middle man between WebViewer and your database. It listens for events from WebViewer and keeps your database in sync with what's happening through the resolvers you provide.
For example, if an annotation is created in WebViewer, the server will call your
addAnnotation resolver, which in turn will add the annotation to your database.
Whenever a change like this happens, the server also notifies all other members of that document that a new annotation was added. This ensures all users stay in sync with one another (in real time!).
The client module is responsible for sending these events to the server. It binds to WebViewer events such as
annotationChanged and provides the server with all the information it needs to save to the database.
The client is also responsible for listening for messages from the server and updating the viewer state when a message is sent. For example, if the server sends a message saying that a new annotation was added by another user, the client module is responsible for displaying that new annotation to the user.
You must claim your license before using WebViewer Collaboration in production
We recommend implementing the modules in the following order:
If you do not have a database, first set up the default database:
Then implement these two modules (in this order)