EYalla/Developers Contact us

Template Package Authoring

Templates are vertical applications shipped as Composer packages — ecommerce powers retail stores, booking powers gyms / studios / salons, restaurant powers F&B. You can build new ones.

When to author a template (vs. a theme)

You're building Author a...
New visual look for an existing vertical Theme
New domain (e.g. real-estate, legal-services, pet-care booking) Template
Reusable storefront component Theme
New back-office workflow (admin Filament resources, jobs, services) Template

Templates are heavier — they ship migrations, models, services, Filament resources, storefront components. Themes only ship views.

Anatomy

template-petcare/
├── composer.json
├── database/
│   └── migrations/
│       ├── 2026_xx_xx_create_pet_profiles_table.php
│       └── 2026_xx_xx_create_grooming_appointments_table.php
├── src/
│   ├── Models/
│   ├── Services/
│   ├── Livewire/Storefront/
│   ├── Filament/Tenant/Resources/
│   └── Providers/
│       └── TemplatePetcareServiceProvider.php
├── resources/
│   ├── views/
│   └── lang/
└── config/
    └── template-petcare.php

Migrations — tenant DB only

Critical rule: template migrations target the tenant DB, not the hub. Do NOT call $this->loadMigrationsFrom(...) in your service provider — that would auto-register them against the default connection and pollute the hub schema with tenant tables.

Instead, the platform's tenant:assign-template {tenant} {slug} --migrate command picks up your database/migrations/ directory automatically when a tenant adopts your template.

Hub-side metadata

Register your template in the hub templates table when your package boots:

public function boot(): void
{
    if ($this->app->runningInConsole()) {
        $this->commands([
            \YourName\TemplatePetcare\Console\InstallCommand::class,
        ]);
    }

    // Register slot catalog for the layout editor.
    config(['template-petcare' => require __DIR__.'/../../config/template-petcare.php']);
}

Filament resources

Place under src/Filament/Tenant/Resources/... and discover from the tenant panel provider. Gate on tenancy()->tenant->can('petcare') so non-Petcare tenants don't see your nav.

Service contracts

If your template adds Pro/Elite-only features (e.g. petcare needs vet records), declare them as capabilities the plan resolver checks:

// In your boot():
config()->push('eyalla.capabilities', [
    'petcare' => 'Pet care vertical template',
    'vet_records' => 'Veterinary records (Pro/Elite)',
]);

Plans then list your capabilities in their allowed_modules JSON.

Publishing

Same as themes — packagist + email developers@eyalla.com. Templates get a more thorough review (security + DB schema sanity + Filament UX consistency).

Reference templates to study

Read those repos first. Most patterns transfer.