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.
laravel-cartographer is a Laravel-native documentation/architecture tool: config-driven diagram generation, Artisan commands, committed Markdown outputs, and an internal DiagramGenerator pipeline. For a TPM, the main value is turning Laravel model relationships into reviewable ERDs and domain-level diagrams that live in the repo and can be gated in CI. Named groups map well to modular-monolith or bounded-context discussions, letting teams commit a main ERD plus per-domain diagrams such as docs/erd/billing.md.cartographer:check are straightforward CI additions. Image export is optional and depends on an externally installed mermaid-cli plus symfony/process; it is not a package dependency. The read-only-safe check command is a good fit for PR pipelines. Composer’s constraint behavior reduces accidental upgrade risk for projects that do not meet requirements.mermaid-cli, CI runtime growth as configured diagrams/groups expand, and misinterpretation of what cartographer:check validates: it compares committed Mermaid source, not the rendered image. Renderer-limit warnings at 50,000 characters or 500 edges are advisory only and will not fail CI, so large diagrams may still break hosted renderers. Themes apply only to images, which is good for keeping committed Markdown neutral. No breaking changes are called out for v1.2.0, but the PHP 8.3/Laravel 12–13 floor is the primary adoption gate.DiagramGenerator? Is the package’s maintenance cadence and documentation sufficient for production dependency policy?cartographer:check to PR CI on a read-only checkout, and only then add optional image export where stakeholder-facing diagrams are needed. If existing ERD tooling exists, run this in parallel for one domain before replacing anything.symfony/process ^7.2 || ^8.0 is needed for image export, and mermaid-cli must be installed separately. CI that only runs cartographer:check does not need Node. Composer will hold projects on an earlier release rather than break incompatible environments. Themes/fonts affect images only; committed Markdown remains theme-neutral, which supports broad compatibility.cartographer:check to PR CI. 6) Add optional image export job with pinned mermaid-cli if images are required. 7) Apply themes/fonts only in the image job. 8) Monitor renderer-limit warnings and split large groups as needed. 9) Integrate DiagramGenerator into custom reporting or docs pipelines if manual commands become insufficient.cartographer:check reduces drift by failing CI and listing stale files with a short diff, but teams must regenerate and commit updates. Named groups multiply files, so ownership should be explicit. Image export adds external tool maintenance: mermaid-cli, Node in the image job, and renderer version pinning. Source-level checks remain Node-free, which keeps the primary CI gate lightweight.--only, --except) reduce bespoke scripting. Support burden is mostly process-related: teaching teams to treat diagrams as code, keeping group definitions current, and interpreting check failures. A platform or architecture owner should own CI wiring and group taxonomy.cartographer:check regenerates everything config declares, so large portfolios should expect longer CI jobs and may need scoped checks or scheduled full checks.cartographer:check to exit 1 with a diff. Missing mermaid-cli fails image export but does not block source-level checking. Renderer limits produce warnings without changing exit codes, so a diagram can pass CI yet fail in a hosted renderer. A relation leaving a group is drawn as an empty box, which is useful but can confuse readers if group boundaries are poorly chosen. The check validates Mermaid source, not rendered image freshness, so image-only staleness is not caught. Composer constraints may block upgrades on older PHP/Laravel stacks.How can I help you explore Laravel packages today?