Full lifecycle tracing
Follows every route from HTTP verb → controller → service → repository → model → events/jobs.
Understand how routes, controllers, services, models, jobs, events, commands, and channels connect — in seconds.

Laravel Brain is a zero-config developer tool that analyzes your Laravel codebase and renders an interactive node graph of your application's architecture. It traces every route through its controller, services, repositories, models, jobs, events, Artisan commands, scheduled tasks, broadcast channels, and Filament panels — giving you a bird's-eye view of the entire application without reading a single line of code.
The scan writes JSON graph files to storage/app/laravel-brain/. The viewer is served at /_laravel-brain entirely through your existing Laravel routes — no separate server process needed.

TIP
Laravel Brain is a dev-only tool, installed with --dev. Its routes, commands, and MCP server only ever register when app()->environment('local') — it never ships to production.
EventServiceProvider::$listen/$subscribe, or #[AsEventListener] attributes, and links them to the events they handleroutes/console.php, and Kernel-registered commandscommand, job, call) with the time it runs, its timezone, and its overlap/one-server guardsroutes/channels.phpShouldBroadcast/broadcastOn() from each event and draws an edge to the channel(s) it broadcasts on, with the alias, queue, and payload shape in the event's detail panelfile_get_contents calls that leave the application, with host, method, timeout and retry — including requests built in one class and sent from anotherCache:: facade and cache() helper calls per method, split into read / write / invalidate / lock, with the key (literal or constructed — a computed one is labelled, never guessed), plus tags, store and TTL where declaredhasMany, belongsTo, and other Eloquent relationsRelation::morphMap() gives each model — the value that actually lands in *_type columns — and flags a model an enforced map leaves outMacroable::macro()/::mixin() (Filament's own Macroable included) and draws them as their own node kind, so a call like $table->money() isn't a dead end when you go looking for where it came fromDB::transaction() closure (or a manual begin/commit range), with a rollback path in a catch block boundaried separatelyBus::chain()/Bus::batch()/withChain(), with arrows through a chain in its run orderprovides() key nothing backs, or the legacy $defer property the framework no longer readslaravel/ai agents and the tools they expose to the model on the graph, with a standalone tab so an agent nothing else reaches is still visible#[ObservedBy], Model::observe(), or booted()) and links them to the models they observe#[UsePolicy] attribute, or naming convention) and links it in the graph@include, @extends, @component, @each, and <x-...> components as view → view edges, so a shared partial shows every entry point it reachesUserResource::make()/::collection()/new and nested resource composition as edges, so a changed resource shows every controller and resource that uses itapp/ re-traces only the affected controllers and merges the result into the previous graph instead of rebuilding it from scratchlaramint/laravel-stress): configure request count, concurrency, headers, body, and timeout; see timing percentiles (min/avg/p50/p95/p99/max), throughput, and status distribution in the sidebar. While a run is active, the graph highlights the route and animates packets along the request pathbrain:export-context Artisan command and GET /_laravel-brain/api/context API endpoint. Context includes call chain, complexity hotspots, DB operations, cache operations, source snippets, and all backend/frontend packages — always reproducible from the same scan databrain:generate-rules. Each file is populated with your project's real architecture, routes, packages, and code-health dataPull requests are welcome. For major changes, please open an issue first to discuss what you'd like to change.
git clone https://github.com/LaraMint/laravel-brain
cd laravel-brain
composer install
cd frontend && npm install && npm run devTests:
composer testLaravel Brain is open-sourced software released under the MIT license.