Week-1 Update: Real Time Collaboration on a Note

Hey Everyone,

This is to keep you informed of what has been done in the project.
There have been a few changes to the initially proposed flow. you can check the project details post for the changes made.

Week-1

What has been done


A basic web application (as a PoC)

  • Which contains a Host form, a Join form, and the Collaboration page.
  • The Host form requires Note Id and auth token for fetching the note using Joplin Data API
  • The Join form requires a room Id (which is currently the same as note Id)
  • The Collaboration page consists of a Collaborative editor.

Current Flow


Host Form

  • This is the default page. Where the user who wants to host a note uses.
  • The user is asked for the Note Id (this is available to the user in note properties) and auth token for Data API (which is also available to the user in tools>options>webclipper).
  • On submission of these details an event is triggered to find the port on which the Data API is running, authenticate the token and fetch the note.
  • When the note is successfully loaded the user is then taken to the Collaboration page.

Join Form

  • This page asks for a room Id (which is currently the same as the note Id).
  • This page lets anyone with the room Id, join the collaborative session.
  • Joining through this page makes the editor disabled until the host joins the session (there are some issues with this and I'm working on it).

Collaboration Page

  • This page currently just consists of an editor which is coupled with the Yjs Doc.
  • The Collaboration between peers is handled through Yjs library.

collab-note-week-1-demo

What's next?


  • Enhance Editor Component.
  • Enhance collaboration to go smoother.
  • Implement preview pane for the markdown.
  • Add Save option.
  • Add tests.

you can find the git repo here

4 Likes