Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Modular Laravel Package

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.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit. internachi/modular is best understood as a thin convention layer over two first-class Laravel/Composer mechanisms rather than a framework of its own. Modules live in app-modules/, are registered as Composer path repositories, and are initialized via Laravel package discovery. That means the architecture inherits whatever you already do for package autoloading, service provider boot, and Artisan registration — a strong fit for teams that want codebase partitioning without adopting a bespoke runtime. It is explicitly not a dynamic module loader: there is no enable/disable toggle, no per-module service provider registry, and no module dependency graph. For a TPM, that distinction is the central scoping decision — this is a code-organization tool, not a plugin platform. If any requirement mentions third-party or tenant-toggleable modules, this package is the wrong primitive and the README itself concedes nwidart/laravel-modules is the better fit.

Integration feasibility. Low technical effort, high process effort. Installation is a single composer require, and module creation is a scaffold command that mutates the root composer.json (adds a path repository and a require entry) followed by a targeted composer update modules/<name>. Nearly every Laravel make: command gains a --module= flag, so existing developer muscle memory and custom stubs carry over. Auto-discovery covers commands, migrations, factories, policies, Blade components, event listeners, and translations, which removes most of the wiring work that makes modularization initiatives stall. The real cost is organizational: deciding module boundaries, namespace policy, and ownership.

