internachi/modular
A lightweight module system for Laravel using Composer path repositories and Laravel package discovery. Organize large apps by placing self-contained “modules” in an app-modules/ directory, following standard Laravel package conventions with minimal extra tooling.
Feature Development:
auth, payments, reports). This aligns with the package’s design philosophy of leveraging Laravel conventions while enabling granular organization.composer.json path repository integration simplifies this transition by treating modules as dependencies.frontend, analytics) to parallelize development and reduce merge conflicts. The --module flag in make: commands ensures team-specific assets (e.g., controllers, migrations) are scoped correctly.Roadmap Prioritization:
slack-notifications, sms-gateway). The package’s alignment with Laravel’s package system makes this feasible without reinventing discovery mechanisms.modules:cache and modules:clear commands enable targeted caching strategies.Build vs. Buy:
nwidart/laravel-modules if:
Use Cases:
tenant-a/features, tenant-b/features) while sharing core modules.php artisan make:module marketing-campaign) during sprints.Adopt this package if:
composer.json path repository setup facilitates this).make: commands with --module flags).Look elsewhere if:
nwidart/laravel-modules instead.Alternatives to Evaluate:
nwidart/laravel-modules: Better for dynamic modules but heavier and less Laravel-native.*"We’re adopting internachi/modular to transform our monolithic Laravel application into a scalable, team-friendly architecture—without rewriting the codebase. Here’s why it’s a no-brainer:
make:controller --module=payments.*"internachi/modular lets us modularize the app without sacrificing Laravel’s ecosystem. Here’s the ask:
auth, billing) as a proof of concept. Target modules with clear boundaries and minimal cross-dependencies.--module flag in make: commands to enforce scoping (e.g., make:controller --module=reports). This reduces merge conflicts and makes ownership explicit.php artisan modules:cache) and test them in isolation. The package’s auto-discovery for migrations/factories cuts boilerplate.composer.json path repository setup to eventually extract modules into standalone packages if needed.
Why this over alternatives:nwidart/laravel-modules: No custom directory structures or heavyweight tooling.*"internachi/modular makes it trivial to organize Laravel apps by feature. Here’s how it works:
php artisan make:module payments → scaffolds a app-modules/payments/ directory with src/, routes/, database/, etc.--module=payments with any make: command (e.g., make:controller --module=payments). All assets go in the right place automatically.<x-payments::component />).composer require internachi/modular and start modularizing. Publish the config later if you need custom namespaces.
Win for you:app/ directories.php artisan modules:sync.php artisan make:module demo.php artisan make:controller UserController --module=demo.Route::module('demo')->get(...) (or use standard Laravel routing).
Docs: GitHub | Walkthrough."*How can I help you explore Laravel packages today?