log1x/filament-starter
A ready-to-use Filament starter kit for Laravel that provides a clean admin panel foundation with authentication, user management, and sensible defaults, helping you skip repetitive setup and focus on building your application’s unique features.
This is a project template, not a Composer library. Treat it as a scaffold you own from day one.
composer create-project log1x/filament-starter my-app.composer install
cp .env.example .env
php artisan key:generate
# set DB_* in .env
npm install
php artisan migrate --seed
npm run build
php artisan serve
/admin with the seeded user. Check database/seeders/DatabaseSeeder.php for credentials; change them immediately.Look here first:
app/Providers/Filament/AdminPanelProvider.php — panel path, auth, colors, middleware, plugins, widgets.app/Filament/Resources/UserResource.php — reference resource implementation.resources/css/filament/admin/theme.css — Tailwind/Filament theme.app/Models/User.php — FilamentUser::canAccessPanel() and policy wiring.tests/Feature — starter test patterns.composer.json scripts — lint, test, analyse, CI entry points.First meaningful use case: replace the demo dashboard/User resource with your first domain resource:
php artisan make:filament-resource Customer --generate
Then refine the generated form/table, add a policy, and register navigation grouping in the panel provider.
Resource-first development. Most day-to-day work happens in app/Filament/Resources. Use generators, then edit:
php artisan make:filament-resource Order --generate --view
php artisan make-filament-policy Order
Keep form/table schemas in the resource; move reusable fields into app/Filament/Forms/Components or app/Filament/Tables/Columns.
Panel configuration as the control plane. Use AdminPanelProvider for:
->path('admin')
->login()
->colors(['primary' => Color::Indigo])
->viteTheme('resources/css/filament/admin/theme.css')
->plugins([...])
->widgets([...])
->navigationGroups([...])
->middleware([...])
For a second panel (e.g. customer portal), generate another provider and register it in bootstrap/providers.php; don’t overload the admin panel.
Auth and authorization. Implement FilamentUser on User and gate panel access:
public function canAccessPanel(Panel $panel): bool
{
return $this->hasRole('admin') && $this->hasVerifiedEmail();
}
Pair with policies for resources. Use seeders for local roles, but avoid hardcoding production admins in seeders.
Theme workflow. Edit resources/css/filament/admin/theme.css, then:
npm run build
php artisan filament:assets
If colors/assets look stale, run php artisan filament:optimize-clear and hard-refresh.
Widgets and custom pages. Scaffold with:
php artisan make:filament-widget StatsOverview --stats-overview
php artisan make:filament-page Settings --panel=admin
Register widgets in the panel provider or resource getHeaderWidgets(). Use custom pages for settings/profile screens instead of stuffing logic into resources.
Testing pattern. Use Pest/PHPUnit with RefreshDatabase, actingAs($user), and Livewire assertions for Filament components. Test policy boundaries and canAccessPanel() separately. Keep CI running composer test, composer lint, and composer analyse if configured.
Deployment workflow. On deploy:
composer install --no-dev --optimize-autoloader
npm ci && npm run build
php artisan migrate --force
php artisan filament:optimize
php artisan optimize
Ensure storage:link and writable storage//bootstrap/cache.
Stripping the starter. Early in a project, delete demo resources/widgets/seeders you won’t use, update navigation groups, and simplify AdminPanelProvider. The template is most useful as a reference; carrying unused demo code slows onboarding.
composer update fixes for starter code. Upgrade Filament/Laravel manually and follow their upgrade guides; pin versions in composer.json and test upgrades.npm run build or php artisan filament:assets. Custom themes must be referenced with ->viteTheme(...) in the panel provider./admin 403s, check User::canAccessPanel(), the FilamentUser contract, email verification, and roles. Seeded users may have email_verified_at = null.php artisan filament:cache-components can make new resources/pages invisible. Clear with php artisan filament:optimize-clear or php artisan optimize:clear..env.->tenant(Team::class), relationships, and route binding; test tenant scoping in policies and resources. It’s easy to leak cross-tenant data if policies are incomplete.php artisan vendor:publish), and use panel provider/render hooks for UI changes. Extension points include PanelsRenderHook, custom user menu items, ->brandLogo(), ->darkMode(), custom login pages, and panel middleware.php artisan about, php artisan route:list --path=admin, php artisan filament:optimize-clear, and tail -f storage/logs/laravel.log. For Livewire/Filament component issues, inspect the browser network response and Laravel log rather than guessing.How can I help you explore Laravel packages today?