Yes, this is almost the same as Excalidraw: a (draft of a) collaborative drawing app.
Source code. Though it’s not really source code, because I also ad-hoc modified the library it depends on. See this comment.
So, looks like tldraw also recently posted a CRDT (Yjs, namely) example app. I decided to give it a shot as well.
The .xdc
file I’ve attached works ok-ish, perhaps it might even be production-ready, but I hand-crafted it to experiment with the following issues:
TODO
- The build is too big (~2 MB) for the Delta Chat’s 640 kB limit (raise it?? ). I had to delete some icons and fonts to make it run-able.
- Building the app from the current commit results in the app sending too many updates, like a couple of megabytes every minute. Need to solve either of these:
- #7 - perf: ~0.5s stutter for high-yjs-update-rate apps - webxdc-yjs-provider - Codeberg.org - this could be an option, though needs polishing
- perf: extremely high network usage (Yjs updates are redundant) · Issue #11 · tldraw/tldraw-yjs-example · GitHub
- Clean up the source code. Remove assets from the source code.