Technical risk. Moderate and concentrated in three areas. First, the root composer.json becomes a shared mutable artifact — every new module edits it, which is a predictable merge-conflict hotspot on parallel branches. Second, the design assumes a single app-modules/* path repository glob (adopted in 1.1.0 in place of per-module repositories), so unusual monorepo or vendored layouts may need care. Third, the package's value is largely in auto-discovery heuristics over module directory structure; deviations from the scaffolded layout may silently degrade discovery rather than fail loudly, which argues for enforcing structure via the publishable stubs. Version constraints have historically lagged new Laravel majors (Laravel 10 support arrived in 1.11.0), so major-upgrade planning must include a check on this dependency.

Key questions.

  • Are we solving organization (this package) or dynamic extensibility (not this package)?
  • What is our module namespace policy — default Modules\ or an org namespace that preserves the option to extract a module into a standalone package later?
  • Do we need modules to be independently versioned/deployable, or is single-repo, single-deploy sufficient?
  • Who owns the root composer.json entry for a new module, and what is the branch/rebase protocol to contain conflicts?
  • What is our supported Laravel major, and does this package's constraint currently match it?
  • Will tests live in per-module suites wired into phpunit.xml via modules:sync, and does CI know how to run them?

Integration Approach

Stack fit. Assumes a conventional Laravel application on Composer 2 with standard package discovery enabled. Nothing exotic is required — no custom bootstrapping, no service container overrides, no filesystem abstraction beyond Composer path repositories. The package is MIT-licensed, actively maintained, and has a visible CI badge and changelog, so it is a defensible dependency from a procurement standpoint. Fit is strongest for medium-to-large single-deploy applications that have outgrown a flat app/ tree but do not want to split into separately deployed services or packages.

Migration path. Incremental and reversible, which is the main argument for adopting it. Recommended sequence: (1) publish the config and set the namespace to the organization namespace rather than the default Modules\, because this preserves the future option to extract a module into an external package with minimal churn; (2) run modules:sync and commit the resulting phpunit.xml and PhpStorm configuration changes as a standalone, no-behavior-change commit — this also wires modules into IDE exclude paths, avoiding double-registration of classes; (3) create one empty, non-functional module to validate the scaffold-plus-composer update loop end to end in local and CI before any code moves; (4) extract a single low-coupling, high-churn domain as the pilot; (5) expand only after the pilot has survived at least one full release cycle. Critically, do not attempt a big-bang reorganization of app/ — legacy code can remain in place indefinitely while new domains land in modules, and extraction can proceed opportunistically.

Compatibility. Tracked against current Laravel majors with historical lag on new majors; verify the constraint before scheduling any framework upgrade and treat this dependency as a gate item in that upgrade's checklist. Windows path normalization was a recurring fix area (1.10.0), so mixed-OS teams should confirm scaffold and sync behavior on Windows workstations early. PhpStorm configuration patching is a convenience with a maintenance tail — the sync command rewrites IDE config files, so those files should be committed deliberately rather than regenerated ad hoc, and developers on other IDEs simply get no benefit from that portion of sync. Custom stubs are a supported extension point and the right place to encode house conventions, but stubs are code that must be maintained and reviewed like any other.

Sequencing. Establish namespace and module-boundary conventions before the first extraction, then codify them in published stubs. Follow with CI enablement — per-module test suite, module cache warm/clear in the build pipeline if used — so the first real module ships with tests running. Only then begin domain extraction, ordered by coupling (least coupled first). Defer any plan to extract modules into standalone Composer packages until the org namespace is in place and at least one module has proven stable in-tree; the extraction option is valuable precisely because it is deferred, not because it is exercised.

Operational Impact

Maintenance. Low and well-bounded. The package is a thin wrapper over Composer and Laravel discovery, so most "maintenance" is really upkeep of your own conventions: stubs, namespace policy, and the root composer.json module list. Dependency maintenance is a version-constraint bump per Laravel major. The larger ongoing cost is governance — someone must own the decision of what constitutes a module and prevent the boundary from eroding. Without that, app-modules/ becomes a second app/ with worse tooling intuition.

Support. Small-project, maintainer-led open source (InterNACHI, a single identifiable maintainer) with roughly 1.2k stars and zero dependents recorded. That combination means no commercial support, no vendor escalation path, and limited community mass for edge cases — but also a small, readable codebase where the team can debug issues directly if needed. Mitigation: pin to a known-good minor, read the changelog before upgrading, and accept that novel problems are yours to solve. The MIT license removes legal friction and permits forking if the project ever stalls.

Scaling. Scales well along the axis it targets — code organization in a single application — and degrades predictably outside it. Adding modules is cheap; there is no runtime registry or manifest to grow unbounded, and modules:cache exists to keep auto-discovery from becoming a per-boot directory scan as module count rises. It does not scale into independent deployability, per-module versioning, or runtime enable/disable. Teams anticipating service extraction should note this package makes code modular, not deployment units; it is a stepping stone toward, not a substitute for, service boundaries.

Failure modes. The realistic ones: (a) root composer.json conflicts under parallel module creation — the most likely day-to-day friction, mitigated by serializing module creation or rebasing promptly; (b) silent discovery gaps when directory structure drifts from convention, producing missing routes, migrations, or components that fail at runtime rather than at build time — mitigated by enforcing stubs and by a smoke test per module; (c) stale module cache after adding or renaming modules, presenting as inexplicably missing registrations — mitigated by wiring modules:clear into the deploy or build step; (d) Laravel major upgrade blocking on a lagging version constraint; (e) IDE config churn from modules:sync rewriting shared PhpStorm files. None are severe; all are cheaper to prevent than to diagnose.

Ramp-up. Short for anyone already fluent in Laravel package conventions — the concepts map directly onto path repositories and package discovery, and the make: command flags mean most developers need only learn one new option and one scaffold command. Budget roughly half a day per engineer plus a short internal write-up on boundary and namespace conventions. The walkthrough video is a useful onboarding asset. The genuine ramp-up cost is conceptual rather than technical: getting the team to agree on what a module is before anyone creates the second one.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
mehedimi/laravel-amp-mail
happones/laravel-vue-i18n-generator
jwerd/inertia-table
siberfx/flysystem-wasabi
hollyit/token-replace
ippanelcom/laravel-sdk
adachsoft/changelog-linter
adachsoft/collection
payerurl/telegrambot-crypto-payment-instant-payout
dskripchenko/laravel-hybrid-search
riorizkyrainey/lara-ced
mehedimi/static-vel
zharp/zharp
nonsapiens/bigquery-model-sync
lgu-bayambang-ict-office/lgu-laravel-development-standards
andydefer/laravel-support
se7enxweb/flysystem
lampwick/laravel
jeslage/statamic-emojis
micahdshackelford/rmap-laravel