PHPackages                             alizharb/filament-themes-manager - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Admin Panels](/categories/admin)
4. /
5. alizharb/filament-themes-manager

AbandonedArchivedLibrary[Admin Panels](/categories/admin)

alizharb/filament-themes-manager
================================

Advanced theme management system for Laravel Filament with Sushi-powered in-memory storage

1.0.1(7mo ago)10421↓50%2MITPHPPHP ^8.2|^8.3|^8.4CI failing

Since Sep 21Pushed 7mo agoCompare

[ Source](https://github.com/AlizHarb/filament-themes-manager)[ Packagist](https://packagist.org/packages/alizharb/filament-themes-manager)[ Docs](https://github.com/alizharb/filament-themes-manager)[ RSS](/packages/alizharb-filament-themes-manager/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (16)Versions (3)Used By (0)

Filament Themes Manager
=======================

[](#filament-themes-manager)

[![Filament Themes Manager](https://camo.githubusercontent.com/fa97bda5f74b4227d371992114e596974867241d7085cd4381215862fe2530c1/68747470733a2f2f62616e6e6572732e6265796f6e64636f2e64652f46696c616d656e742532305468656d65732532304d616e616765722e6a7065673f7468656d653d6c69676874267061636b6167654d616e616765723d636f6d706f7365722b72657175697265267061636b6167654e616d653d616c697a6861726225324666696c616d656e742d7468656d65732d6d616e61676572267061747465726e3d617263686974656374267374796c653d7374796c655f31266465736372697074696f6e3d46696c616d656e742d706f77657265642b61646d696e2b70616e656c2b746f2b6566666f72746c6573736c792b696e7374616c6c2532432b707265766965772532432b616e642b6d616e6167652b7468656d65732e266d643d312673686f7757617465726d61726b3d3026666f6e7453697a653d313030707826696d616765733d68747470732533412532462532466c61726176656c2e636f6d253246696d672532466c6f676f6d61726b2e6d696e2e737667)](https://camo.githubusercontent.com/fa97bda5f74b4227d371992114e596974867241d7085cd4381215862fe2530c1/68747470733a2f2f62616e6e6572732e6265796f6e64636f2e64652f46696c616d656e742532305468656d65732532304d616e616765722e6a7065673f7468656d653d6c69676874267061636b6167654d616e616765723d636f6d706f7365722b72657175697265267061636b6167654e616d653d616c697a6861726225324666696c616d656e742d7468656d65732d6d616e61676572267061747465726e3d617263686974656374267374796c653d7374796c655f31266465736372697074696f6e3d46696c616d656e742d706f77657265642b61646d696e2b70616e656c2b746f2b6566666f72746c6573736c792b696e7374616c6c2532432b707265766965772532432b616e642b6d616e6167652b7468656d65732e266d643d312673686f7757617465726d61726b3d3026666f6e7453697a653d313030707826696d616765733d68747470732533412532462532466c61726176656c2e636f6d253246696d672532466c6f676f6d61726b2e6d696e2e737667)[![Latest Version on Packagist](https://camo.githubusercontent.com/3403d0a9fc490a4868cb54a83fdb2bfc9ab9a08051c57f4c9d73d8eb1c378729/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f616c697a686172622f66696c616d656e742d7468656d65732d6d616e616765722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/alizharb/filament-themes-manager)[![Total Downloads](https://camo.githubusercontent.com/6c7e4b49e7680335c12e2a54b87842720b7a808caf938410451b2128e3d639d0/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f616c697a686172622f66696c616d656e742d7468656d65732d6d616e616765722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/alizharb/filament-themes-manager)[![License](https://camo.githubusercontent.com/f64fd35389f5f7c6e11e8454eef11249e64426e37f764a8ce1017606d697324a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f616c697a686172622f66696c616d656e742d7468656d65732d6d616e616765722e7376673f7374796c653d666c61742d737175617265)](https://github.com/alizharb/filament-themes-manager/blob/main/LICENSE.md)[![GitHub Stars](https://camo.githubusercontent.com/3eadba3b599a05e7782503e5a14a8a9e852e2c2dc8b30a37e773e929464c27a0/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f416c697a486172622f66696c616d656e742d7468656d65732d6d616e616765722e7376673f7374796c653d7374796c653d666c61742d73717561726526636f6c6f723d79656c6c6f77)](https://github.com/AlizHarb/filament-themes-manager/stargazers)[![PHP Version](https://camo.githubusercontent.com/ce8c5c34d0caa88f29d3a2b73a9569ed42fe022f30c2eb3bff3b30608bab0208/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f616c697a686172622f66696c616d656e742d7468656d65732d6d616e616765722e7376673f7374796c653d7374796c653d666c61742d73717561726526636f6c6f723d707572706c65)](https://packagist.org/packages/alizharb/filament-themes-manager)

**A comprehensive, enterprise-grade theme management system for Laravel Filament applications.**

Built to seamlessly integrate with `qirolab/laravel-themer`, this package provides a sophisticated admin interface for managing, installing, previewing, and switching themes with professional-grade security and performance optimization.

---

🚀 Key Features
--------------

[](#-key-features)

### Theme Management

[](#theme-management)

- **Multi-source Installation** - Deploy themes from ZIP files, GitHub repositories, or local directories
- **Advanced Cloning System** - Duplicate and customize existing themes with intelligent inheritance
- **One-Click Activation** - Seamlessly switch between themes without downtime
- **Safe Deletion** - Remove themes with built-in protection for critical system themes
- **Live Preview** - Test themes in isolation without affecting other users

### Security &amp; Validation

[](#security--validation)

- **Structure Validation** - Comprehensive theme integrity checking
- **File Type Restrictions** - Configurable security policies for theme uploads
- **Protected Themes** - Safeguard critical themes from accidental deletion
- **Compatibility Checking** - Automatic PHP/Laravel version validation
- **Malicious Code Scanning** - Optional security scanning for theme files

### Developer Experience

[](#developer-experience)

- **Artisan CLI Integration** - Full command-line theme management
- **Comprehensive API** - Programmatic theme operations
- **Event System** - Custom integrations and workflows
- **Multi-language Support** - Extensive internationalization
- **Cache Optimization** - Performance-tuned with intelligent caching

### Analytics &amp; Monitoring

[](#analytics--monitoring)

- **Usage Analytics** - Detailed theme performance metrics
- **Health Monitoring** - Real-time validation status tracking
- **Statistics Dashboard** - Comprehensive overview widgets
- **Asset Compilation** - Build status and asset management

---

📋 System Requirements
---------------------

[](#-system-requirements)

ComponentVersion**PHP**`^8.2|^8.3|^8.4`**Laravel**`^11.0|^12.0`**Filament**`^4.0`**Laravel Themer**`^2.0`---

⚡ Quick Installation
--------------------

[](#-quick-installation)

### 1. Install Package

[](#1-install-package)

```
composer require alizharb/filament-themes-manager
```

### 2. Publish Configuration

[](#2-publish-configuration)

```
php artisan vendor:publish --tag=filament-themes-manager-config
```

### 3. Register Plugin

[](#3-register-plugin)

Add to your Filament panel in `app/Providers/Filament/AdminPanelProvider.php`:

```
use Alizharb\FilamentThemesManager\FilamentThemesManagerPlugin;

public function panel(Panel $panel): Panel
{
    return $panel
        ->plugins([
            FilamentThemesManagerPlugin::make(),
        ]);
}
```

### 4. Enable Preview System (Optional)

[](#4-enable-preview-system-optional)

Add middleware to `bootstrap/app.php`:

```
->withMiddleware(function (Middleware $middleware) {
    $middleware->web(append: [
        \Alizharb\FilamentThemesManager\Http\Middleware\ThemePreviewMiddleware::class,
    ]);
})
```

---

🎯 Usage Guide
-------------

[](#-usage-guide)

### Admin Interface

[](#admin-interface)

Access the theme management interface at **System → Theme Manager** in your Filament admin panel.

#### Core Operations

[](#core-operations)

ActionDescriptionAccess**View Details**Inspect theme configuration and metadataEye icon**Activate Theme**Switch active theme instantlyStatus toggle**Preview Theme**Test theme safely in sessionPreview button**Clone Theme**Duplicate theme for customizationClone action**Delete Theme**Remove unused themes safelyDelete button#### Bulk Operations

[](#bulk-operations)

- **Multi-select** themes using checkboxes
- **Bulk deletion** of compatible themes
- **Configuration export** for backup and migration

### Command Line Interface

[](#command-line-interface)

#### GitHub Installation

[](#github-installation)

```
php artisan theme:install username/repository --type=github --activate
```

#### ZIP Installation

[](#zip-installation)

```
php artisan theme:install /path/to/theme.zip --type=zip
```

#### Theme Cloning

[](#theme-cloning)

```
php artisan theme:clone default "Custom Default" --slug=custom-default --activate
```

---

🏗️ Theme Structure
------------------

[](#️-theme-structure)

### Required Directory Layout

[](#required-directory-layout)

```
themes/my-theme/
├── theme.json          # Theme manifest (required)
├── views/              # Blade templates
│   ├── components/     # Reusable components
│   └── layouts/        # Page layouts
├── css/
│   └── app.css        # Stylesheets
├── js/
│   └── app.js         # JavaScript assets
├── vite.config.js     # Build configuration
└── screenshot.png     # Preview image

```

### Theme Manifest (theme.json)

[](#theme-manifest-themejson)

```
{
  "name": "Professional Theme",
  "slug": "professional-theme",
  "version": "1.0.0",
  "description": "A professional theme for Laravel applications",
  "author": "Your Name",
  "author_email": "contact@example.com",
  "homepage": "https://example.com",
  "screenshot": "screenshot.png",
  "parent": null,
  "requirements": {
    "php": ">=8.3",
    "laravel": ">=12.0"
  },
  "assets": ["css/app.css", "js/app.js"],
  "supports": ["responsive", "dark-mode"],
  "license": "MIT"
}
```

---

⚙️ Configuration
----------------

[](#️-configuration)

### Theme Discovery

[](#theme-discovery)

```
'discovery' => [
    'paths' => [
        'themes' => base_path('themes'),
        'resources' => resource_path('themes'),
    ],
    'cache_duration' => 3600,
    'auto_discover' => true,
],
```

### Security Configuration

[](#security-configuration)

```
'security' => [
    'validate_theme_structure' => true,
    'scan_malicious_code' => true,
    'protected_themes' => ['default'],
    'allowed_file_types' => [
        'php', 'blade.php', 'css', 'scss', 'js', 'vue', 'json'
    ],
],
```

### Preview System

[](#preview-system)

```
'preview' => [
    'enabled' => true,
    'route_prefix' => 'theme-preview',
    'session_duration' => 3600,
    'cache_screenshots' => true,
],
```

### Dashboard Widgets

[](#dashboard-widgets)

```
'widgets' => [
    'enabled' => true,
    'page' => true,      // Theme Manager page
    'dashboard' => true, // Main dashboard
],
```

---

🎨 Live Preview System
---------------------

[](#-live-preview-system)

### Capabilities

[](#capabilities)

- **Session Isolation** - Preview affects only current user
- **Professional UI** - Elegant banner with intuitive controls
- **One-Click Activation** - Seamless transition to permanent theme
- **Auto-Expiration** - Automatic fallback to original theme
- **Keyboard Shortcuts** - `Ctrl+H` to toggle banner visibility

### Preview Routes

[](#preview-routes)

RoutePurpose`/theme-preview/{slug}`Activate preview`/theme-preview/exit`Exit preview mode`/theme-preview/{slug}/activate`Make preview permanent---

🔧 API Reference
---------------

[](#-api-reference)

### Theme Manager Service

[](#theme-manager-service)

```
use Alizharb\FilamentThemesManager\Services\ThemeManagerService;

$service = app(ThemeManagerService::class);

// Theme operations
$themes = $service->getAllThemes();
$service->setActiveTheme('theme-slug');
$service->installThemeFromGitHub('username/repository');
$service->cloneTheme('source-slug', 'new-slug', 'New Theme Name');

// Analytics
$stats = $service->getThemeStats();
```

### Theme Model

[](#theme-model)

```
use Alizharb\FilamentThemesManager\Models\Theme;

// Queries
$themes = Theme::all();
$activeThemes = Theme::active()->get();
$validThemes = Theme::valid()->get();
$theme = Theme::bySlug('theme-slug')->first();

// Statistics
$totalCount = Theme::count();
$activeCount = Theme::getActiveCount();
$validCount = Theme::getValidCount();
```

---

🔍 Troubleshooting
-----------------

[](#-troubleshooting)

### Common Issues

[](#common-issues)

#### Themes Not Appearing

[](#themes-not-appearing)

- **Check Permissions**: Verify themes directory is readable
- **Validate JSON**: Ensure `theme.json` files contain valid JSON
- **Clear Cache**: Run `php artisan cache:clear`

#### Preview System Issues

[](#preview-system-issues)

- **Middleware Registration**: Confirm middleware is properly registered
- **Route Accessibility**: Verify preview routes are accessible
- **Session Configuration**: Check session driver and configuration

#### Asset Loading Problems

[](#asset-loading-problems)

- **Vite Configuration**: Verify theme's Vite setup is correct
- **Asset Paths**: Ensure paths in `theme.json` are accurate
- **Build Process**: Run `npm run build` for production assets

### Debug Configuration

[](#debug-configuration)

```
'debug' => env('THEME_DEBUG', false),
```

### Performance Optimization

[](#performance-optimization)

- Enable theme caching in production environments
- Configure appropriate cache durations
- Utilize asset compilation for faster loading

---

🧪 Development
-------------

[](#-development)

### Contributing Guidelines

[](#contributing-guidelines)

1. **Fork** the repository
2. **Create** feature branch (`git checkout -b feature/amazing-feature`)
3. **Commit** changes (`git commit -m 'Add amazing feature'`)
4. **Push** to branch (`git push origin feature/amazing-feature`)
5. **Open** Pull Request

### Testing Suite

[](#testing-suite)

```
composer test              # Run test suite
vendor/bin/pest            # Run Pest tests directly
vendor/bin/pest --coverage # Generate coverage report
vendor/bin/phpstan analyse # Static analysis
```

### Code Quality

[](#code-quality)

```
vendor/bin/pint           # Fix code style
vendor/bin/rector process # Code modernization
```

---

📜 License
---------

[](#-license)

This package is open-sourced software licensed under the **MIT License**. See [LICENSE.md](LICENSE.md) for details.

---

🏆 Credits
---------

[](#-credits)

### Core Contributors

[](#core-contributors)

- **[Ali Harb](https://github.com/alizharb)** - Lead Developer &amp; Maintainer

### Dependencies

[](#dependencies)

- **[Filament](https://filamentphp.com)** - Admin panel framework
- **[qirolab/laravel-themer](https://github.com/qirolab/laravel-themer)** - Core theming engine
- **[Laravel](https://laravel.com)** - PHP framework foundation

---

💝 Support the Project
---------------------

[](#-support-the-project)

Your support helps maintain and improve this package:

- ⭐ **Star** the repository
- 🐛 **Report** bugs and issues
- 💡 **Suggest** new features
- 📚 **Improve** documentation
- 💰 **[Sponsor development](https://github.com/sponsors/alizharb)**

---

**Built with ❤️ by [Ali Harb](https://github.com/alizharb)**

*Making Laravel theming professional and accessible*

###  Health Score

40

—

FairBetter than 88% of packages

Maintenance62

Regular maintenance activity

Popularity24

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

234d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/aa785764ac84cfd4a3237f3d4a3471ce97b479ac6fa2171a5ea8bf369c2377e5?d=identicon)[AlizHarb](/maintainers/AlizHarb)

---

Top Contributors

[![AlizHarb](https://avatars.githubusercontent.com/u/34816428?v=4)](https://github.com/AlizHarb "AlizHarb (9 commits)")

---

Tags

laravelpackageuiadminthemestheme managerfilamentsushi

###  Code Quality

TestsPest

Static AnalysisPHPStan, Rector

### Embed Badge

![Health badge](/badges/alizharb-filament-themes-manager/health.svg)

```
[![Health](https://phpackages.com/badges/alizharb-filament-themes-manager/health.svg)](https://phpackages.com/packages/alizharb-filament-themes-manager)
```

###  Alternatives

[guava/filament-knowledge-base

A filament plugin that adds a knowledge base and help to your filament panel(s).

206120.5k1](/packages/guava-filament-knowledge-base)[andreia/filament-ui-switcher

Add a modal with options to switch between different UI layouts and styles (colors, fonts, font sizes).

233.8k](/packages/andreia-filament-ui-switcher)[a2insights/filament-saas

Filament Saas for A2Insights

161.1k](/packages/a2insights-filament-saas)[caresome/filament-neobrutalism-theme

A neobrutalism theme for FilamentPHP admin panels

303.2k](/packages/caresome-filament-neobrutalism-theme)[watheqalshowaiter/filament-sticky-table-header

A Filament plugin that makes table headers stick when scrolling down for better UX.

3020.4k](/packages/watheqalshowaiter-filament-sticky-table-header)[craft-forge/filament-language-switcher

Zero-config language switcher for Filament admin panels. Automatically scans available translations, renders dropdown with country flags, persists selection via sessions.

1016.4k](/packages/craft-forge-filament-language-switcher)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
