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

Module Manager Laravel Package

nasirkhan/module-manager

Laravel module manager for Laravel Starter with version tracking, migration baselines/updates, dependency checks, publish/diff workflows, and enable/disable lifecycle commands. Includes scaffolding, removal, and test generation via Artisan.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Modular Architecture Adoption: Enables a microservices-like modular structure within Laravel, allowing teams to develop, deploy, and maintain features independently. This aligns with scalability goals for large applications where monolithic codebases become unwieldy.
  • Accelerated Feature Development: Reduces boilerplate for new modules (e.g., module:build, module:make-test) by automating scaffolding, cutting development time for CRUD-heavy features (e.g., "Posts," "Categories").
  • Dependency Management: Solves circular dependency hell in Laravel via explicit module.json requirements and priority-based loading, critical for legacy system refactoring or multi-vendor integrations.
  • Versioned Rollouts: Supports canary releases or feature flags by tracking module versions and migrations, enabling gradual deployment of new functionality (e.g., A/B testing a "Menu" module).
  • Build vs. Buy: Avoids reinventing module systems (e.g., custom composer scripts or ad-hoc solutions) while offering more flexibility than monolithic packages like Laravel Nova or Forge.
  • Roadmap Prioritization: Justifies investment in modular design for future-proofing, especially if the product roadmap includes:
    • Frequent feature toggles (e.g., SaaS multi-tenancy).
    • Third-party integrations (e.g., plugins for e-commerce).
    • Team autonomy (e.g., frontend vs. backend teams owning modules).

When to Consider This Package

  • Avoid if:
    • Your app is small (<5 modules) or monolithic by design (e.g., a single-page admin panel). Overhead of module.json and dependency resolution may not justify benefits.
    • You don’t need versioned migrations or dynamic enabling/disabling of features (e.g., static sites or simple APIs).
    • Your team lacks Laravel/PHP expertise to debug namespace conflicts or migration issues (e.g., composer dump-autoload pitfalls).
    • You’re using Laravel Octane or Swoole, where module loading order could introduce race conditions in high-concurrency environments.
  • Look elsewhere if:
    • You need hot-reloading (use Laravel Livewire + Inertia.js for frontend modules).
    • You require database-agnostic modules (this package assumes MySQL via Laravel Migrations).
    • You’re building a headless API where modules are purely backend services (consider Laravel Sanctum + API Resources instead).
    • Your stack includes non-PHP services (e.g., Node.js microservices; use Laravel Horizon for queues or TALL stack for full-stack modularity).

How to Pitch It (Stakeholders)

For Executives:

*"This package lets us ship features faster and safer by breaking our Laravel app into reusable, version-controlled modules—like Lego blocks for our codebase. For example:

  • Reduce dev time: Spin up a ‘Posts’ module with php artisan module:build in minutes, not days.
  • Minimize risk: Deploy new features (e.g., ‘Payments’) as optional modules, enabling them only for specific users or regions.
  • Future-proof: If we acquire a company with a Laravel app, we can merge modules seamlessly without monolithic refactoring. Cost: ~$0 (MIT license). ROI: Faster iterations, lower technical debt, and easier team scaling."*

For Engineering:

*"This solves three critical pain points:

  1. Dependency Hell: module.json enforces explicit dependencies (e.g., ‘Posts’ requires ‘Categories’), preventing runtime errors.
  2. Migration Chaos: Tracks which migrations belong to which module, so php artisan migrate only runs what’s needed after a composer update.
  3. Boilerplate Fatigue: Generates tests, routes, and controllers in one command (module:build), cutting repetitive setup. Tradeoffs:
  • Requires PHP 8.3+ and Laravel 12/13 (blocker if you’re on older versions).
  • Namespace collisions possible if modules use the same class names (mitigate with module:publish).
  • Learning curve for teams unfamiliar with Laravel’s service provider lifecycle. Proposal: Pilot with one non-critical module (e.g., ‘Newsletter’) to validate workflows before full adoption."*

For Developers:

*"Here’s how you’ll use it daily:

  • Build: php artisan module:build Blog → Instant scaffolding for a new module.
  • Debug: php artisan module:status → See which modules are enabled/disabled and their versions.
  • Deploy: php artisan module:enable Payments --env=production → Toggle features per environment.
  • Test: php artisan module:make-test User --unit → Auto-generate test classes. Pro Tip: Always run composer dump-autoload after publishing modules to avoid ‘Class not found’ errors. The MigrationTracker service will save you hours when updating dependencies."*
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
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
twbs/bootstrap4
php-http/client-implementation
phpcr/phpcr-implementation
cucumber/gherkin-monorepo
haydenpierce/class-finder
psr/simple-cache-implementation