alizharb / filament-module-manager
Filament v4 plugin: Module Manager page + Modules overview widget (Nwidart modules integration).
Requires
- php: ^8.2
- calebporzio/sushi: ^2.5
- filament/filament: ^4.0
- nwidart/laravel-modules: ^12.0
- spatie/laravel-data: ^4.17
- spatie/laravel-package-tools: ^1.16
Requires (Dev)
- phpunit/phpunit: ^10.0
README
A powerful Filament v4 plugin for managing Laravel application modules with ease
Built on top of Nwidart/laravel-modules with modern admin interface
✨ Features
🎬 Preview
📸 Screenshots and demo GIFs will be added soon
📋 Requirements
Requirement | Version | Status |
---|---|---|
8.2+ | ✅ | |
10+ | ✅ | |
v4+ | ✅ |
Dependencies:
- Nwidart Laravel Modules - Module foundation
- Spatie Data Transfer Objects - Type-safe data handling
⚡ Quick Installation
Step 1: Install via Composer
composer require alizharb/filament-module-manager
Step 2: Register the Plugin
Add to your AdminPanelProvider
:
use Alizharb\FilamentModuleManager\FilamentModuleManagerPlugin; public function panel(Panel $panel): Panel { return $panel // ... other configurations ->plugin(FilamentModuleManagerPlugin::make()); }
Step 3: Publish Configuration (Optional)
# Publish config file php artisan vendor:publish --tag="filament-module-manager-config" --force # Publish translations php artisan vendor:publish --tag="filament-module-manager-translations"
🎯 Usage Guide
📱 Module Management Page
Navigate to Module Manager from your Filament admin sidebar to:
- 📋 View all installed modules
- ✅ Enable/disable modules
- 🗑️ Uninstall unwanted modules
- 📤 Upload new modules via ZIP
📊 Dashboard Widget
The overview widget displays:
- 🟢 Active Modules count
- 🔴 Disabled Modules count
- 📈 Total Modules installed
📦 Module Installation
Single Module Upload
- Prepare your module as a ZIP file
- Ensure
module.json
exists in the module root - Upload through the admin interface
- Enable the module after installation
Multi-Module Package Upload
- Create a ZIP containing multiple modules
- Add a
package.json
in the root with module paths:{ "name": "my-module-collection", "version": "1.0.0", "modules": ["Modules/Blog", "Modules/Shop"] }
- Upload the package ZIP file
- All modules will be extracted and available for management
Module Structure Requirements
MyModule/
├── module.json # Required module configuration
├── composer.json # Optional composer configuration
├── Config/
├── Http/
├── resources/
└── ...
⚙️ Configuration
The published configuration file (config/filament-module-manager.php
) allows you to customize various aspects:
🧭 Navigation Settings
'navigation' => [ 'register' => true, // Show in navigation menu 'sort' => 100, // Navigation order 'icon' => 'heroicon-o-code-bracket', // Navigation icon 'group' => 'filament-module-manager::filament-module.navigation.group', 'label' => 'filament-module-manager::filament-module.navigation.label', ],
📤 Upload Settings
'upload' => [ 'disk' => 'public', // Storage disk 'temp_directory' => 'temp/modules', // Temporary upload path 'max_size' => 20 * 1024 * 1024, // Max file size (20MB) ],
🌍 Multi-Language Support
The package supports multiple languages through translation files:
- English (default)
- Arabic
- Spanish
- French
- German
- And more...
Publish translations and customize them:
php artisan vendor:publish --tag="filament-module-manager-translations"
📦 Package Module Support
The plugin supports multi-module packages via package.json
:
{ "name": "my-module-package", "version": "1.0.0", "modules": ["Modules/Blog", "Modules/Shop", "Modules/User"] }
🤝 Contributing
We welcome contributions! Here's how you can help:
- 🍴 Fork the repository
- 🌿 Create your feature branch (
git checkout -b feature/amazing-feature
) - ✅ Commit your changes (
git commit -m 'Add amazing feature'
) - 📤 Push to the branch (
git push origin feature/amazing-feature
) - 🎯 Open a Pull Request
Development Setup
# Clone the repository git clone https://github.com/AlizHarb/filament-module-manager.git # Install dependencies composer install # Run tests composer test
💖 Sponsor This Project
If this package helps you, consider sponsoring its development:
Your support helps maintain and improve this package for the entire community! 🙏
🐛 Issues & Support
- 🐛 Bug Reports: Create an issue
- 💡 Feature Requests: Request a feature
- 💬 Discussions: Join the discussion
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
🙏 Acknowledgments
- Filament PHP - For the amazing admin panel framework
- Nwidart Laravel Modules - For solid module foundation
- Spatie - For excellent Laravel packages
- All contributors and supporters 🎉
Made with ❤️ by Ali Harb
Star ⭐ this repository if it helped you!