Product Decisions This Supports
- Modular Architecture: Enables a plugin-based system for Laravel/Filament applications, allowing teams to develop, deploy, and manage features as isolated modules (e.g., CRM, Reporting, Inventory). Reduces monolithic codebase complexity and accelerates feature delivery via independent plugin lifecycles.
- Developer Experience (DX): Supports "build vs. buy" decisions by providing a generator tool to scaffold plugins (e.g., Filament resources, policies, migrations) in minutes, reducing boilerplate. Aligns with roadmaps for internal tooling platforms or SaaS multi-tenancy where plugins represent customer-specific or feature-flagged modules.
- Scalability: Ideal for composable UIs (e.g., admin dashboards) where plugins dynamically register navigation items, widgets, or CRUD interfaces. Enables feature toggling at the plugin level (e.g., A/B testing, phased rollouts).
- Third-Party Ecosystem: Future-proofs for marketplace plugins (e.g., selling Filament extensions) by standardizing plugin metadata (e.g., versioning, dependencies, activation hooks).
- Maintenance Efficiency: Plugins can be versioned independently, enabling teams to update or deprecate features without full app redeploys (e.g., legacy module sunsetting).
When to Consider This Package
- Avoid if:
- Your app is small-scale or lacks modularity needs (overhead of plugin management may not justify benefits).
- You’re using non-Filament admin panels (this is Filament-specific).
- You need advanced plugin discovery (e.g., npm-like registries); this package focuses on local/self-hosted plugins.
- Your team lacks Laravel/PHP familiarity (requires composer, artisan commands, and Filament knowledge).
- Consider alternatives if:
- You need serverless/deployable plugins (e.g., AWS Lambda layers) → Explore Laravel Vapor or Bref.
- You require frontend plugin isolation (e.g., Micro Frontends) → Evaluate Laravel Mix/Vite or React micro-frontends.
- You’re building a public plugin marketplace → Consider Packagist + Laravel Packages for distribution.
- Adopt when:
- Your Filament app has 3+ independent feature areas (e.g., Users, Orders, Analytics) that could benefit from isolation.
- You’re onboarding new devs frequently and need consistent plugin scaffolding.
- You plan to monetize features via plugins (e.g., premium add-ons).
- Your team uses Git submodules or monorepos for modules—this provides a centralized alternative.
How to Pitch It (Stakeholders)
For Executives/Product Leaders
*"This package lets us decompose our Filament admin panel into reusable plugins—think of it like WordPress plugins, but for Laravel. For example:
- Faster feature delivery: Spin up a new ‘Customer Portal’ plugin in 10 minutes vs. weeks of integration.
- Reduced risk: Plugins can be tested, deployed, and rolled back independently (e.g., A/B test a new reporting plugin without touching core code).
- Scalable monetization: Sell plugins as premium add-ons (e.g., ‘Advanced Analytics’ for $99/year).
- Team autonomy: Dev teams can own plugins end-to-end, from UI to database, without merge conflicts.
Cost: Minimal (MIT license, ~10 mins setup). ROI: Cuts dev time by 30%+ for modular features and enables safer, incremental releases."*
For Engineering Leaders
*"This solves two key pain points:
-
Plugin Generation: The filament-plugins:generate command auto-scaffolds Filament resources, policies, and migrations—no more copy-pasting boilerplate. Example:
php artisan filament-plugins:generate InvoicePlugin --resource --policy
Outputs a ready-to-use plugin with:
- Filament resource (tables, forms).
- Eloquent model + migrations.
- Plugin manifest (metadata, dependencies).
- Activation/deactivation hooks.
-
Runtime Management: Plugins register themselves dynamically, so:
- Navigation: Auto-adds menu items (e.g.,
/plugins/invoices).
- Permissions: Uses Filament’s built-in gate/policy system.
- Lazy-loading: Only loads plugin classes when activated (performance gain).
Tradeoffs:
- Learning curve: Requires understanding Filament’s plugin system (but docs are clear).
- Tooling dependency: Ties you to Filament’s ecosystem (but it’s the fastest Laravel admin framework).
Recommendation: Pilot with one high-priority module (e.g., a new ‘Support Ticketing’ feature) to validate the DX before full adoption."*
For Developers
*"If you’re tired of:
- Merge hell from feature branches.
- Spaghetti code where every change touches
app/Providers/AppServiceProvider.php.
- Slow onboarding for new devs who have to reverse-engineer the app structure.
This package gives you:
✅ Isolated plugins: Each plugin lives in plugins/Invoice/ with its own:
- Filament resources (
resources/InvoiceResource.php).
- Migrations (
database/migrations/..._create_invoices_table.php).
- Policies (
Policies/InvoicePolicy.php).
✅ CLI superpowers: Generate a full plugin in one command:
php artisan filament-plugins:generate Support --resource --policy --table
✅ Dynamic UI: Plugins auto-register to Filament’s sidebar, widgets, or even custom pages.
✅ Version control: Use composer.json to manage plugin dependencies (e.g., require tomatophp/filament-plugins:^1.0).
How to start:
- Install:
composer require tomatophp/filament-plugins.
- Run:
php artisan filament-plugins:install.
- Generate your first plugin:
php artisan filament-plugins:generate MyPlugin --resource.
- Profit: Now you can toggle plugins on/off via the Filament admin UI.
Pro tip: Use plugins for experimental features—enable/disable them without redeploying!"*