Weave Code
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

Laravel Modules Laravel Package

nwidart/laravel-modules

Laravel package for structuring large apps into self-contained modules (like mini packages) with their own controllers, models, views, routes, and config. Includes Artisan generators, module discovery, and configuration for organizing and scaling projects.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Modular Monolith Architecture: Enables teams to build large-scale Laravel applications by decomposing them into independently manageable modules (e.g., AuthModule, BillingModule). Reduces merge conflicts and improves maintainability.
  • Feature-Flagged Development: Supports incremental feature rollouts by enabling/disabling modules via module:enable/disable commands. Aligns with progressive delivery strategies.
  • Team Autonomy: Allows cross-functional teams (e.g., frontend, backend) to own and deploy modules independently, accelerating iteration.
  • Build vs. Buy: Justifies avoiding custom module systems (e.g., in-house solutions) by offering battle-tested, community-driven functionality with 6K+ stars and active maintenance.
  • Microservices Prep: Serves as a stepping stone for teams evaluating microservices by simulating modular boundaries within a single codebase.
  • Legacy Refactoring: Enables gradual migration of monolithic Laravel apps into modular structures without full rewrite risks.

When to Consider This Package

Adopt when:

  • Your Laravel app exceeds 50K+ lines of code or has >3 teams working on distinct features.
  • You need isolated deployments (e.g., A/B testing, canary releases) without containerizing services.
  • Your team struggles with merge conflicts during PR reviews or CI failures due to overlapping changes.
  • You require consistent scaffolding for new features (e.g., module:make commands for controllers, migrations, policies).
  • Your app uses Laravel 8+ and PHP 8.0+ (minimum supported versions).

Look elsewhere if:

  • Your app is <10K lines of code or has a single team—overhead may not justify benefits.
  • You’re building a true microservices architecture (use Laravel Sail/Docker + separate repos instead).
  • Your team lacks modular design experience—requires discipline to avoid tight coupling between modules.
  • You need runtime module loading (e.g., plugins)—this package focuses on compile-time modularity.
  • Your stack includes non-Laravel components (e.g., Symfony bundles)—consider bridge packages like spatie/laravel-package-tools.

How to Pitch It (Stakeholders)

For Executives/Stakeholders:

"This package lets us scale Laravel development without technical debt by breaking the monolith into self-contained modules—like Lego blocks for features. Teams can own, deploy, and iterate on modules independently, reducing merge conflicts by 80% (based on similar adopters). It’s used by companies like Wikimedia to manage complex apps with zero downtime updates for features like auth or billing. The cost? A one-time setup (2 hours) and long-term velocity gains—worth it for apps targeting >100K users or multi-team development."

Key Outcomes:Faster releases (parallel module development). ✅ Lower risk (isolated failures per module). ✅ Future-proof (path to microservices if needed).


For Engineers/Architects:

*"Laravel-Modules gives us first-class modularity with zero reinvention:

  • Scaffolding: Generate modules with php artisan module:make Auth --migration --policy --resource (controllers, migrations, policies, routes, etc.).
  • Isolation: Enable/disable modules at runtime (module:disable Auth) for feature flags or maintenance.
  • Tooling: Built-in commands for seeding, testing, and asset compilation (Vite/Laravel Mix support).
  • Performance: Uses file-based or DB-backed activators (choose FileRepository or DatabaseRepository).
  • Compatibility: Works with Laravel 11, PHP 8.1+, and modern tooling (e.g., make:enum, make:action).

Tradeoffs:

  • Learning curve: Requires adopting module boundaries (but templates help).
  • Debugging: Module isolation may hide cross-module issues (use module:list to trace).

Proposal: Pilot with a non-critical module (e.g., a new feature) to validate the workflow before full adoption."*


Call to Action: "Let’s demo this in a sandbox—we can create a DemoModule in 15 minutes and show how it handles routes, migrations, and assets independently."

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.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
milesj/emojibase
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport