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

Filament Modules Laravel Package

savannabits/filament-modules

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture Fit

  • Modularity Alignment: The package leverages nwidart/laravel-modules to provide a Filament-specific modular architecture, aligning with Laravel’s modular design patterns. This is ideal for large-scale applications where separation of concerns (e.g., admin panels, reporting, CRM) is critical.
  • Filament Plugin System: The package abstracts Filament’s plugin system, enabling autonomous modules (each with its own resources, pages, widgets, and panels) without manual registration. This reduces boilerplate and improves maintainability.
  • Cluster-Based Organization: Supports logical grouping of Filament components (e.g., "Sales Module Cluster," "HR Module Cluster") via clusters, which enhances navigation and reduces cognitive load in complex panels.

Integration Feasibility

  • Laravel/Filament Compatibility: Explicitly supports Laravel 11/12 + Filament 4.x/5.x, with backward compatibility for older versions. The dependency on nwidart/laravel-modules (v11/12) is well-vetted and widely adopted.
  • Minimal Core Impact: The package does not modify Filament’s core but wraps it, ensuring compatibility with future Filament updates (as seen in experimental Filament 5 support).
  • Composer Integration: Requires merge-plugin for autoloading modules, which is a standard practice for modular Laravel apps. This adds ~5 minutes of setup but is non-disruptive.

Technical Risk

  • Version Lock-In: Tight coupling with nwidart/laravel-modules (v11/12) may require coordinated updates if the underlying package evolves. However, the MIT license mitigates vendor lock-in risks.
  • Cluster Navigation UX: The clusters.use-top-navigation feature improves UX but may require custom CSS/JS for edge cases (e.g., responsive layouts). Test this early in development.
  • Access Control (WIP): The package’s access control features (e.g., CanAccessTrait) are experimental. Validate if they meet your RBAC needs or if Filament’s built-in policies suffice.
  • Performance Overhead: Each module loads as a separate plugin, which could impact initial panel load time in resource-heavy apps. Benchmark with your expected module count.

Key Questions

  1. Modularity Scope:
    • How many distinct Filament panels/modules will you maintain? (e.g., 3–5 modules may justify this; 50+ could introduce complexity.)
    • Will modules be shared across projects (e.g., via Packagist)? If so, the package’s plugin system is a strong fit.
  2. Navigation Strategy:
    • Do you prefer top-level clusters (clusters.use-top-navigation=true) or side navigation? Mock this early.
    • How will you handle cross-module workflows (e.g., a "Create Order" resource spanning multiple modules)?
  3. Access Control:
    • Does Filament’s native gates/policies suffice, or do you need the package’s CanAccessTrait?
    • Will you use module-specific middleware (e.g., ModuleServiceProvider::boot()) for auth?
  4. CI/CD Impact:
    • How will you test modules in isolation? The package supports this, but your test suite may need adjustments.
    • Will you use Git submodules or Composer packages for shared modules? The package supports both.
  5. Future-Proofing:
    • Are you targeting Filament 5? The package has experimental support, but stability is unproven.
    • Do you need hot-reloading for module development? The package doesn’t support this natively; consider Vite/Laravel Mix workarounds.

Integration Approach

Stack Fit

  • Laravel Ecosystem: Ideal for Laravel 11/12 apps using Filament 4.x/5.x. The package extends Laravel’s modularity without reinventing the wheel.
  • Filament-Specific: Designed for Filament’s resource/page/widget/plugin system. Avoid if you’re using Filament sparingly (e.g., <5 resources).
  • Complementary Packages:
    • nwidart/laravel-modules: Handles core modularity (routes, providers, migrations).
    • spatie/laravel-package-tools: Useful for publishing modules as Composer packages (if sharing across projects).
    • filament/spatie-laravel-permission: Integrates with Filament’s built-in RBAC for module-level permissions.

