salman053 / project-canvas
An immersive 3D visualization tool for Laravel applications that maps architecture, dependencies, and test coverage in real-time.
Fund package maintenance!
Requires
- php: ^8.3
- illuminate/console: ^12.0 || ^13.0
- illuminate/filesystem: ^12.0 || ^13.0
- illuminate/http: ^12.0 || ^13.0
- illuminate/routing: ^12.0 || ^13.0
- illuminate/support: ^12.0 || ^13.0
Requires (Dev)
- larastan/larastan: ^3.9
- laravel/agent-detector: ^2.0
- laravel/chisel: ^0.1
- laravel/pao: ^1.0
- laravel/pint: ^1.29
- laravel/prompts: ^0.3
- orchestra/testbench: ^10.0 || ^11.0
- pestphp/pest: ^4.6
- pestphp/pest-plugin-laravel: ^4.1
- pestphp/pest-plugin-type-coverage: ^4.0
- phpstan/extension-installer: ^1.4
README
An immersive 3D visualization tool that transforms your Laravel application's architecture into an interactive, living graph.
Overview
Laravel Canvas scans your entire Laravel codebase, identifies all key architectural components (Models, Controllers, Jobs, Listeners, Policies, Middleware, Service Providers, and Routes), maps their interconnections, and renders everything as a stunning 3D universe powered by THREE.js.
Features
- 3D Architecture Visualization — Interactive WebGL-powered 3D graph with orbital controls
- Auto-Scanning — Automatically discovers models, controllers, jobs, and more
- Dependency Mapping — Visualizes constructor injections, use statements, and relationships
- Health Indicators — Color-coded nodes: green (healthy), yellow (moderate), red (needs refactoring)
- Real-Time Test Mode — Watch tests animate the graph with green/red pulses
- Search & Filter — Instant node lookup with autocomplete, filter by component type
- Heat Map — Git commit frequency visualized on the graph
- Snapshots — Capture and compare architecture states over time
- Export — Generate shareable static JSON snapshots
Installation
composer require salman053/project-canvas
php artisan vendor:publish --provider="Salman053\Canvas\CanvasServiceProvider"
Quick Start
Scan your codebase:
php artisan canvas:scan
Launch the 3D visualization:
php artisan canvas:serve
Open your browser to http://localhost:8080/canvas and run your tests in another terminal to see the graph come alive.
Commands
php artisan canvas:scan— Scan the codebase and display architecture statisticsphp artisan canvas:serve— Start the 3D visualization and WebSocket server
API
Canvas provides a REST API at /api/canvas/ for programmatic access to architecture data.
Dashboard
A dashboard with aggregate statistics is available at /canvas/dashboard.
Configuration
Publish the config file to customize scanning paths, visualization settings, and health thresholds.
php artisan vendor:publish --tag=canvas-config
License
MIT