Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Jetstream Laravel Package

laravel/jetstream

Laravel Jetstream is a starter kit for Laravel 11.x and earlier, providing a ready-made application foundation with common auth and account features. For newer starter kits, see https://laravel.com/starter-kits.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture Fit

Laravel Jetstream is a highly modular, opinionated starter kit designed for Laravel applications requiring authentication, user profiles, teams (optional), and API support. It leverages:

  • Livewire (for server-side interactivity) + Inertia.js (for SPA-like frontend) with Tailwind CSS for styling.
  • Laravel Breeze as its foundation, but with additional features like two-factor authentication (2FA), profile management, and team collaboration.
  • Database migrations, factories, and seeders for rapid setup.
  • API-first design with Laravel Sanctum for API token authentication.

Fit for:

  • SaaS platforms requiring user/team management.
  • Internal tools with role-based access.
  • Applications needing modern auth flows (passwordless, 2FA, social logins).
  • Projects where developer velocity is prioritized over customization.

Misalignment:

  • Non-Laravel stacks (Symfony, Django, etc.).
  • Highly customized auth flows (e.g., OAuth2-only, custom workflows).
  • Legacy Laravel (<8.x) or non-Tailwind projects.

Integration Feasibility

Factor Feasibility Notes
Laravel Version High Supports Laravel 11.x, 12.x, 13.x (v5.x). Check compatibility matrix.
PHP Version High PHP 8.4+ (v5.x). PHP 8.5+ recommended for future-proofing.
Frontend Stack Medium-High Inertia.js + Vue 3 (default). Livewire fallback. Requires Vite/NPM.
Database High MySQL, PostgreSQL, SQLite (standard Laravel support).
Existing Auth System Low-Medium Overwrites Laravel’s default auth scaffolding. Backup critical files.
API Requirements High Sanctum included by default (optional during install).
Team Features High Optional but tightly integrated (teams, invitations, roles).

Key Integration Steps:

  1. Installation:
    composer require laravel/jetstream
    php artisan jetstream:install livewire --teams  # or inertia
    php artisan migrate
    
  2. Publish Assets:
    npm install && npm run dev
    php artisan vendor:publish --tag=jetstream-assets
    
  3. Route/Middleware Setup:
    • Jetstream auto-registers routes (auth, profile, teams).
    • Adds auth middleware to web group.

Potential Conflicts:

  • Custom auth controllers/models: Jetstream replaces AuthController, RegisterController, etc.
  • Third-party auth packages: May conflict with Jetstream’s middleware/policies.
  • Legacy Blade templates: Jetstream uses Inertia/Livewire components; direct Blade overrides may break.

Technical Risk

Risk Area Severity Mitigation
Version Skew High Test with Laravel 13.x + PHP 8.5 to avoid compatibility gaps.
Frontend Build Issues Medium Ensure Node.js 20.x, Vite 5.x, and NPM/Yarn are compatible.
Database Migrations Medium Backup existing users, password_resets, and custom auth tables.
Livewire/Inertia Learning Curve Medium Allocate time for team upskilling on Livewire properties/events or Inertia page props.
Team Feature Bloat Low-Medium Disable teams via --no-teams if unused (reduces ~30% of Jetstream code).
API Security Medium Audit Sanctum’s HasApiTokens trait for custom token logic.
Customization Limits Medium Jetstream’s blade stubs and Livewire components are extensible but not always pluggable.

Critical Questions for TPM:

  1. Does the project require teams/collaboration? (If not, --no-teams reduces complexity.)
  2. Is Inertia.js/Livewire acceptable, or is a pure Blade approach needed?
  3. Are there existing auth flows (e.g., OAuth2, CAS) that conflict with Jetstream?
  4. What’s the PHP/Laravel upgrade path? (Jetstream v5.x is tied to Laravel 11+.)
  5. Who will maintain Jetstream updates? (MIT license = community-driven; Laravel team may deprecate it in favor of newer starter kits.)
  6. Are there performance concerns? (Livewire/Inertia adds ~10-20% overhead vs. pure Blade.)