Migration Path

  1. Assessment Phase:
    • Audit existing Filament resources/pages to identify logical modules (e.g., "Users," "Inventory," "Reports").
    • Decide on cluster strategy: Will you use clusters.enabled=true or flat module panels?
  2. Pilot Module:
    • Create a single module (e.g., php artisan module:make ReportsModule).
    • Migrate 1–2 resources/pages into the module using module:filament:install.
    • Test navigation, permissions, and asset loading (CSS/JS).
  3. Incremental Rollout:
    • Gradually move modules to the new structure, starting with low-impact ones (e.g., widgets).
    • Use feature flags to toggle module visibility during transition.
  4. Deprecation:
    • Phase out monolithic Filament panels in favor of module clusters.
    • Update database seeds/migrations to use module-specific providers.

Compatibility

  • Filament Plugins: The package automatically registers modules as plugins, reducing manual setup. However, ensure your modules don’t conflict with existing plugins.
  • Asset Loading: Modules isolate assets (CSS/JS) via Filament’s plugin system. Use filament::script/filament::style in module resources.
  • Database: Modules support separate migrations, but shared tables (e.g., users) require careful namespace management.
  • Testing: Use Laravel’s ModuleTestCase or extend FilamentTestCase for module-specific tests.

Sequencing

  1. Prerequisites:
    • Upgrade to Laravel 11/12 + Filament 4.x (if not already).
    • Install nwidart/laravel-modules and configure merge-plugin in composer.json.
  2. Core Setup:
    • Publish config: php artisan vendor:publish --tag="modules-config".
    • Register ModulesPlugin in your AdminPanelProvider.
  3. Module Creation:
    • Generate modules: php artisan module:make ModuleName.
    • Install Filament support: php artisan module:filament:install ModuleName.
  4. Component Migration:
    • Move resources/pages/widgets to modules using the provided Artisan commands.
    • Update navigation to use clusters or module panels.
  5. Finalization:
    • Test cross-module workflows (e.g., redirects, shared data).
    • Document module boundaries and deployment procedures.

Operational Impact

Maintenance

  • Code Organization:
    • Pros: Modules encapsulate dependencies, reducing merge conflicts. Changes to one module (e.g., "Users") won’t break others.
    • Cons: Cross-module refactoring becomes harder (e.g., renaming a shared model). Use abstract modules or interfaces for shared logic.
  • Dependency Management:
    • Modules isolate Composer dependencies. Pin module-specific packages in their composer.json.
    • Use module:publish to share config/views across modules.
  • Debugging:
    • Module isolation simplifies debugging (e.g., "Is this bug in the Reports module or the core panel?").
    • Use php artisan module:list to inspect loaded modules.

Support

  • Onboarding:
    • Developers must learn module-specific commands (e.g., module:filament:resource) and cluster navigation.
    • Provide a cheat sheet for common workflows (e.g., "How to add a resource to a module").
  • User Training:
    • End-users may need training on cluster navigation (e.g., "How to switch between the Sales and HR panels").
    • Use tooltips or documentation screenshots to clarify module boundaries.
  • Troubleshooting:
    • Common issues:
      • Missing assets: Verify filament::script tags in module resources.
      • Navigation not updating: Clear Filament’s cache (php artisan filament:cache:clear).
      • Permission errors: Check CanAccessTrait or Filament’s policy bindings.

Scaling

  • Performance:
    • Plugin Overhead: Each module adds a small load-time cost. Monitor with tideways/xhprof or Laravel Debugbar.
    • Database: Modules isolate migrations, but shared tables (e.g., users) may require index optimization.
    • Caching: Use Filament’s cache tags (
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.
nexmo/api-specification
capell-app/block-library
axium/identity
cetria/laravel-dummy-models
cetria/reflection-helper
agropredict/sso-auth-bundle
evolvestudio/spam-protection
datacore/hub-sdk
develia/commons
cuci/prototurk-sdk
cuci/prototurk-sdk-symfony
develia/geo-bundle
dreamzy/livewire-charts
touchestate-sdk/php-sdk
ecotone/kafka
22h/doctrine-garbage-collection-bundle
agtp/agtp-php
agtp/mod-php
splash/sonata-admin
splash/metadata