Custom Themes
Tenants can install custom storefront themes packaged as Composer libraries. Themes register slot variants — the EYalla layout editor exposes those variants for tenants to mix & match per page.
Anatomy
A theme package looks like:
mytheme/
├── composer.json
├── src/
│ └── Providers/
│ └── MyThemeServiceProvider.php
├── resources/
│ ├── views/
│ │ ├── home/
│ │ │ ├── hero/
│ │ │ │ ├── full-bleed.blade.php
│ │ │ │ └── split-image.blade.php
│ │ │ └── featured-products/
│ │ │ └── carousel-3up.blade.php
│ │ └── partials/
│ │ └── footer.blade.php
│ └── css/
│ └── theme.css
└── config/
└── mytheme.php # slot catalog
composer.json
{
"name": "yourname/eyalla-theme-elegance",
"type": "library",
"require": {
"php": ">=8.4",
"laravel/framework": "^13.0",
"eyalla/template-ecommerce": "^0.4"
},
"extra": {
"laravel": {
"providers": [
"YourName\\EyallaThemeElegance\\Providers\\ThemeServiceProvider"
]
}
},
"autoload": {
"psr-4": {
"YourName\\EyallaThemeElegance\\": "src/"
}
}
}
Slot catalog
config/mytheme.php:
return [
'name' => 'Elegance',
'compatible_templates' => ['ecommerce'],
'pages' => [
'home' => [
'slots' => [
'hero' => [
'variants' => [
'full-bleed' => [
'label' => 'Full-bleed image',
'view' => 'mytheme::home.hero.full-bleed',
'props' => [
'headline' => ['type' => 'text', 'default' => 'Discover'],
'cta_label' => ['type' => 'text', 'default' => 'Shop now'],
'cta_url' => ['type' => 'url', 'default' => '/products'],
],
],
],
],
],
],
],
];
Service provider
public function boot(): void
{
$this->loadViewsFrom(__DIR__.'/../../resources/views', 'mytheme');
$this->mergeConfigFrom(__DIR__.'/../../config/mytheme.php', 'mytheme');
// Register the theme with the EYalla theme registry.
app(\App\Domain\Customization\Services\ThemeRegistry::class)
->register('elegance', __DIR__.'/../../config/mytheme.php');
}
Best practices
- Mobile-first. Test at 360×640 before anything wider. Lighthouse mobile score < 85 is a release-blocker.
- RTL aware. Use Tailwind's
rtl:variant or logical properties (me-2notmr-2). - Bilingual ready. Pull all customer-facing strings from
__('key')and ship alang/{en,ar}/theme.php. - No JS-required. Storefronts must render without JavaScript for SEO. Progressive enhance.
- Compatible templates — declare which vertical templates your theme works with (typically just
ecommerce).
Publishing
Once your theme is stable:
- Tag a v1.0.0 release on your VCS.
- Submit to packagist.org.
- Email
developers@eyalla.comwith the package name — we'll list it in the official theme catalog after a security review.
Coming soon
- Theme preview page (try a theme in a sandbox tenant without installing).
- Hot-reload during development.
- Asset versioning via composer hash.