r/webdev • u/AHS12_96 • 1h 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:
View all comments
1
u/ResidentPomegranate6 47m ago
edge hit-testing tends to fall over before drawing does. one batched draw call for all edges plus gpu id-buffer picking keeps clicks cheap at 7k relationships, no spatial index needed.