by written-beyond
4 subcomments
- 100/10 for mobile usability. Panning, Zooming, selecting and moving was so seamless I thought I was tripping out.
by michaelmior
7 subcomments
- The tool looks very cool! But IMO you can't get an ER diagram from SQL since entities are fundamentally different from tables. They are certainly very similar, but SQL alone doesn't give you enough information to create an ER diagram.
That's not to say that the tool is useless or that diagrams of this sort are unhelpful. I'll admit I'm being pedantic and others will probably disagree.
- It's a small too nothing great I just figured others might find it useful too. I kept finding myself needing to visualize database schemas, but most tools had the same problems: paywalls, mandatory signups, or sending your SQL to someone else's server.
No backend, no accounts, no data leaving your machine.
A few implementation details that were fun:
* Built on <canvas> instead of DOM/SVG. Tables are rasterized into cached bitmaps with viewport culling, which keeps things smooth even with hundreds of tables on screen.
* The SQL parser tracks source spans for every token. That lets edits stay surgical so a rename a table and only the relevant identifier (and its references) change while comments and formatting remain untouched.
* The URL contains the entire schema. Sharing simply serializes the schema into the URL itself, so there's no backend, no stored state, and no account required.
* I also experimented with a Rust/WASM version because why not? but the parser was ~37% slower because the JS↔WASM boundary cost outweighed the compute savings but The O(n^2) overlap-resolution pass was about 2.2x faster though * In the end I stuck with plain JavaScript. No framework ~32KB gzipped
by corkybeta
1 subcomments
- Could we have the option of straight lines and 90 degree angles? I’ve never really liked the bendy ones. Looks cool, good job!
by throwatdem12311
0 subcomment
- Reminds me of: https://explain.dalibo.com/
For visualizing query plans. One of the most useful tools for optimizing sql queries I’ve ever used.
Just make sure to download the fully offline v2 version at the bottom if you want to use it with anything sensitive.
- btw did you know that ER diagrams are supported by Mermaid diagrams: https://mdview.io/mermaid?example=working-er It's not that pretty as in your app, but it does the work
- I'm using https://github.com/ondras/wwwsqldesigner and I think that's worth taking it in account for comparison.
- Nice, but there is no LICENSE file in the github: https://github.com/royalbhati/sqltoerdiagram
- This reminds me of a tool I vibed with v0 a few months back: https://v0-yaerd.vercel.app. I created it because I hadn't seen a tool before that could interpret Laravel migration files and create ERDs from them, then prompted basic SQL support into it as well.
by eventinbox
0 subcomment
- The "entities vs tables" distinction is a real one, but I think for the majority of developers who just want to visualize an existing schema quickly, this is more than sufficient. Perfect is the enemy of useful here. Most people aren't building ORM abstractions — they just want to see what's connected to what.
- This is cool! I made something similar a little while ago that I’ve been touching up here and there. You can’t export to any SQL but I just wanted a tool I can use to diagram tables: https://datagram.studio
Edit: should clarify mine is also free! It’s quite specific to my needs but I’m happy with it
- Is there a way to generate these SVGs via CLi. I really like it, I also liked vscode's postgres extension which can do similar things although locked to vscode, but again no exportable cli option so you can store it in a repo.
- Such an old problem solved very elegantly. Congrats. Remember the days of MySQL Workbench and how clunky it was.
by WhyIsItAlwaysHN
0 subcomment
- Maybe you can support schemas in more dialects by using a similar approach to a little tool I made:
sqlscope.netlify.app
Basically integrate sqlglot to translate the schema between dialects and then use a base dialect for generating the schema.
The two tools seem complementary and you seem to be a better designer, so it would be nice to see it all together
by CodesInChaos
0 subcomment
- Is there a way to hide connections to specific tables? Or alternatively filter out foreign keys by name.
For example in a multi-tenant application 90% of tables will link to the tenant table, but those links add little value to the viewer, so hiding these would be nice.
- Have only had a quick look at it, but it looks very nicely done! Out of interest, did you use AI to assist with development? If yes, what percentage of the code would you say is AI generated vs conventional?
- Is there any tool that will look at all the tables in my database and create an ER diagram with all the relationships?
- There's also Azimutt: https://azimutt.app/gallery
by Footprint0521
0 subcomment
- At some point I should post it, I got deepseek to fully reverse engineer the d2 tala engine binary (the sota for diagrams to code with ER ones), and I’m pretty close to an open source looking Go build with 1:1 parity
Once that’s done I guess I can just clean room design it to wasm and post it on npm lol
Goals for someday
by swatiahuja
0 subcomment
- good work, I was really in need of something like this to visualise my schemas
- Great tool
Thanks for this.
Please consider "keeping it going"
- The GitHub link takes you to the front page of GitHub instead of the actual project.
by ahmdnassir1
0 subcomment
- This is cool! People actually need sthng like this.
- Its there already as dbdiagram, what's new?
by clutter55561
0 subcomment
- Great stuff, well done and super useful!
- Looks great, I’ll use this next week :p
by agentic_vector
0 subcomment
- I was looking for it, thanks! Great work!
by John_Kwick
0 subcomment
- Okay thats pretty cool. Nice job!
by linzhangrun
0 subcomment
- nice!
- I kept finding myself needing to visualize database schemas, but most tools had the same problems: paywalls, mandatory signups, or sending your SQL to someone else's server.
So I ended up building my own.
You paste in your CREATE TABLE statements and it generates an interactive ER diagram right in the browser. You can drag tables around, auto arrange the layout, edit table/column names directly on the canvas (it rewrites the SQL for you), add notes and group boxes, and export as PNG or SVG.
No backend, no accounts, no data leaving your machine.
A few implementation details that were fun:
* Built on <canvas> instead of DOM/SVG. Tables are rasterized into cached bitmaps with viewport culling, which keeps things smooth even with hundreds of tables on screen.
* The SQL parser tracks source spans for every token. That lets edits stay surgical so a rename a table and only the relevant identifier (and its references) change while comments and formatting remain untouched.
* The URL contains the entire schema. Sharing simply serializes the schema into the URL itself, so there's no backend, no stored state, and no account required.
* I also experimented with a Rust/WASM version because why not? but the parser was ~37% slower because the JS↔WASM boundary cost outweighed the compute savings but The O(n^2) overlap-resolution pass was about 2.2x faster though
* In the end I stuck with plain JavaScript. No framework ~32KB gzipped
It's a small too nothing great I just figured others might find it useful too.
by devladpopov
0 subcomment
- [flagged]
by hitoshi1964
0 subcomment
- [flagged]
by throwaway613746
0 subcomment
- [dead]