PeerLeaf | A Collaborative LaTeX Editor using Yjs!

Hi all,

For my final year project, I have developed a P2P version of Overleaf, dubbed PeerLeaf using y-webrtc and yjs!

Feature wise is limited at the minute. It supports:

  • Files shared via WebRTC between connected Peers using a Map shared type
  • Cursor Tracking
  • Client Side Compilation (see my forked repo at https://github.com/callum-atwal/texlive.js) which supports LaTeX and BibTeX files
  • A basic registration system

There are probably some more things I’ve missed out.
I would appreciate any feedback below! It’s not stable by any means so I’d probably stick to using Overleaf for now :wink: but I do have plans to continue working upon some of the features such as using IndexedDB to store local copies of the document and better performance for compilation (WebAssembly has come a long way).

The link is at https://peerleaf.callum-atwal.com/

Hope you enjoy :smiley:
Callum Atwal

2 Likes

Very nice! I gave it a go, but ran into an error (I was not logged in, just created a new doc/room) and typed some text then hit “Compile”:

image

Hi there,

Yep, forgot to mention I’ve noticed this bug. It’s something to do with Angular routing. I did a slightly hacky fix which would detect if your room ID changes, it refreshes the page which makes it work.

I’ll do the same from when you register/login/from home. You can just refresh the page and the code should compile!

I’ll push up that fix in a bit

Really cool! Thanks for sharing :slight_smile:

1 Like

Pushed up a few bug fixes so you wont have to reload the page to get it to initially work.

I’ve also setup and added a TURN server so that it works when a direct connection via the ICE protocol isn’t available.

1 Like