Overwhelmed with libs. Which libs to use for a collaborative editor?

Hi,

I am bit overwhelmed with some of the tooling & libraries available in elixir & phoenix. I am looking to build a collaborative text editor in Phoenix as a test project as it is something I know quite well and it seems the perfect project for phoenix.

I can see things like https://github.com/deltadoc/text_delta , https://github.com/derekkraan/delta_crdt_ex and the Phoenix.Presence which all look useful, however I am not clear on well trodden path for this sort of app in elixir. Is there a recommended set of tooling for this sort of problem?

1 Like

Welcome! I’ve felt the same before. There’s not as many universally used libraries in elixir yet as some languages, and people do things many different ways. It can be hard to know what path to follow.

My guess if that you’re not likely to find a well-trodden path for this in elixir right now. I think there are probably a lot of toy examples of this but I’d expect most libraries would be very new or lower level than what you’re hoping for.

My suggestion instead would be to take a step back and consider how you might do this in the simplest way possible without a library. It would probably look something like this (assuming phoenix):

  • A page (template, controller, and router path)
  • A textarea on that page
  • A phoenix channel to send changes to the server, and to send those changes out in real time to other people on the page

After that you’d have a basic real-time updating collaborative text editor.

If I was doing this myself I’d most likely use a phoenix liveview, which works really well for this kind of thing, but will involve some extra learning.

2 Likes