Realtime collaborative editor using CRDTs, Websockets, and more.
A good bit of work has been done to ensure a great devx. Install the dependencies and immedietly begin running the app using sensible defaults. No dockerfile (yet).
First install deps:
yarn install
To run the entire stack in dev mode (frontend and backend):
yarn start
Your default browser will automatically open to the local frontend app when done compiling.
All packages are watched, and have live and/or hot reloading where applicable.
Redis automatically connects to a cloud dev Redis server (you can override if needed).
The dev frontend server is hosted at http://localhost:1234
. It will live reload.
The dev backend server is hosted at http://localhost:3001
. It will also live reload.
To confirm it's working, a GET request to http://localhost:3001/api/v0/healthcheck
should return a status code 200 OK
.
Frontend: https://jot-app.surge.sh
Backend: https://jot-api-prod.herokuapp.com
Frontend is manually deployed right now via yarn script:
yarn deploy:frontend
Prod frontend url: https://jot-app.surge.sh
Backend autodeploys to Heroku on every successful master build.
Prod backend base url: https://jot-api-prod.herokuapp.com
Prod backend healthcheck url: https://jot-api-prod.herokuapp.com/healthcheck
Does not need to be deployed.
Realtime data is multiplexed over websockets.
Document state and data from the automerge CRDT is sent and recieved and always ensures that the information ends up being transmitted and confirmed.
Remote cursors are treated as UDP-esque networking, not mission critical, and if they drop or lose a packet, not the end of the world.
Document channels are joined and left via websockets as well. Client sends over a request to join, server either does not allow or allows. If server allows we send an ack, completing the handshake.
What else do we send over websockets?
All internal events should flow through redis event bus.