idel/laravel-modular
idel/laravel-modular brings a structured module system to Laravel, letting you split large applications into self-contained packages with their own routes, views, migrations, config, and service providers, so features stay organized, reusable, and easy to enable or disable.
Architecture fit. idel/laravel-modular targets the modular monolith pattern: packaging Laravel application capabilities into discrete modules that register their own service providers, routes, migrations, and views. That aligns with a common TPM-level need — letting multiple squads own bounded contexts inside a single deployable while avoiding an early microservices migration. The package's footprint appears small and convention-driven, which is positive for comprehension but means it sits close to the framework's service-provider and autoloading internals, the exact layer most sensitive to Laravel major-version churn.
Integration feasibility. Composer install plus provider auto-discovery is the likely path; the real cost is organizational, not technical. There is no published evidence of production use (0 dependents, 15 stars), so integration feasibility must be established by an internal spike rather than inferred from the ecosystem. The absence of dependents also means no third-party compatibility matrix exists — you will be the first to discover edge cases with Octane, queue workers, and package discovery caching.
Technical risk.
illuminate/support constraint will block upgrades on the host application's schedule, which is an unacceptable coupling for a foundational concern.nwidart/laravel-modules (orders of magnitude more adoption). Running both is a non-starter; picking the smaller package forfeits community documentation, tooling, and hiring familiarity.Key questions for the maintainer/evaluation spike.
Stack fit. Best fit is a mid-size Laravel monolith (roughly 3–8 squads or 40k–200k LOC) where domain boundaries are already visible in the codebase but not enforced. Below that threshold the package adds ceremony without payoff; above it, you likely want a stronger boundary mechanism than provider registration.
Migration path. Do not restructure the application. Extract one low-risk bounded context into a module behind the package's conventions, keep the rest of the app untouched, and route cross-module calls through explicit interfaces. Critically, introduce a thin internal abstraction over module registration (a small interface plus config) so the package is an implementation detail and swapping to nwidart/laravel-modules or hand-rolled providers is a contained change. This hedge is cheap and is the single highest-value mitigation given the dormancy risk.
Compatibility. Pin the package version explicitly, inspect its composer.json constraints before committing, and add it to your dependency-review gate. Run the spike against the target Laravel version, not the current one, so version support is proven rather than assumed. Validate in CI that config/route caching and composer dump-autoload -o behave identically with modules enabled and disabled.
Sequencing.
nwidart, against plain Laravel providers with a Domain/ folder convention, and against the fork. Recommend continued adoption only if the package survives a Laravel major bump during the pilot window.Maintenance. Effectively a fork-in-waiting. Budget for one engineer to own the dependency, track Laravel releases, and vendor/patch as needed. That is a recurring 2–5% FTE cost, not a one-off — factor it into the build-vs-buy comparison, where the "free" MIT package is not actually free.
Support. GitHub issues only, no SLA, no commercial backing. Escalation path is the source code, which is at least readable and MIT-licensed. Do not place it on a critical path with a hard availability requirement without the fork contingency.
Scaling. Two axes matter: module count (discovery and registration cost at boot, multiplied across web, queue, and scheduled-command processes) and team count (convention enforcement). Mitigate the first with registry caching validated in CI; mitigate the second with automated boundary checks (deptrac or equivalent) rather than documentation alone.
Failure modes to instrument for.
Ramp-up. The API surface is small, so a senior Laravel developer reaches productivity in a day or two. The real ramp-up cost is onboarding future hires to a non-standard, sparsely documented module system they will not have seen elsewhere — unlike nwidart, which appears in prior-experience résumés. Weight that against the package's architectural cleanliness: for a team that has already decided on a modular monolith, this may be a reasonable if under-adopted choice; for a team still choosing, the adoption asymmetry favors the mainstream alternative or a lightweight in-house convention.
How can I help you explore Laravel packages today?