artem-schander/l5-modular
l5-modular is a Laravel package for building modular applications with self-contained modules. It provides module generation, autoloading, and service provider registration so each feature lives in its own namespace, keeping large projects organized and maintainable.
What it actually is. L5Modular is a dev-time Artisan generator, not a runtime framework. php artisan make:module scaffolds a module directory (Controllers, Models, Views, Routes, Migrations, ServiceProviders) and wires a convention for module registration. Nothing in the package sits on the request path in production.
Architecture fit. Strong fit for a modular monolith: vertical slices per domain, clear ownership boundaries, fewer cross-team merge conflicts in a shared app/ tree. Weak fit for microservices (irrelevant), for API-only services (only partially relevant — routing works, but the value is mostly in view/controller grouping), and for teams unwilling to enforce a non-default directory convention. This is an all-in architectural decision, not a per-feature one.
Integration feasibility. High on Laravel 8.x, which the package targets. Uncertain from 9 onward, and effectively unverified on 10/11/12 given the July 2021 last release — the Laravel 11 skeleton removed app/Http/Kernel.php, changed provider registration, and moved to bootstrap/app.php, which generator stubs and the package service provider may not account for. Composer install is trivial; the risk is entirely in whether the commands register and whether the stub output matches current idioms.
Technical risk.
$namespace handling, old controller signatures, no attribute support) is copied into every new module.require-dev dependency with no runtime surface, worst case is "commands don't run" — not an outage.Key questions.
composer.json autoload/PSR-4 entries, or does it assume a pre-configured modules/ namespace?route:cache, config:cache, and parallel test execution?nwidart/laravel-modules (actively maintained, larger ecosystem) a viable substitute, and if so why are we not choosing it?Stack fit. Laravel monolith or modular monolith, PHP 8.x, team of 3+ engineers who will work in parallel across domains. Poor fit for a single-team CRUD app — the convention overhead exceeds the benefit. Poor fit for a Laravel version above 9 without a compatibility spike.
Migration path (recommended: conditional pilot, not blanket adoption).
composer require --dev artem-schander/l5-modular, run make:module, inspect every generated file, run route:cache, config:cache, php artisan test. Hard gate: if the command doesn't register or the stubs are broken, stop and go to option B.nwidart/laravel-modules first — it has active maintenance, Laravel 11/12 support, and a larger community. If it meets requirements, L5Modular is redundant.Compatibility checklist before adopting.
composer dump-autoload picks up the modules/ PSR-4 namespace after generation.route:cache and don't collide on names.bootstrap/app.php structure.Sequencing. Spike → decide (adopt / fork / substitute / decline) → ADR → pilot → conventions doc → rollout. Do not sequence this behind a feature deadline; the fork decision needs calendar space before the team depends on it.
Maintenance. Low code volume but non-zero ownership. The package is a dev dependency, so upgrades are only triggered by Laravel majors or PHP version bumps — realistically 1–2 days per major upgrade to validate commands and refresh stubs. If forked, that ownership is permanent and must be assigned to a named engineer, not "the team."
Support. No vendor, no SLA. Community support is a GitHub issue tracker with a 2021-era backlog and 216 stars — expect self-service. Zero dependents means negligible Stack Overflow or blog coverage; debugging is reading the source, which is small and tractable. Documentation is thin; onboarding relies on internal docs and pairing.
Scaling. Technically trivial — modules are directories, and the generator doesn't run in production. Organizationally, this is the actual value: parallel teams working in isolated namespaces reduce merge conflicts and clarify ownership. The scaling risk is social, not technical — too many modules without a cross-module contract produces a distributed monolith with hidden coupling inside one repo, which is worse than a plain Laravel app because boundaries look enforced but aren't.
Failure modes.
composer dump-autoload, or namespace mismatch between stub and composer.json.UserService classes) — surfaces as confusing resolution bugs.Ramp-up. Roughly half a day for a Laravel-fluent engineer to be productive: run a generator, read the output, follow the ADR. The learning cost is not the tool — it's the conventions: what belongs in a module, how modules talk to each other, where shared utilities live. Budget a pairing session on the first real module and a short internal README, because upstream docs won't cover your specific structure.
How can I help you explore Laravel packages today?