Integration Approach

Stack Fit

Jetstream is optimized for the following stack:

  • Backend: Laravel 11.x–13.x, PHP 8.4+, MySQL/PostgreSQL.
  • Frontend:
    • Primary: Inertia.js (Vue 3) + Vite + Tailwind CSS.
    • Fallback: Livewire (PHP-based reactivity).
  • Auth: Sanctum (API), Laravel’s default session auth.
  • Tooling: NPM/Yarn, Pest (testing), Laravel Mix/Vite.

Non-Fit Stacks:

  • Symfony/Django: Incompatible.
  • Legacy Laravel (<8.x): Use Jetstream v4.x or migrate.
  • Non-Tailwind CSS: Requires manual styling overrides.
  • Custom auth backends: Jetstream’s User model is tightly coupled.

Migration Path

Option 1: Greenfield Project (Recommended)

  1. Scaffold New Project:
    composer create-project laravel/laravel my-app
    cd my-app
    composer require laravel/jetstream
    php artisan jetstream:install inertia --teams  # or livewire
    
  2. Configure:
    • Update .env (app URL, mail settings).
    • Run php artisan migrate.
  3. Build Frontend:
    npm install && npm run dev
    
  4. Customize:
    • Extend Livewire/Inertia components (e.g., app/Http/Livewire/Profile/UpdateProfileInformation.php).
    • Override Blade stubs in resources/views/vendor/jetstream/.

Option 2: Incremental Migration (Existing Laravel App)

  1. Backup:
    • app/Http/Controllers/Auth/, app/Models/User.php, and database migrations.
  2. Install Jetstream:
    composer require laravel/jetstream
    php artisan jetstream:install livewire --teams
    
  3. Merge Auth Logic:
    • Replace AuthController, RegisterController with Jetstream’s (or extend them).
    • Update User model to extend Jetstream\User.
  4. Database:
    • Run php artisan migrate (Jetstream adds teams, team_user, etc.).
    • Seed existing users via User::factory()->create().
  5. Frontend:
    • Copy existing Blade templates to resources/views/vendor/jetstream/ for overrides.
    • Migrate to Inertia/Livewire incrementally.

Option 3: Hybrid Approach (Partial Adoption)

  • Use Jetstream only for auth and build other features separately.
  • Example:
    // app/Providers/AuthServiceProvider.php
    public function boot()
    {
        $this->registerPolicies();
        Jetstream::boot(); // Load Jetstream auth
        // Custom policies here
    }
    

Compatibility

Component Compatibility Notes
Laravel 13.x ✅ Full Tested in v5.5.0+.
PHP 8.5 ✅ Full PHP 8.4+ supported; 8.5+ recommended.
Inertia.js 2.x ✅ Full Default in v5.x.
Livewire 3.x ✅ Full Fallback for non-Inertia setups.
Tailwind CSS 3.x ✅ Full Required for styling.
Sanctum API ✅ Full Optional during install.
Teams Feature ✅ Full Optional but tightly integrated.
2FA (Recovery Codes) ✅ Full Uses Laravel’s TwoFactorAuthenticatable.
Custom User Model ⚠️ Partial Ext
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
nexmo/api-specification
capell-app/block-library
axium/identity
cetria/laravel-dummy-models
cetria/reflection-helper
agropredict/sso-auth-bundle
evolvestudio/spam-protection
datacore/hub-sdk
develia/commons
cuci/prototurk-sdk
cuci/prototurk-sdk-symfony
develia/geo-bundle
dreamzy/livewire-charts
touchestate-sdk/php-sdk
ecotone/kafka
22h/doctrine-garbage-collection-bundle
agtp/agtp-php
agtp/mod-php
splash/sonata-admin
splash/metadata