r/webdev • • 32m ago

Resource I built a JavaScript diagram rendering engine that can handle thousands of nodes and edges

https://thoth-flow.ahs12.xyz/

I've been working on ThothBlueprint, an open-source database diagramming tool, for over a year. As the project grew, rendering large database schemas became a serious performance challenge.

That led me to build Thoth Flow — a standalone JavaScript diagram rendering engine powered by WebGL2.

After integrating it into ThothBlueprint, I can now work with significantly larger diagrams. I tested it with 5,000 tables and 7,000 relationships, and it rendered smoothly.

This npm Package supports React, Vue, Svelte, Web Components, and plain JavaScript, with automatic Canvas 2D fallback.

If you're building database diagramming tools, node editors, workflow builders, or anything that needs to render large interactive diagrams, Thoth Flow might be useful.

I'd love for you to try it and share your feedback, especially on performance, API design, and potential improvements.

Links:

0 Upvotes

4 comments sorted by

View all comments

Show parent comment

•

u/AHS12_96 17m ago

Canvas 2d fallback gives pretty good performance, its because of the way the rendering engine works. I was surprised myself with the canvas 2d performance as well!!.

You can try the canvas 2d fallback from this playground as well: https://thoth-flow.ahs12.xyz/playground/
playground renders over 10k nodes.