whoami
whoami•2y ago

Does convex work with collaborative editing?

So I was considering building a collaborative editing, ideally what something like liveblocks provides. Since you have an option for optimistic update, I am curious if you folks have done similar demo before and what is your approach with conflict resolution.
9 Replies
lee
lee•2y ago
hi! i'm curious if you mean specifically collaborative text editing. I don't think we have a demo of that -- our position (for now, we may take a firmer position later) is that every convex mutation runs as an isolated transaction with arbitrary JS code, so you can implement conflict resolution however you see fit. this is a cool idea and we should make a demo. if you'd like a demo of real time collaborative drawing, check out https://github.com/ldanilek/tldraw-convex which @sujayakar wrote to be https://www.tldraw.com/ backed by Convex.
GitHub
GitHub - ldanilek/tldraw-convex
Contribute to ldanilek/tldraw-convex development by creating an account on GitHub.
tldraw
tldraw
A free and instant collaborative diagramming tool.
whoami
whoamiOP•2y ago
thanks for the demo! and yea I was referring to the doc editing initially, I was curious to know what is the best way for combining CRDT and convex and that would be really cool
Indy
Indy•2y ago
Our good friend @RJ wrote something like this on Convex a while ago. https://discord.com/channels/1019350475847499849/1035957931579027516/1035958130699407411
RJ
RJ•2y ago
Hi yes! @whoami if you decide to try that yourself with ProseMirror (also works just as well with anything based on ProseMirror, like Tiptap), let me know and I'll be happy to help you get it working if I can!
whoami
whoamiOP•2y ago
Hey RJ, yea I am working with tiptap, I am reading your code https://github.com/rjdellecese/prosemirror-collab-convex to get some inspirations, do you get it working eventually as expected?
GitHub
GitHub - rjdellecese/prosemirror-collab-convex: ProseMirror collabo...
ProseMirror collaborative editing with Convex. Contribute to rjdellecese/prosemirror-collab-convex development by creating an account on GitHub.
RJ
RJ•2y ago
I did, yeah. It looks like my project's site is still up, so you can try it yourself if you'd like at https://scroll.ink I'm actually not sure I shared that here, so Convex folks feel free to play around with it too! (open two tabs side-by-side to see the collab editing in action) And you can use markdown styling and things like Ctrl/Cmd-B etc. for keyboard-driven styling And to clarify, that project is not deployed from the code in that public repo linked above
whoami
whoamiOP•2y ago
this is awesome! thanks for sharing it!
RJ
RJ•2y ago
No problem! 🙂

Did you find this page helpful?