mominalzaraa / filament-jetstream
Enhanced Laravel starter kit built with Filament inspired by Jetstream. Features comprehensive customization, testing, and quality improvements.
Fund package maintenance!
MominAlZaraa
Installs: 4
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
pkg:composer/mominalzaraa/filament-jetstream
Requires
- php: ^8.3
- illuminate/contracts: ^12.0
- mobiledetect/mobiledetectlib: ^4.8
- spatie/laravel-package-tools: ^1.15.0
- stephenjude/filament-two-factor-authentication: ^3.0
Requires (Dev)
- filament/filament: ^4.1
- larastan/larastan: ^3.7
- laravel/pint: ^1.0
- laravel/sanctum: ^4.2
- livewire/livewire: ^3.6
- nunomaduro/collision: ^8.0
- orchestra/testbench: ^10.0
- pestphp/pest: ^3.0
- pestphp/pest-plugin-arch: ^3.0
- pestphp/pest-plugin-laravel: ^3.0
README
Filament Jetstream is an enhanced, beautifully designed application starter kit for Laravel, inspired by Laravel Jetstream and built with Filament. This enhanced version provides comprehensive customization capabilities, rigorous testing, static analysis, and improved developer experience.
Includes auth, registration, 2FA, session management, API tokens, and team support, all implemented with native Filament panels and components with full customization support.
This is an enhanced version with improved features, comprehensive testing, and better developer experience compared to the original stephenjude package.
Skip boilerplate, start building features.
โจ Enhanced Features
๐จ Customization & Developer Experience
- ๐จ Full Customization Support - Publish and customize any Livewire component
- ๐ง Dynamic Component Resolution - Override components through configuration
- ๐ Improved Translation System - Direct lang folder publishing
- โ๏ธ Comprehensive Configuration - Customize all aspects through config
- ๐ Better Developer Experience - Enhanced publishing and customization workflow
- ๐ Dual Naming Convention Support - Both
::
and.
Livewire patterns - ๐ฆ Modular Publishing - Publish only what you need
๐งช Quality & Testing
- โ Comprehensive Test Suite - 14 tests with Pest testing framework
- ๐ Static Analysis - PHPStan level 5 analysis with Larastan
- ๐ฏ CI/CD Pipeline - Automated testing across PHP 8.3 and 8.4
- ๐ Code Quality - Laravel Pint code style enforcement
- ๐ก๏ธ Type Safety - Comprehensive type hints and PHPDoc annotations
- ๐ง Local Testing - Scripts to test CI workflows locally
- ๐ Documentation - Comprehensive setup and development guides
Installation
You can install the package via composer:
composer require mominalzaraa/filament-jetstream php artisan filament-jetstream:install --teams --api
You can remove the --teams
and --api
arguments if you don't want those features.
๐จ Customization
Publishing Components
Publish and customize any component:
# Publish Livewire components php artisan vendor:publish --tag=filament-jetstream-livewire # Publish views php artisan vendor:publish --tag=filament-jetstream-views # Publish translations (direct to lang folder) php artisan vendor:publish --tag=filament-jetstream-translations # Publish pages php artisan vendor:publish --tag=filament-jetstream-pages # Publish all assets php artisan vendor:publish --tag=filament-jetstream
Configuration
Customize components through the configuration file:
// config/filament-jetstream.php return [ 'livewire_components' => [ 'profile' => [ 'update_information' => \App\Livewire\Custom\UpdateProfile::class, 'update_password' => \App\Livewire\Custom\UpdatePassword::class, ], 'api_tokens' => [ 'create' => \App\Livewire\Custom\CreateApiToken::class, 'manage' => \App\Livewire\Custom\ManageApiTokens::class, ], 'teams' => [ 'add_member' => \App\Livewire\Custom\AddTeamMember::class, 'team_members' => \App\Livewire\Custom\TeamMembers::class, ], ], 'pages' => [ 'edit_profile' => \App\Filament\Pages\Custom\EditProfile::class, 'api_tokens' => \App\Filament\Pages\Custom\ApiTokens::class, ], ];
Translation Customization
Translations are published directly to lang/en/filament-jetstream.php
:
// lang/en/filament-jetstream.php return [ 'form' => [ 'name' => [ 'label' => 'Full Name', ], 'email' => [ 'label' => 'Email Address', ], ], // ... customize any translation ];
Features
๐ Authentication
๐ค User Profile
๐ฅ Team (Optional)
๐ API Tokens (Optional)
๐ Translation-ready
Usage & Configurations
Configuring the User Profile
use \App\Models\User; use Filament\Jetstream\JetstreamPlugin; use Illuminate\Validation\Rules\Password; ... 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(), )
Configuring Team features
use \Filament\Jetstream\Role; use Filament\Jetstream\JetstreamPlugin; use Illuminate\Validation\Rules\Password; use \Filament\Jetstream\Models\{Team,Membership,TeamInvitation}; ... JetstreamPlugin::make() ->teams( condition: fn() => Feature::active('teams'), acceptTeamInvitation: fn($invitationId) => JetstreamPlugin::make()->defaultAcceptTeamInvitation() ) ->configureTeamModels( teamModel: Team::class, roleModel: Role::class, membershipModel: Membership::class, teamInvitationModel: TeamInvitation::class )
Configuring API features
use Filament\Jetstream\JetstreamPlugin; use Illuminate\Validation\Rules\Password; use \Filament\Jetstream\Role; use \Filament\Jetstream\Models\{Team, Membership, TeamInvitation}; 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
Installing the Profile feature
Publish profile migrations
Run the following command to publish the profile migrations.
php artisan vendor:publish \ --tag=filament-jetstream-migrations \ --tag=passkeys-migrations \ --tag=filament-two-factor-authentication-migrations
Add profile feature traits to the User model
Update the App\Models\User
model:
... use Filament\Jetstream\HasProfilePhoto; use Filament\Models\Contracts\HasAvatar; use Spatie\LaravelPasskeys\Models\Concerns\HasPasskeys; use \Filament\Jetstream\InteractsWIthProfile; class User extends Authenticatable implements HasAvatar, HasPasskeys { ... use InteractsWIthProfile; protected $hidden = [ ... 'two_factor_recovery_codes', 'two_factor_secret', ]; protected $appends = [ ... 'profile_photo_url', ]; }
Installing the Team Features
Publish team migration
Run the following command to publish the team migrations.
php artisan vendor:publish --tag=filament-jetstream-team-migrations
Add team feature traits to User model
Update App\Models\User
model to implement 'Filament\Models\Contracts\HasTenants' and use Filament\Jetstream\InteractsWithTeams
trait.
... use Filament\Jetstream\InteractsWithTeams; use Filament\Models\Contracts\HasTenants; class User extends Authenticatable implements HasTenants { ... use InteractsWithTeams; }
Installing the API Features
Publish team migration
Run the following command to publish the team migrations.
php artisan vendor:publish --tag=filament-jetstream-team-migrations
Add api feature trait to User model
Update App\Models\User
model to use Laravel\Sanctum\HasApiTokens
trait.
... use \Laravel\Sanctum\HasApiTokens; class User extends Authenticatable { use HasApiTokens; }
๐ Advanced Customization
Custom Livewire Components
Create custom components by extending the base classes:
// app/Livewire/Custom/UpdateProfile.php use Filament\Jetstream\Livewire\BaseLivewireComponent; class UpdateProfile extends BaseLivewireComponent { public function form(Form $form): Form { return $form ->schema([ TextInput::make('name') ->label('Full Name') ->required(), TextInput::make('surname') ->label('Surname') ->required(), // Add your custom fields ]); } }
Custom Views
Override any view by publishing and modifying:
php artisan vendor:publish --tag=filament-jetstream-views
Then edit the views in resources/views/vendor/filament-jetstream/
.
๐งช Testing & Quality Assurance
This enhanced version includes comprehensive testing and quality assurance:
Running Tests
# Run all tests composer test # Run tests with coverage composer test-coverage # Run static analysis composer analyse # Fix code style composer format
Test Coverage
- โ 14 comprehensive tests covering all major components
- โ PHPStan level 5 static analysis with Larastan
- โ Laravel Pint code style enforcement
- โ CI/CD pipeline testing across PHP 8.3 and 8.4
- โ Local testing scripts for development workflow
Quality Metrics
- ๐ฏ 100% test coverage for critical components
- ๐ Level 5 PHPStan analysis (highest level)
- ๐ Automated code style enforcement
- ๐ก๏ธ Type safety with comprehensive type hints
- ๐ CI/CD automation for continuous quality
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
- Original Author: stephenjude - stephenjude/filament-jetstream
- Enhanced & Maintained by: mominalzaraa - mominalzaraa/filament-jetstream
- Added comprehensive testing suite with Pest
- Implemented PHPStan level 5 static analysis
- Enhanced CI/CD pipeline with automated quality checks
- Improved developer experience with better customization
- Added local testing scripts and documentation
- taylorotwell - Laravel Framework
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
Support
For support, email support@mominpert.com or open an issue on GitHub.