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

2.0.0 2025-10-17 20:11 UTC

README

Edit Profile

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status PHPStan Analysis Total Downloads

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

Profile

๐Ÿ‘ค User Profile

Profile

๐Ÿ‘ฅ Team (Optional)

Profile

๐Ÿ”‘ API Tokens (Optional)

Profile

๐ŸŒ 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

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.