alizharb/filament-module-manager

Filament v4 plugin: Module Manager page + Modules overview widget (Nwidart modules integration).

1.1.2 2025-09-07 00:56 UTC

README

Filament Module Manager

License Latest Version on Packagist Total Downloads GitHub Stars PHP Version

A powerful Filament v4 plugin for managing Laravel application modules with ease
Built on top of Nwidart/laravel-modules with modern admin interface

✨ Features

🎯 Core Features

  • 🔧 Full Filament v4 Compatibility
  • 📦 Module CRUD Operations (View, Enable, Disable, Uninstall)
  • 📤 ZIP Upload Installation with validation
  • 🏷️ Multi-Module Package Support via package.json
  • 📊 Dashboard Widget with statistics
  • 🌍 Multi-Language Support (20+ languages)
  • ⚙️ Configurable Navigation (icon, group, sort order)
  • 🆕 Configurable Widget (enable, dashboard, page)
  • 🆕 GitHub Repository Installation – Install modules directly from GitHub (branch fallback included)

🛠️ Technical Features

  • Smart Module Validation (module.json, composer.json)
  • 🔔 Rich Notifications (Success, Error, Warnings)
  • 📋 Spatie DTO Integration for type safety
  • 🗄️ Sushi In-Memory Storage for dynamic queries
  • ⚙️ Configurable Upload Limits (default: 20MB)
  • 🆕 Accurate Module Naming Reads name directly from module.json for ZIP and GitHub installs.
  • 🆕 Automatic Folder Renaming Module directories are automatically renamed to match module.json.
  • 🆕 Metadata Handling Reads description and version from module.json for accurate display and notifications.
  • 🆕 GitHub Branch Fallback Installs from main branch, automatically falling back to master if needed.
  • 🆕 Full Cache & Config Clearing Clears config, route, and cache after install/uninstall for immediate availability.

🎬 Preview

📸 Screenshots and demo GIFs will be added soon

📋 Requirements

Requirement Version Status
PHP 8.2+
Laravel 10+
Filament v4+

Dependencies:

⚡ 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

  1. Prepare your module as a ZIP file
  2. Ensure module.json exists in the module root
  3. Upload through the admin interface
  4. Enable the module after installation

Multi-Module Package Upload

  1. Create a ZIP containing multiple modules
  2. Add a package.json in the root with module paths:
    {
      "name": "my-module-collection",
      "version": "1.0.0",
      "modules": ["Modules/Blog", "Modules/Shop"]
    }
  3. Upload the package ZIP file
  4. 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:

  1. 🍴 Fork the repository
  2. 🌿 Create your feature branch (git checkout -b feature/amazing-feature)
  3. ✅ Commit your changes (git commit -m 'Add amazing feature')
  4. 📤 Push to the branch (git push origin feature/amazing-feature)
  5. 🎯 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:

Sponsor on GitHub

Your support helps maintain and improve this package for the entire community! 🙏

🐛 Issues & Support

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

🙏 Acknowledgments

Made with ❤️ by Ali Harb
Star ⭐ this repository if it helped you!