This is a server and client for a real-time collaborative document editor (aka a drastically simplified Google Docs). It's a prototype and not meant to be run in production. Also, it's written in node.js and Typescript, neither of which I had experience with when I built it.
My implementation is based on this paper [1]. Here's a GIF of it in action...
- Install npm by downloading and installing node.js from here: https://nodejs.org/en/
- Run
npm install
in the repo's root directory - Run
$(npm bin)/jake build
to build the client and server - Run
node static/compiled/js/server.js
(yeah, it's wonky that server.js is in 'static') - Visit
localhost:3000
in a browser - Start typing!
I also don't plan to keep working on this. WOOT, as an approach, gets really slow unless you implement tombstone garbage collection (aka getting rid of text that users have deleted) which can only happen when everyone has disconnected from a document. I consider this an unacceptable user-experience for a collaborative document editor.
But there are lots of other ways to implement real-time collaborative editors! If you find this kind of stuff interesting and want to chat about it, let's meet up!
If you're looking for something to use in production, I recommend share.js.
- Gérald Oster, Pascal Urso, Pascal Molli, Abdessamad Imine. Real time group editors without Operational transformation. [Research Report] RR-5580, INRIA. 2005, pp.24.