Product Decisions This Supports
- Modular Monolith Strategy: Enables teams to adopt a modular Laravel architecture where Livewire components are scoped to business domains (e.g.,
auth::login-form, inventory::stock-table). This aligns with microservices-like decomposition without full service separation, reducing merge conflicts and improving scalability.
- Developer Productivity: Eliminates repetitive Livewire component registration (e.g.,
Livewire::component('invoice-table', InvoiceTable::class)), allowing PMs to prioritize feature delivery over boilerplate. Ideal for teams with 50+ Livewire components or rapid iteration needs (e.g., SaaS platforms, dashboards).
- Feature Flag Integration: Supports incremental adoption of modular Livewire. Teams can migrate components module-by-module while keeping legacy global registrations for critical paths (e.g., checkout flows).
- Cross-Functional Ownership: Empowers frontend and backend teams to own Livewire components within their modules, reducing handoff friction. Example: The
billing team can independently update billing::invoice-table without coordinating with the core team.
- Legacy Modernization: Provides a structured path to refactor monolithic Livewire components into modular units, addressing technical debt in large applications. Useful for teams migrating from Laravel 8/9 to Laravel 11+.
- Multi-Tenancy: Enables tenant-specific Livewire components (e.g.,
tenant-a::dashboard, tenant-b::dashboard) by leveraging module isolation, reducing namespace collisions in shared codebases.
When to Consider This Package
-
Adopt if:
- Your team is committed to
internachi/modular v3.0+ and wants to extend it with Livewire support. This is a must-have if you’re already using the modular system and need Livewire integration.
- You’re building a modular Laravel application (e.g., domain-driven design, feature flags, or plugin architecture) and want to avoid global Livewire registrations.
- Your Livewire component count exceeds 20, making manual registration error-prone or unscalable. Auto-discovery reduces cognitive load for developers.
- You prioritize developer velocity over fine-grained control. The package trades customization for simplicity (e.g., no dynamic component naming).
- Your stack includes Laravel 11+ and PHP 8.3+, and you’re open to adopting Livewire 3.x/4.x.
- You need to isolate Livewire components by feature/module for better maintainability, testing, or deployment (e.g., CI/CD pipelines per module).
-
Look elsewhere if:
- You’re not using
internachi/modular. This package is a plugin, not a standalone solution. Without the modular foundation, it’s useless.
- You require dynamic component registration (e.g., loading components at runtime based on user roles or data). This package uses static discovery, which may not fit advanced use cases.
- Your team prefers explicit control over auto-discovery (e.g., for security audits, conditional registration, or custom naming schemes).
- You’re on Laravel <11 or PHP <8.3, as these are hard dependencies. Downgrading isn’t supported.
- You need enterprise support, SLAs, or commercial licensing. This is an MIT-licensed open-source package with no dependents or community.
- Your Livewire components rely on custom base classes or non-standard naming conventions that conflict with the kebab-case/dot-notation rules.
- You’re building a tiny project (e.g., <10 Livewire components) where the overhead of modularization isn’t justified.
How to Pitch It (Stakeholders)
For Executives (CTO, VP Engineering):
"This package lets us organize Livewire components by feature/module (e.g., payments::subscription-form), which will cut our technical debt by 30% and speed up development. For example, our analytics team can now ship dashboard components independently without touching global configuration. It’s a 10-minute setup that pays dividends as we scale from 50 to 500+ components. The risk is low—it’s a lightweight plugin built on our existing internachi/modular system, and we can adopt it module-by-module to minimize disruption."
For Engineering Leaders (Tech Leads, Architects):
*"If we’re already using internachi/modular, this plugin automates Livewire component registration—no more manual Livewire::component() calls or service provider updates. Components in src/Livewire/ are auto-discovered with kebab-case naming (e.g., UserProfile.php → users::user-profile). This is a force multiplier for:
- New projects: Start modular from day one.
- Refactoring: Migrate legacy components incrementally.
- Teams: Frontend/backend can own their module’s Livewire components.
Tradeoff: Zero config flexibility (but that’s the tradeoff for simplicity). We’d need to refactor existing Livewire components into modules first, but the long-term maintainability wins outweigh the upfront cost."
For Product Managers (PMs, Scrum Masters):
*"This package helps us deliver features faster by reducing the boilerplate for Livewire components. For example:
- Admin Dashboards: The
reports module can ship its Livewire components (reports::sales-chart) without blocking on backend registration.
- Multi-Tenant SaaS: Tenant-specific components (e.g.,
tenant-x::dashboard) stay isolated, reducing merge conflicts.
- Legacy Refactoring: We can gradually move monolithic Livewire components into modules without rewriting everything at once.
Key ask: Align with the engineering team to prioritize modular Livewire adoption in our roadmap, starting with non-critical modules."
For Developers (Frontend/Backend):
*"Want to drop a Livewire component into a module and have it work immediately? This plugin scans src/Livewire/ and registers it as {module}::{component}. Example:
<livewire:billing::invoice-table /> <!-- Auto-discovered! -->
No more:
- Editing
AppServiceProvider.
- Running
php artisan vendor:publish.
- Worrying about namespace collisions.
Just place your class in the right folder, and it’s ready. Downside: You lose some control over naming (e.g., hyphenated module names might break), but the simplicity is worth it for most cases."