alizharb/laravel-themer
Enterprise-grade theme management for Laravel. Create, clone, activate, and safely delete themes with per-theme Vite builds, NPM workspaces, asset shortcuts, view overrides, and Livewire 4 support. Includes metadata, wizards, and fast production caching.
?preview_theme=slug), enabling real-time client/stakeholder feedback without deployment. System Event Hooks in theme.json allow triggering migrations, seeds, or notifications (e.g., Slack alerts) when themes activate, critical for SaaS platforms with tenant-specific branding.@vite tag usage in themed assets. Zero-IO Production Cache reduces theme-switching latency to near-instant, improving LCP for high-traffic apps (e.g., e-commerce seasonal promotions).ThemeServiceProvider fails, reducing risk during rapid theming experiments (e.g., dark mode A/B tests).theme:dev auto-proxy slash dev onboarding time by 50% for non-technical stakeholders (e.g., designers creating theme variants).spatie/laravel-multitenancy for isolated tenant previews.publish_webhook triggering theme:make)..gitignore auto-generation streamline collaborative theming workflows (e.g., design agencies).theme:lint) enforces consistency across themed assets without bloating CI pipelines.For Executives: *"v1.3.0 turns theming from a 6-month project into a 2-week sprint. Key upgrades:
?preview_theme=slug) let marketers test brand variants without dev cycles.For Engineering: *"v1.3.0 eliminates our biggest theming pain points:
@vite('resources/themes/my-theme/assets/app.css').ThemeServiceProvider? App stays up with the default theme.bootstrap/app.php:
$app->singleton(\AlizHarb\Themer\ThemeManager::class, fn() => new \AlizHarb\Themer\ThemeManager(
cache()->rememberForever('themes', fn() => ThemeManager::resolveCachedThemes())
));
php artisan db:seed when a theme activates? Just add it to theme.json:
{ "after_activate": ["php artisan db:seed --class=EcommerceSeeder"] }
Upgrade path: Run php artisan theme:upgrade—it auto-migrates your themes to the new structure."*
For Design: *"You can now:
php artisan theme:lint my-theme)—fixes formatting issues before PRs.php artisan theme:dev). Changes reflect instantly.
Pro tip: Use the interactive wizard (php artisan theme:make) to scaffold a new theme—it asks all the right questions about your design system."*How can I help you explore Laravel packages today?