mominalzaraa/filament-team-guard

Filament Team Guard — enhanced Laravel starter kit built with Filament. Team management, auth, 2FA, passkeys, API tokens. Inspired by Laravel Jetstream.

Fund package maintenance!
MominAlZaraa

Installs: 1

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 0

Open Issues: 0

pkg:composer/mominalzaraa/filament-team-guard

v2.0.0 2026-01-30 13:08 UTC

This package is auto-updated.

Last update: 2026-01-30 13:20:20 UTC


README

Latest Version on Packagist Total Downloads GitHub Tests Code Style License PHP Version Sponsor

Filament Team Guard Banner

Requirements: PHP ^8.3 | ^8.4 | ^8.5 · Laravel ^12.0 · Filament ^5.0 (Livewire ^4.0, Tailwind ^4.0)

Enhanced Laravel starter kit built with Filament, inspired by Laravel Jetstream (discontinued). Brings team features, mature data handling, and Filament UI—auth, registration, 2FA, passkeys, session management, API tokens, teams. Skip boilerplate, start building.

Supported: PHP ^8.3–^8.5, Filament ^5.0, Laravel ^12.0, Livewire ^4.0, Tailwind ^4.0 · Deprecated: PHP <8.3, Filament v4 (use v1.x), Laravel <12.

Installation

composer require mominalzaraa/filament-team-guard
php artisan filament-team-guard:install --teams --api

Omit --teams / --api if not needed. Action classes and email templates are published for customization.

Features

  • Auth — Login, register, password reset, email verification
  • Profile — Photo, info, password, sessions, delete account
  • 2FA & passkeys — Embedded TOTP, recovery codes, Spatie Laravel Passkeys. Enable via ->twoFactorAuthentication().
  • Cloudflare Turnstile — Optional ->turnstile() on auth + 2FA challenge/recovery. njoguamos/laravel-turnstile; set TURNSTILE_* in .env, run php artisan turnstile:install.
  • Teams — Create, invite, roles, member management (add/remove/update role)
  • API tokens — Optional Sanctum-style tokens
  • i18n — Publishable locale-first language files

Enhanced vs stephenjude/filament-jetstream

  • Publishable Action classes (Jetstream pattern): UpdateUserProfileInformation, InviteTeamMember, AddTeamMember, RemoveTeamMember, UpdateTeamMemberRole, CreateTeam, UpdateTeamName, DeleteTeam, ValidateTeamDeletion, DeleteUser — all with contracts.
  • Email invitations — Registered/unregistered flow; “Create Account” when needed; session-based redirects; no auto-registration.
  • Profile fields — Override getFieldComponents(), getSectionHeading(), getSectionDescription() in published Action; add translations in lang/{locale}/filament-team-guard.php.
  • Team management — Custom Role rule, UpdateTeamMemberRole, RemoveTeamMember, ValidateTeamDeletion.
  • Publishable — Actions, emails, lang; locale-first translations with merge/override.

Customization

What Command
Action classes php artisan vendor:publish --tag=filament-team-guard-actions
Language files php artisan vendor:publish --tag=filament-team-guard-lang
Email templates php artisan vendor:publish --tag=filament-team-guard-email-templates

Profile field example: Publish actions + lang → add key in lang/en/filament-team-guard.php → in UpdateUserProfileInformation override getFieldComponents() and add a TextInput::make('surname') (and translation) → add surname to User $fillable.

Configuration (snippets)

Profile (2FA, passkeys, photo, etc.)

JetstreamPlugin::make()
    ->configureUserModel(userModel: User::class)
    ->profilePhoto(condition: fn() => true, disk: 'public')
    ->deleteAccount(condition: fn() => true)
    ->updatePassword(condition: fn() => true, Password::default())
    ->profileInformation(condition: fn() => true)
    ->logoutBrowserSessions(condition: fn() => true)
    ->twoFactorAuthentication(
        condition: fn() => auth()->check(),
        forced: fn() => app()->isProduction(),
        enablePasskey: fn() => Feature::active('passkey'),
        requiresPassword: fn() => app()->isProduction(),
    );

Teams

JetstreamPlugin::make()
    ->teams(condition: fn() => Feature::active('teams'), acceptTeamInvitation: fn($id) => JetstreamPlugin::make()->defaultAcceptTeamInvitation())
    ->configureTeamModels(teamModel: Team::class, roleModel: Role::class, membershipModel: Membership::class, teamInvitationModel: TeamInvitation::class);

API tokens

JetstreamPlugin::make()->apiTokens(condition: fn() => Feature::active('api'), permissions: fn() => ['create','read','update','delete'], menuItemLabel: fn() => 'API Tokens', menuItemIcon: fn() => 'heroicon-o-key');

Existing Laravel projects

  • Profile: php artisan vendor:publish --tag=filament-team-guard-migrations --tag=passkeys-migrations → add InteractsWithProfile, HasProfilePhoto, implement HasAvatar & HasPasskeys on User; hide 2FA fields; append profile_photo_url.
  • Teams: php artisan vendor:publish --tag=filament-team-guard-team-migration → add InteractsWithTeams, implement HasTenants on User.
  • API: Same team migration tag → add HasApiTokens on User.

Package development

Run composer install in the package root for tests. vendor/ is in .gitignore and not distributed; composer require mominalzaraa/filament-team-guard in an app only pulls package source—the app’s Composer resolves Filament once (no duplication). .gitattributes has /vendor export-ignore.

Testing · Changelog · Contributing

Credits

License: MIT. See LICENSE.md.