[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-85152":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":16,"stars7d":16,"stars30d":16,"stars90d":16,"forks30d":16,"starsTrendScore":16,"compositeScore":17,"rankGlobal":10,"rankLanguage":10,"license":10,"archived":18,"fork":18,"defaultBranch":19,"hasWiki":18,"hasPages":18,"topics":20,"createdAt":10,"pushedAt":10,"updatedAt":41,"readmeContent":42,"aiSummary":10,"trendingCount":16,"starSnapshotCount":16,"syncStatus":43,"lastSyncTime":44,"discoverSource":45},85152,"sqltoerdiagram","royalbhati\u002Fsqltoerdiagram","royalbhati","ER diagram generator. Paste CREATE TABLE statements and get a clean, interactive ERD — runs 100% in your browser, nothing uploaded","https:\u002F\u002Fsqltoerdiagram.com.",null,"JavaScript",284,17,97,3,0,36.44,false,"main",[21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40],"data-modeling","database","database-schema","dbdiagram","dbml","developer-tools","diagram","entity-relationship-diagram","er-diagram","erd","mysql","open-source","postgresql","schema","sql","sql-parser","sqlite","vanilla-js","visualization","vite","2026-06-15 10:04:55","# SQL to ER Diagram — free online ERD generator\n\nPaste a SQL schema (`CREATE TABLE` statements) → get a clean, interactive ER diagram.\n**Open source and 100% local** — it runs entirely in your browser, so your schema never\nleaves your machine. No server, no signup, no upload. Live at **https:\u002F\u002Fsqltoerdiagram.com**.\n\n![deps](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fdeps-2-blue) ![bundle](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fbundle-32KB%20gzip-brightgreen)\n\n## Why\n\nEvery other SQL-diagram tool is either paywalled, ugly, or slow. SQL to ER Diagram is a\nsingle static page that:\n\n- Parses `CREATE TABLE` \u002F `ALTER TABLE` DDL (MySQL, Postgres, SQL-Server-ish).\n- Renders tables on a **canvas** with cached bitmaps + viewport culling, so it stays\n  smooth at **hundreds of tables** (benchmarked ~120fps while zooming 300 tables \u002F 593 FKs).\n- **Declutters dense schemas**: FK lines are soft by default; **hover** a table to\n  highlight just its relationships, **click** to pin focus (fades every unrelated\n  table and line). Click empty space to clear.\n- **Edit on the canvas → SQL updates**: **double-click** a table name, column name,\n  or column type to edit it inline. The change is applied as a *surgical text edit*\n  to your SQL (comments, formatting and unsupported clauses are preserved), and a\n  table rename automatically updates every `REFERENCES` to it.\n- **Add columns**: click a table to pin it, then **+ add column**. The new column is\n  inserted into your SQL with a default type for the selected **dialect**\n  (PostgreSQL \u002F MySQL \u002F SQLite \u002F SQL Server), and opens inline so you can name it.\n  Editing a column type shows dialect-aware type suggestions.\n- **Your arrangement is saved**: drag tables wherever you like — positions and the\n  camera persist automatically, so reloading restores your exact layout instead of\n  re-arranging. Editing SQL keeps your manual positions; only brand-new tables get\n  auto-placed (beside the rest). **Arrange** re-runs auto-layout when you want it.\n- **Save \u002F Open projects**: **Save** downloads a `.json` project (SQL + layout + camera\n  + dialect); **Open** loads one back. Keep multiple diagrams or share them.\n- **Share link**: **Share** copies a URL with the entire project (SQL + node positions\n  + camera + dialect) encoded in the URL hash — gzip-compressed + base64. The data\n  lives in the link itself (the `#…` fragment is never sent to a server), so sharing\n  needs **no backend**. Opening the link restores the exact diagram.\n- **Annotations** (bottom-left palette): add **sticky notes** and **group boxes** to\n  label and cluster sections. Drag to move, drag the corner to resize, double-click to\n  edit text, click to select (colour swatches + delete), or press Delete. They're part\n  of the diagram — included in save, share links, and PNG\u002FSVG exports.\n- **Overlap-free layout**: auto-arrange runs a separation pass so no two tables overlap.\n- **Hide the SQL panel** (⬚ in the toolbar) for a full-width diagram.\n- **Syntax-highlighted SQL editor**: keywords \u002F types \u002F strings \u002F comments \u002F numbers\n  are colored via a paint layer behind the textarea. Re-tokenizing is a single linear\n  pass coalesced to one animation frame, so typing stays instant (~6ms full repaint on\n  a 45KB \u002F 300-table script, sub-ms on normal schemas).\n- Lets you **drag** tables, **scroll\u002Fpinch to zoom**, pan, and **smart auto-arrange**:\n  hub-aware layered layout (the most-connected table is placed on one side with its\n  related tables aligned beside it), with **Horizontal\u002FVertical** direction and\n  **Compact\u002FComfortable\u002FSpacious** spacing options under the **Arrange ▾** menu.\n- Exports **PNG** (raster) and **SVG** (vector).\n- Has light + dark themes, and remembers your last schema locally.\n\n## Run locally\n\n```bash\nnpm install\nnpm run dev      # http:\u002F\u002Flocalhost:5173\n```\n\n## Build & host\n\n```bash\nnpm run build    # outputs static files to dist\u002F\n```\n\n`dist\u002F` is plain static HTML\u002FJS\u002FCSS — drop it on any static host:\n\n- **GitHub Pages** — push `dist\u002F` to a `gh-pages` branch, or use an action.\n- **Netlify \u002F Vercel \u002F Cloudflare Pages** — build command `npm run build`, publish dir `dist`.\n- **Any web server \u002F S3 bucket** — just upload the contents of `dist\u002F`.\n\nPreview the production build locally: `npm run preview`.\n\n## Supported SQL\n\n- `CREATE TABLE [IF NOT EXISTS] name ( ... )` with quoted \u002F backtick \u002F `[bracket]` \u002F `schema.qualified` names.\n- Inline column constraints: `PRIMARY KEY`, `NOT NULL`, `UNIQUE`, `REFERENCES other(col)`.\n- Table-level constraints: `PRIMARY KEY (...)`, `UNIQUE (...)`,\n  `FOREIGN KEY (...) REFERENCES other(...)`, `CONSTRAINT ... FOREIGN KEY ...`.\n- `ALTER TABLE x ADD [CONSTRAINT ...] FOREIGN KEY (...) REFERENCES y(...)`.\n- Line (`--`, `#`) and block (`\u002F* *\u002F`) comments are ignored.\n\n## Tech\n\n- **Vite** — build + dev server.\n- **@dagrejs\u002Fdagre** — layered auto-layout.\n- Custom canvas renderer + SQL DDL parser (no heavy SQL-parser dependency).\n\n## Shortcuts\n\n- **⌘\u002FCtrl + Enter** — re-arrange.\n- **Double-click** canvas — zoom in.\n- Drag the divider between panes to resize the editor.\n",2,"2026-06-15 02:30:10","CREATED_QUERY"]