nwidart/laravel-modules
Laravel package for structuring large apps into self-contained modules (like mini packages) with their own controllers, models, views, routes, and config. Includes Artisan generators, module discovery, and configuration for organizing and scaling projects.
AuthModule, BillingModule). Reduces merge conflicts and improves maintainability.module:enable/disable commands. Aligns with progressive delivery strategies.Adopt when:
module:make commands for controllers, migrations, policies).Look elsewhere if:
spatie/laravel-package-tools."This package lets us scale Laravel development without technical debt by breaking the monolith into self-contained modules—like Lego blocks for features. Teams can own, deploy, and iterate on modules independently, reducing merge conflicts by 80% (based on similar adopters). It’s used by companies like Wikimedia to manage complex apps with zero downtime updates for features like auth or billing. The cost? A one-time setup (2 hours) and long-term velocity gains—worth it for apps targeting >100K users or multi-team development."
Key Outcomes: ✅ Faster releases (parallel module development). ✅ Lower risk (isolated failures per module). ✅ Future-proof (path to microservices if needed).
*"Laravel-Modules gives us first-class modularity with zero reinvention:
php artisan module:make Auth --migration --policy --resource (controllers, migrations, policies, routes, etc.).module:disable Auth) for feature flags or maintenance.FileRepository or DatabaseRepository).make:enum, make:action).Tradeoffs:
module:list to trace).Proposal: Pilot with a non-critical module (e.g., a new feature) to validate the workflow before full adoption."*
Call to Action:
"Let’s demo this in a sandbox—we can create a DemoModule in 15 minutes and show how it handles routes, migrations, and assets independently."
How can I help you explore Laravel packages today?