jtanadi / scotty

WebSocket-enabled PDF viewer
http://raa-scotty.herokuapp.com/
MIT License
15 stars 1 forks source link

Commenting feature #42

Open jtanadi opened 4 years ago

jtanadi commented 4 years ago

Add feature for users to add comments per page.

Because the app doesn't allow PDF files to be downloaded, the comments don't have to be inserted into the PDF (ie. they can be temporary, and only show up for the duration of the meeting). In application, comments would probably end up as short reminders, for example, "Go back to this page at the end of presentation."

Some thoughts:

  1. Don't store comments on the server and rely on each user's localstorage. Once a user posts a comment, the socket will broadcast to other users in the room, and each would store that PDF's comments locally.
    • In reality, the server would need to at least cache comments in memory, because otherwise what happens when a user joins halfway through a meeting?
  2. Provision a database to temporarily store comments for each PDF. All comments for that PDF will be downloaded at the end of each session and have specific TTLs (like S3 objects).
    • We may already need to provision a database to keep track of users if we implement authentication, so adding another model may not be so bad.
jtanadi commented 4 years ago

pdf-lib will allow us to insert text into an existing PDF.

conveyor would need to also upload the PDF to the s3 bucket.