8 comments

  • written-beyond54 minutes ago
    100/10 for mobile usability. Panning, Zooming, selecting and moving was so seamless I thought I was tripping out.
    • Galanwe18 minutes ago
      That's really good yes, even double tapping editing does not reset the zoom level. Definitely one of the best mobile friendly site I have seen.
  • corkybeta58 minutes ago
    Could we have the option of straight lines and 90 degree angles? I’ve never really liked the bendy ones. Looks cool, good job!
  • robhati1 hour ago
    It&#x27;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&#x27;s server.<p>No backend, no accounts, no data leaving your machine.<p>A few implementation details that were fun:<p>* Built on &lt;canvas&gt; instead of DOM&#x2F;SVG. Tables are rasterized into cached bitmaps with viewport culling, which keeps things smooth even with hundreds of tables on screen.<p>* 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.<p>* The URL contains the entire schema. Sharing simply serializes the schema into the URL itself, so there&#x27;s no backend, no stored state, and no account required.<p>* I also experimented with a Rust&#x2F;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
  • agentic_vector1 hour ago
    I was looking for it, thanks! Great work!
  • encodedrose1 hour ago
    The GitHub link takes you to the front page of GitHub instead of the actual project.
    • serious_angel1 hour ago
      <p><pre><code> Just to clarify, what link is it? I&#x27;ve check it out, and the GitHub icon, in the header on the top right corner, is correct, and links to the following project: - https:&#x2F;&#x2F;github.com&#x2F;royalbhati&#x2F;sqltoerdiagram</code></pre>
      • robhati1 hour ago
        I have just updated it. He was right to point that out.
    • robhati1 hour ago
      updated thanks.
  • John_Kwick54 minutes ago
    Okay thats pretty cool. Nice job!
  • robhati3 hours ago
    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&#x27;s server.<p>So I ended up building my own.<p>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&#x2F;column names directly on the canvas (it rewrites the SQL for you), add notes and group boxes, and export as PNG or SVG.<p>No backend, no accounts, no data leaving your machine.<p>A few implementation details that were fun:<p>* Built on &lt;canvas&gt; instead of DOM&#x2F;SVG. Tables are rasterized into cached bitmaps with viewport culling, which keeps things smooth even with hundreds of tables on screen.<p>* 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.<p>* The URL contains the entire schema. Sharing simply serializes the schema into the URL itself, so there&#x27;s no backend, no stored state, and no account required.<p>* I also experimented with a Rust&#x2F;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<p>It&#x27;s a small too nothing great I just figured others might find it useful too.