albertoarena /laravel-truss
A live database structure viewer for Laravel that renders your schema as a scrollable, zoomable ER diagram. Structure only, never data.
★ 299⑂ 11👁 2⑃ 96● 13▤ 38
+0
Daily
299
stars
11
forks
2
watchers
96
prs
13
issues
38
releases
README
Laravel Truss Laravel Truss is a live database structure viewer. It scans your live schema and renders it as a scrollable, zoomable ER diagram right inside your app, so you can see how the tables actually connect without opening a DB client. It reads structure only (tables, columns, keys, indexes); row data is never queried or exposed. Try the live demo to pan, zoom, focus, and export a sample schema in your browser, no install needed, then build a palette in the theme builder and copy the config. See what has shipped and what is next on the roadmap. Stay updated: click Watch Custom Releases to hear about new features, follow along in Discussions, or join the Discord. Features - Live ER diagram of your database, rendered with Mermaid. - Focus mode: a table and its foreign-key neighbours, centred and highlighted. The picker is searchable, matching anywhere in the table name, so it stays usable on a schema with hundreds of tables. - Filter by table name, and toggle native types against Laravel-style labels. - Map-style pan and zoom, with auto-fit and a Fit button. - Export the diagram as PNG or SVG, or its structure as JSON, CSV, a Markdown data dictionary, DBML, or a token-trimmed llm format, from the browser or, for CI and tooling, from the command line with php artisan truss:export. Structure-only and deterministic. --format=html writes the whole diagram as one self-contained file that opens with no server and no install. - Feed your real, live structure to a coding agent as grounding context: annotate it with business meaning, trim it with --compact, and narrow it with --focus, so the agent stops inventing columns. Structure only, never data. - Schema diff: see what changed since your last migration, in a dashboard "Changes" panel and via php artisan truss:diff. Structure-only, added / removed / changed tables, columns, indexes, and foreign keys. - Schema doctor: review your structure for problems (missing primary keys, unindexed foreign keys, duplicate indexes, risky types) in the terminal or in CI with php artisan truss:doctor, and in a dashboard "Health" panel that flags the same problems on the diagram. Deterministic and structure-only, no AI. - Multiple connections: list them in config and switch between their diagrams with a toolbar picker, each scoped to its own database. - Light and dark "blueprint" theme, or bring your own: define custom colours and fonts from config to match your app. Config driven, CSP-safe, no build step. - Keyboard and screen reader support: every trigger on the diagram answers Enter and Space, Escape closes an open menu and hands focus back, focus is always visible, and the diagram names and describes itself (its description follows the filter and focus you are looking at). Checked on every push with axe-core. - Self-contained: Mermaid and fonts are vendored and served from the package, so it works offline and under a strict Content-Security-Policy (no CDN). - Cached snapshot
Discussions
#93Laravel Truss v1.15: Truss without Laravel0 comments · 2026-10-19#80Laravel Truss v1.14: the whole diagram as one file0 comments · 2026-09-19#64Laravel Truss v1.10: PHP 8.2, Laravel Boost, and a calibrated doctor0 comments · 2026-08-27#54Laravel Truss 1.9: a searchable Focus picker0 comments · 2026-08-18#50Web Schema Viewer1 comments · 2026-08-16#18Laravel Truss 1.5: the schema doctor0 comments · 2026-07-30#15Schema diff: see exactly what your last migration changed (v1.4.0)0 comments · 2026-07-29#14Welcome to Truss Discussions0 comments · 2026-07-29
Latest release
v1.16.0: three new schema doctor rules v1.16.0 2026-11-11Added - Three new schema doctor rules. The first two are on by default under the recommended preset, so a truss:doctor run in CI can report findings it did not report before. --fail-on=error turns the build red on TRUSS-INT-008. - TRUSS-INT-004 (warning): the same foreign key declared more than once on a table, usually two migrations that each add the same key. Composite keys are compared as a set of column pairs, so listing the columns in another order is still a duplicate. - TRUSS-INT-008 (error): a foreign key that references columns which are not exactly the primary key or the key of