# Tldraw: a (draft of a) collaborative drawing app

**URL:** <https://support.delta.chat/t/tldraw-a-draft-of-a-collaborative-drawing-app/2827>\
**Category:** Mini Apps\
**Created:** [November 28, 2023, 3:19pm UTC](https://support.delta.chat/t/tldraw-a-draft-of-a-collaborative-drawing-app/2827 "2023-11-28T15:19:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![WofWca](https://support.delta.chat/user_avatar/support.delta.chat/wofwca/32/1702_2.png) [@WofWca](https://support.delta.chat/u/WofWca)\
**Post date:** [November 28, 2023, 3:19pm UTC](https://support.delta.chat/t/tldraw-a-draft-of-a-collaborative-drawing-app/2827/1 "2023-11-28T15:19:52Z")

</div>

![image](https://support.delta.chat/uploads/default/original/2X/3/36d8b67ef243c6fbad55fe4bfe419a454e4e648f.png)

Yes, this is almost the same as [Excalidraw: a (draft of a) collaborative drawing app](https://support.delta.chat/t/excalidraw-a-draft-of-a-collaborative-drawing-app/2810).

[📥 Download tldraw.xdc](https://github.com/WofWca/tldraw-webxdc/releases/latest/download/tldraw.xdc)

[Source code](https://github.com/WofWca/tldraw-webxdc/). Though it’s not really source code, because I also ad-hoc modified the library it depends on. See [this comment](https://codeberg.org/WofWca/webxdc-yjs-provider/issues/7#issuecomment-1347154).

So, looks like [tldraw](https://tldraw.com/) also recently posted [a CRDT (Yjs, namely) example app](https://github.com/tldraw/tldraw-yjs-example). 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](https://github.com/deltachat/deltachat-core-rust/blob/09d4b4354a3cd98f07ed5cd9b78f75fa24e8e244/src/webxdc.rs#L53-L63) (raise it?? 🥺👉👈). I had to delete some icons and fonts to make it run-able.
- Building the app from [the current commit](https://github.com/WofWca/tldraw-webxdc/commit/d389c507de34bf1a166afe3d99f1a33c037d1224) 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 - WofWca/webxdc-yjs-provider - Codeberg.org](https://codeberg.org/WofWca/webxdc-yjs-provider/issues/7) - this could be an option, though needs polishing
  - [https://github.com/tldraw/tldraw-yjs-example/issues/11](https://github.com/tldraw/tldraw-yjs-example/issues/11)

- Clean up the source code. [Remove assets from the source code](https://tldraw.dev/usage#Self-hosting-static-assets).
