internachi/modular
internachi/modular is a module system for Laravel applications. It lets you create modules in an app-modules/ directory using Composer path repositories for autoloading and Laravel package discovery for initialization, plus minimal tooling to fill the gaps.
app-modules/ and are autoloaded as Composer path repositories, you can map module directories to squad ownership. This supports decisions about how many teams you can run in parallel, where handoffs happen, and how to onboard new engineers (a module is a bounded, readable slice of the product).Modules\ so a module can later be extracted into a standalone Composer package. That is a real strategic option to preserve — it keeps open the possibility of publishing internal capabilities, sharing code across apps, or spinning out a component later without a rewrite.make: commands with a --module= flag and adds modules:sync for phpunit.xml and PhpStorm configuration. That means you can standardize developer workflows on existing Laravel habits and custom stubs rather than retraining teams on a bespoke CLI — relevant when evaluating whether a productivity initiative will actually land.phpunit.xml by modules:sync. This supports decisions about per-module CI gates and test ownership, which is often the difference between module boundaries that hold and boundaries that rot.Consider it when:
app/ has become a shared dumping ground, cross-team merge conflicts are frequent, and ownership is unclear.composer update modules/<name> as part of module creation, and you are comfortable treating modules as Composer dependencies.Look elsewhere when:
nwidart/laravel-modules for this; Modular is not a plugin system.A reasonable adoption stance: pilot on a single non-critical domain module, measure merge-conflict reduction and onboarding time, and keep the organization-namespace discipline so the exit ramp stays open.
For executives: This is a low-cost, low-risk organizational change for our Laravel application. Instead of a multi-quarter microservices rewrite, we can carve our monolith into named, owned modules inside the existing app. It is MIT licensed, actively maintained, and deliberately small — it leans on standard Composer and Laravel mechanisms rather than inventing a new architecture we would have to maintain. The main caveat is limited third-party adoption, which we mitigate by piloting on one domain and preserving an extraction path.
For engineering leadership: We get module boundaries that map to teams, with each module containing its own routes, migrations, tests, factories, policies, Blade components, and translations. Auto-discovery covers the common Laravel extension points, and existing make: commands gain a --module= flag, so developers keep their current workflow and custom stubs. modules:sync wires up phpunit.xml and IDE configuration, and modules:cache exists if discovery overhead becomes measurable. We should publish the config and set an organization namespace so modules can be lifted into standalone packages later.
For engineering teams: Think of a module as a Laravel package that lives in app-modules/ and is registered as a Composer path repository. You scaffold with make:module, run composer update modules/<name>, and then work exactly as you do today — just with a --module= flag on the generators you already use. Boundaries are conventions plus Composer, not a new runtime, so there is very little to learn and very little magic to debug.
Known trade-offs to state up front: no runtime enable/disable of modules (use nwidart/laravel-modules if that becomes a product requirement), zero recorded dependents so we should expect to handle edge cases ourselves, and module creation touches composer.json, which means the build pipeline must tolerate path repositories.
How can I help you explore Laravel packages today?