lingmyat/filament-starter-kit
A Laravel Filament starter kit that scaffolds a ready-to-use admin panel with authentication, user and role management, permissions, settings, and common CRUD resources, helping you launch new projects faster.
This is a starter kit, not a drop-in Composer package — there is no composer require. You scaffold from it once, then live inside the app it generates.
git clone and re-point the remote) into a fresh project directory.composer install
cp .env.example .env
php artisan key:generate
npm install && npm run dev
.env, then run the seeders — they are not optional here. The seeders create the initial tenant, admin user, roles, and permissions. Without them you cannot log in.
php artisan migrate --seed
php artisan storage:link
php artisan serve or a Valet/Herd site) and log in at /admin (or whatever the panel path is) with the seeded credentials — check database/seeders/ for the exact email/password the kit uses; do not assume [email protected] unless you have confirmed it.Where to look first, in order:
| File/Dir | Why |
|---|---|
app/Providers/Filament/*PanelProvider.php |
The heart of the kit — panel registration, tenancy config, middleware, navigation groups, plugins. Read this before anything else. |
config/permission.php (if Sushi/Spatie is used) |
Role/permission storage and cache config. |
app/Models/Tenant.php (or Member.php/Team.php) |
Understand the tenancy model and how users pivot into tenants. |
database/seeders/ |
Reveals the expected initial state (roles, permissions, admin user, sample tenant). |
app/Filament/Resources/ |
The actual CRUD surfaces — Role, Permission, Exception, and any tenant-scoped resources. |
First realistic use case: get a working multi-tenant login where an admin can create a second tenant, assign a user to it, and confirm the user only sees that tenant's records. Once that loop works, you have validated the three pillars (tenancy, roles, exceptions) simultaneously.
Tenancy is wired through the Panel, not through your models ad hoc. In the PanelProvider you will find something like:
->tenant(Team::class)
->tenantMiddleware([
\Filament\Middleware\TenantMiddleware::class, // plus custom tenancy resolver
], isPersistent: true)
Day-to-day, this means:
Every Eloquent model that is tenant-scoped must resolve tenancy consistently. Use a global scope or Filament's tenant scoping. Do not rely on developers remembering ->where('team_id', ...) in every query — add a trait or override getEloquentQuery() in resources.
Adding a tenant-scoped resource is the most common daily task:
php artisan make:filament-resource Invoice --tenant
Then verify the generated resource respects the tenant relationship and that policies allow the right roles.
Roles and permissions are almost certainly Spatie + Filament Shield (or a hand-rolled equivalent). The pattern is:
view_any_invoice, create_invoice, etc.).php artisan shield:generate) or write them manually.team_id on model_has_roles.If the kit uses per-tenant roles, you must include the tenant in the role lookup context; otherwise a user's role in Tenant A leaks into Tenant B.
Exceptions: a ExceptionsResource reads from Laravel's failed_jobs table or a custom exceptions table. The daily pattern is to treat it as a read-only observability surface — do not build write workflows on it. Filter by date, user, tenant; use it as your first stop when a tenant reports a 500.
Workflow for extending the kit:
team_id).--tenant.php artisan permission:cache-reset (or shield:generate --all).Integration tip: keep a SuperAdmin (or panel_user) role that bypasses tenancy (often via canAccessTenant() returning true). Filament resolves this through ->tenant(..., isScoped: true) or via a custom canAccessPanel — confirm which the kit uses before granting roles.
filament/filament and spatie/laravel-permission in composer.json and treat upgrades as deliberate migrations, not composer update runs.php artisan permission:cache-reset — schedule this or clear in a deploy hook. Permission changes that "don't take effect" are almost always cache.auth but before permission, you get 403 instead of 404 for cross-tenant access (or vice versa). Document the intended order in the PanelProvider and don't reorder casually.request payloads or session data. In production, either gate the resource behind a super-admin-only ability or redact before storage. A shared exception dashboard across tenants is a data-leak risk.storage:link and npm run build are the two steps that break "it works locally but not in staging." Include both in your deploy pipeline; the kit's package.json may target Vite 5, which does not match a stale CI image.php artisan tinker: check auth()->user()->getTenants() (or ->teams) and Filament::getTenant() while impersonating a real user in the target tenant. Impersonation plugins (if present) are the fastest way to reproduce tenant bugs.TenantScoped trait (query scoping), and the seeder files (role/permission schema). Everything else is meant to be edited in place — do not try to package it.Bottom line: this kit gives you a legitimate head start on Filament multi-tenancy and RBAC, but it is a 2024 snapshot with a small maintainer footprint. Budget a half-day to audit version compatibility and the tenancy/permission cache behavior before putting it on a real multi-tenant workload, and write the tenancy-scoping conventions down the moment you fork it.
How can I help you explore Laravel packages today?