Laravel Jetstream – Scaffolding for Laravel apps

Laravel Jetstream is an application scaffolding system for Laravel that provides a more robust starting point for modern web applications compared to Laravel Breeze. While Breeze is minimalistic, Jetstream offers additional features like team management, API tokens, and two-factor authentication. It’s a great starting point if you’re building complex applications with more advanced requirements.

Key Features of Laravel Jetstream:

  1. Authentication: Provides registration, login, password reset, email verification, and session management functionality.
  2. Two-Factor Authentication (2FA): Supports two-factor authentication for increased security using services like Google Authenticator.
  3. Team Management: Includes team-based functionality, allowing users to manage multiple teams, team invitations, and switching between teams.
  4. Profile Management: Includes user profile and password management features.
  5. API Tokens: Provides API token management using Laravel Sanctum for building APIs with personal access tokens.
  6. Email Verification: Built-in email verification with routes and controllers.
  7. Frontend Options: Offers either Inertia.js (with Vue.js or React) or Livewire (with Blade templates) for frontend interactivity.
  8. Session Management: Users can manage and logout active sessions across multiple devices.

Installation

To install Laravel Jetstream, follow these steps:

  1. Install Laravel: If you haven’t already installed Laravel, create a new project:
     

  2. Require Laravel Jetstream: Navigate to your project directory and install Jetstream:
  3. Install Jetstream: Run the installation command, choosing either Livewire or Inertia.js (with Vue.js or React). Here’s how to install Jetstream with each:
    • For Livewire:
    • For Inertia.js with Vue.js:
    • For Inertia.js with React: You can manually add React after installing Inertia.js.
  4. Optional: Install Teams Feature: If you want to enable the team management feature, include the --teams flag:
    • For Livewire with teams:
    • For Inertia.js with teams:
  5. Run Migrations: Jetstream includes migrations for authentication, teams, and API tokens. Run them using:
  6. Install NPM Dependencies: Install the necessary frontend dependencies and compile them:
  7. Serve the Application: Finally, start your Laravel development server:

Additional Features:

  • Two-Factor Authentication: Jetstream comes with two-factor authentication, which you can enable via the user profile screen.
  • Teams: If you’ve enabled the team feature, users can create and manage teams, invite members, and assign roles.
  • API Tokens: With Laravel Sanctum, Jetstream allows users to generate API tokens for external applications or mobile apps.

Jetstream vs Breeze:

  • Breeze: A simpler and more lightweight starter kit for projects that don’t need advanced features.
  • Jetstream: Offers more comprehensive functionality, ideal for larger, more feature-rich applications with things like team support, API tokens, and two-factor authentication.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top