For a hackable, open source collaborative framework, check out Mozilla's TogetherJS: <a href="https://togetherjs.com/" rel="nofollow">https://togetherjs.com/</a>
Hahah, I experimented with a collaborative WebRTC feature for our code editor this summer. It ultimately never made it off its feature branch. Fun to see someone else implement it!