byrcsc/laravel-cartographer
Laravel Cartographer helps you map and visualize your Laravel application's structure. It gives a clear overview of routes, controllers, models, and their connections, making large codebases easier to navigate, debug, and refactor. Ideal for onboarding and understanding unfamiliar projects.
docs/erd/billing.md committed beside the main docs/erd.md. That turns "we think Billing is loosely coupled" from a whiteboard opinion into a reviewed artifact. Use it to support module-extraction, service-boundary, and team-ownership decisions, and to show the cross-group edges that would become integration contracts if you ever split.cartographer:check regenerates per config, exits 1 on drift, lists each stale file with a short diff, and writes nothing — safe on a read-only checkout. This is a policy decision a PM can actually own: "diagrams are code; stale diagrams fail the build." Cheap to adopt, hard to argue with, and it removes the recurring "please update the ERD" review nit.--only/--except allow one-off focused runs without touching committed group files, which supports ad-hoc analysis during incident reviews, pre-refactor audits, or a single team's spike without churning the repo.--format=svg/png) give you embeddable visuals for onboarding docs, RFCs, and architecture wikis without a designer or a screenshot-refresh ritual. Themes are image-only, so committed Markdown stays theme-neutral and diffs stay readable — a real decision input when deciding whether to commit diagrams at all.DiagramGenerator pipeline (used by every command) plus public export/theming/limit APIs mean custom docs generation — e.g. per-team pages, a docs site build step — is a small integration task rather than a maintained patch. Lowers the cost of saying yes.Consider it when most of these hold:
symfony/process is pulled in, and PNG/SVG export needs a separately installed mermaid-cli (node) on the machines that export. Note the deliberate design win: cartographer:check compares the Mermaid source written beside the image, so CI validates exported diagrams without installing node — you can keep node out of CI entirely.Look elsewhere when:
symfony/process addition and PHP 8.3 floor are real costs).To executives: This is low-cost developer tooling with no production footprint and no runtime dependency — it reads our existing models and writes Markdown (and optionally images) into the repo. It converts architecture documentation from a manual chore that decays into a build artifact that fails CI when it drifts. The payoff is faster onboarding, fewer "how does Billing touch this?" conversations, and an evidence-based trigger for module-splitting decisions, at the cost of a few days of setup. Principal risks are the PHP 8.3 / Laravel 12–13 floor (confirm we are already there before committing) and that the value depends on the team actually reading the diffs.
To engineering: Adopt for the CI drift gate and per-domain groups. cartographer:check is read-only, compares the committed Mermaid source (so CI needs no node, even for exported images), and lists each stale file with a diff. Export, theming, and limit checks are public alongside a DiagramGenerator every command already runs through, so custom docs pipelines are a small integration, not a fork. Relationship detection is cached per model, so full-plus-group runs cost one pass. Cost of entry: symfony/process as a dev dependency and mermaid-cli installed only where images are produced. Start with two groups in a single PR job, measure whether stale-diagram failures are being fixed or muted, then expand.
How can I help you explore Laravel packages today?