artflow-studio/starterkit

Complete Laravel authentication and admin starter kit with 18 layouts, Bootstrap 5.3.8, dark mode, and full Fortify integration with auto-registered services

Installs: 6

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 0

Open Issues: 0

Language:SCSS

pkg:composer/artflow-studio/starterkit

0.1.3 2025-11-26 09:13 UTC

This package is auto-updated.

Last update: 2025-11-26 11:56:35 UTC


README

Latest Version Laravel Fortify Bootstrap PHP License

Complete Laravel Authentication & Admin Starter Kit with Advanced Fortify Integration

14 Beautiful Auth Layouts | 5 Admin Layouts | Zero Build Required | Bootstrap 5.3.8 | Dark Mode | 20 Fortify Response Contracts | Role-Based Redirects | Complete Fortify Integration | Spatie Permission Support

A professional Laravel package with 14 authentication layouts, 5 admin dashboard layouts, Bootstrap 5.3.8, native dark mode, and complete Laravel Fortify integration including all 20 response contracts. Pre-built assets mean zero npm/build step required after installation!

โœจ Key Features

  • ๐ŸŽจ 19 Total Layouts - 14 authentication + 5 admin professionally designed layouts
  • ๐ŸŒ™ Dark Mode - Native Bootstrap dark mode with smooth transitions
  • ๐Ÿ“ฑ Fully Responsive - Mobile-first design, works on all devices
  • ๐Ÿš€ Bootstrap 5.3.8 - Latest Bootstrap with custom form controls
  • โšก Pre-Built Assets - No npm/build step required for installation!
  • ๐Ÿ” Complete Fortify Integration - All 20 response contracts implemented
  • ๐Ÿ›ก๏ธ Role-Based Redirects - Built-in Spatie Laravel Permission support
  • ๐ŸŽญ Animated Effects - Particles, gradients, and smooth transitions (pure CSS)
  • ๐ŸŽ›๏ธ Customizable - Easy to modify colors, layouts, and components
  • ๐Ÿ“š Complete Documentation - Comprehensive docs and guides included
  • ๐Ÿงน Clean Installation - Minimal setup, optional customizations available
  • โœ… AuthService - Centralized authentication logic with hooks
  • โœ… 20 Response Contracts - All Fortify responses fully implemented
  • โœ… One-Command Installation - php artisan starterkit:install does everything

๐Ÿ†• What's New in v0.3

Complete Fortify Response Contract Coverage

The package now implements all 20 Fortify response contracts, giving you total control over every authentication response:

โœ… All Response Contracts Implemented

Authentication Responses (4)

  • LoginResponse - Role-based redirects via AuthService
  • RegisterResponse - Post-registration routing via AuthService
  • LogoutResponse - Logout handling
  • TwoFactorLoginResponse - 2FA completion redirects

Password Management (7)

  • PasswordResetResponse - After password reset
  • PasswordUpdateResponse - After password change
  • PasswordConfirmedResponse - Password confirmation success
  • SuccessfulPasswordResetLinkRequestResponse - Reset link sent
  • FailedPasswordResetLinkRequestResponse - Reset link failed
  • FailedPasswordResetResponse - Reset failed
  • FailedPasswordConfirmationResponse - Wrong password

Profile Management (1)

  • ProfileInformationUpdatedResponse - Profile updated

Two-Factor Authentication (5)

  • TwoFactorEnabledResponse - 2FA enabled
  • TwoFactorDisabledResponse - 2FA disabled
  • TwoFactorConfirmedResponse - 2FA confirmed
  • RecoveryCodesGeneratedResponse - Recovery codes generated
  • FailedTwoFactorLoginResponse - Invalid 2FA code

Email Verification (2)

  • VerifyEmailResponse - Email verified
  • EmailVerificationNotificationSentResponse - Verification email sent

Rate Limiting (1)

  • LockoutResponse - Too many login attempts

Advanced AuthService with Role-Based Redirects

// Automatic Spatie Laravel Permission detection
AuthService::redirectAfterLogin($user)
    โ†“
    Checks roles:
    - admin? โ†’ /admin/dashboard
    - moderator? โ†’ /moderator/dashboard
    - manager? โ†’ /manager/dashboard
    - else โ†’ /dashboard

Package File Structure

All authentication logic is now properly organized in the package:

vendor/artflow-studio/starterkit/src/
โ”œโ”€โ”€ Http/
โ”‚   โ”œโ”€โ”€ Responses/                    โœ… 20 Fortify response implementations
โ”‚   โ”‚   โ”œโ”€โ”€ LoginResponse.php
โ”‚   โ”‚   โ”œโ”€โ”€ RegisterResponse.php
โ”‚   โ”‚   โ”œโ”€โ”€ LogoutResponse.php
โ”‚   โ”‚   โ”œโ”€โ”€ TwoFactorLoginResponse.php
โ”‚   โ”‚   โ”œโ”€โ”€ PasswordResetResponse.php
โ”‚   โ”‚   โ”œโ”€โ”€ VerifyEmailResponse.php
โ”‚   โ”‚   โ””โ”€โ”€ ... (14 more)
โ”‚   โ””โ”€โ”€ Middleware/
โ”‚       โ””โ”€โ”€ CustomAuthMiddleware.php
โ”œโ”€โ”€ Services/
โ”‚   โ””โ”€โ”€ AuthService.php              โœ… Role-based auth logic
โ”œโ”€โ”€ Providers/
โ”‚   โ””โ”€โ”€ StarterKitFortifyServiceProvider.php  โœ… Binds all 20 responses
โ””โ”€โ”€ Console/
    โ””โ”€โ”€ InstallCommand.php           โœ… Enhanced with --publish-auth-service

Important: These files are in the package only, not in your application. The install command optionally publishes AuthService to app/Services/ for customization.

๐Ÿ“ฆ Installation

Quick Start (3 Steps)

# 1. Install via Composer
composer require artflow-studio/starterkit

# 2. Run installation command
php artisan starterkit:install

# 3. Start the server
php artisan serve

Then visit:

Installation Options

# Basic installation (default)
php artisan starterkit:install

# Choose auth layout during installation
php artisan starterkit:install --layout=glass

# Publish AuthService to app/Services for customization
php artisan starterkit:install --publish-auth-service

# Force overwrite existing files
php artisan starterkit:install --force

# Combine options
php artisan starterkit:install --publish-auth-service --force

What Gets Installed

The install command automatically:

  1. โœ… Checks and installs Laravel Fortify (if needed)
  2. โœ… Publishes 14 auth layouts
  3. โœ… Publishes 5 admin layouts
  4. โœ… Publishes pre-built CSS/JS assets (no npm build needed!)
  5. โœ… Publishes configuration (config/starterkit.php)
  6. โœ… Registers custom Fortify responses (20 contracts)
  7. โœ… Sets up layout test routes (/test/layouts)
  8. โœ… Updates .env with STARTERKIT_AUTH_LAYOUT and STARTERKIT_ADMIN_LAYOUT
  9. โœ… Optionally publishes AuthService to app/Services/ for customization

Database Setup

# Run Laravel migrations
php artisan migrate

This creates the users table and related tables needed for authentication.

๐ŸŽจ Available Layouts

Authentication Layouts (13 Options)

Layout Best For Features
particles Modern feel Animated particles, connecting lines
centered Classic login Simple centered form
split Brand showcase Side-by-side layout
glass Contemporary Glassmorphism effect
hero Marketing Large hero section
modern Professional Contemporary design
3d Creative 3D effects
premium-dark Luxury Dark theme
gradient-flow Dynamic Animated gradients
minimal Clean Ultra-simple
clean Business Professional design
hero-grid Modern Grid-based
sidebar Navigation Sidebar style

Admin Layouts (5 Options)

Layout Best For Features
sidebar Dashboards Collapsible sidebar
topnav Web apps Horizontal navigation
minimal Analytics Content-focused
neo Modern Glassmorphic design
classic Enterprise Traditional design

Preview Layouts

# After installation, visit in browser:
http://localhost:8000/test/layouts

๐Ÿ” Authentication Flow

How Fortify Integration Works

The package includes complete Fortify integration that's automatically registered:

User Action
    โ†“
Fortify Guard โ†’ CustomAuthMiddleware
    โ†“
Fortify Action (CreateNewUser, etc.)
    โ†“
AuthService Hook (business logic)
    โ†“
AuthenticationListener (events)
    โ†“
CustomAuthRedirectController (routing)
    โ†“
View Rendered with Layout

Extending Authentication

Override AuthService methods for custom logic:

// In app/Services/AuthService.php (published with install command)

public static function redirectAfterLogin($user)
{
    if ($user->isAdmin()) {
        return redirect('/admin/dashboard');
    }
    
    if (!$user->email_verified_at) {
        return redirect('/email/verify');
    }
    
    return redirect('/dashboard');
}

๐ŸŒ™ Dark Mode

All layouts support native Bootstrap dark mode:

<!-- Light theme (default) -->
<html data-bs-theme="light">

<!-- Dark theme -->
<html data-bs-theme="dark">

JavaScript to toggle:

function toggleTheme() {
    const html = document.documentElement;
    const current = html.getAttribute('data-bs-theme') || 'light';
    const next = current === 'dark' ? 'light' : 'dark';
    
    html.setAttribute('data-bs-theme', next);
    localStorage.setItem('theme', next);
}

// Load saved theme
window.addEventListener('load', () => {
    const saved = localStorage.getItem('theme');
    if (saved) {
        document.documentElement.setAttribute('data-bs-theme', saved);
    }
});

๐Ÿ” Fortify Response Contracts

All 20 Response Contracts Implemented

The package implements all Fortify response contracts for complete control over authentication responses:

Location

vendor/artflow-studio/starterkit/src/Http/Responses/

Complete Contract List

โœ… LoginResponse                                 - Login success
โœ… RegisterResponse                              - Registration success
โœ… LogoutResponse                                - Logout
โœ… TwoFactorLoginResponse                        - 2FA login success
โœ… PasswordResetResponse                         - Password reset success
โœ… PasswordUpdateResponse                        - Password update
โœ… PasswordConfirmedResponse                     - Password confirmation
โœ… ProfileInformationUpdatedResponse             - Profile update
โœ… VerifyEmailResponse                           - Email verification
โœ… TwoFactorEnabledResponse                      - 2FA enabled
โœ… TwoFactorDisabledResponse                     - 2FA disabled
โœ… TwoFactorConfirmedResponse                    - 2FA confirmed
โœ… RecoveryCodesGeneratedResponse                - Recovery codes generated
โœ… SuccessfulPasswordResetLinkRequestResponse    - Reset link sent
โœ… FailedPasswordResetLinkRequestResponse        - Reset link failed
โœ… FailedPasswordResetResponse                   - Reset failed
โœ… FailedPasswordConfirmationResponse            - Confirmation failed
โœ… FailedTwoFactorLoginResponse                  - 2FA failed
โœ… EmailVerificationNotificationSentResponse     - Verification email sent
โœ… LockoutResponse                               - Rate limiting lockout

Automatic Binding

All responses are automatically bound in StarterKitFortifyServiceProvider:

// vendor/artflow-studio/starterkit/src/Providers/StarterKitFortifyServiceProvider.php

public function register(): void
{
    // All 20 response contracts are bound here
    $this->app->singleton(LoginResponse::class, StarterKitLoginResponse::class);
    $this->app->singleton(RegisterResponse::class, StarterKitRegisterResponse::class);
    // ... + 18 more
}

๐Ÿง  AuthService - Role-Based Authentication

Location

vendor/artflow-studio/starterkit/src/Services/AuthService.php

Features

The AuthService provides centralized authentication logic:

// Role-based redirects (automatic Spatie support)
AuthService::redirectAfterLogin($user, $request)

// Post-registration routing
AuthService::redirectAfterRegister($user, $request)

// Password reset redirect
AuthService::redirectAfterPasswordReset($user)

// Pre-login validation
AuthService::beforeLogin($request)

// Post-login hooks
AuthService::afterLogin($user, $request)

// Post-registration hooks
AuthService::afterRegister($user, $request)

// Pre-logout validation
AuthService::beforeLogout($user)

// Post-logout hooks
AuthService::afterLogout($user)

// Check if 2FA required
AuthService::shouldRequireEmailVerification($user)

Built-In Spatie Laravel Permission Support

The AuthService automatically detects and uses Spatie roles:

public static function redirectAfterLogin(Model $user, ?Request $request = null): string
{
    // Check if Spatie is available
    if (method_exists($user, 'hasRole')) {
        // Admin users
        if ($user->hasRole('admin')) {
            return '/admin/dashboard';
        }
        
        // Moderators
        if ($user->hasRole('moderator')) {
            return '/moderator/dashboard';
        }
        
        // Managers
        if ($user->hasRole('manager')) {
            return '/manager/dashboard';
        }
    }
    
    // Default for all other users
    return '/dashboard';
}

Publishing AuthService

To customize the AuthService for your application:

php artisan starterkit:install --publish-auth-service

This creates:

  • app/Services/AuthService.php - Your customizable copy
  • Namespace: App\Services
  • Instructions for updating response imports

After Publishing

Update these response files to use your published App\Services\AuthService:

  1. vendor/artflow-studio/starterkit/src/Http/Responses/LoginResponse.php
  2. vendor/artflow-studio/starterkit/src/Http/Responses/RegisterResponse.php
  3. vendor/artflow-studio/starterkit/src/Http/Responses/TwoFactorLoginResponse.php

Change import from:

use ArtflowStudio\StarterKit\Services\AuthService;

To:

use App\Services\AuthService;

Custom Example

// app/Services/AuthService.php

namespace App\Services;

use ArtflowStudio\StarterKit\Services\AuthService as BaseAuthService;
use Illuminate\Database\Eloquent\Model;

class AuthService extends BaseAuthService
{
    public static function redirectAfterLogin(Model $user, $request = null): string
    {
        // Premium users
        if ($user->subscription_status === 'premium') {
            return '/premium/dashboard';
        }
        
        // Fall back to base logic (Spatie roles, etc.)
        return parent::redirectAfterLogin($user, $request);
    }
}

โš™๏ธ Configuration

Default Configuration

Edit config/starterkit.php:

return [
    'layouts' => [
        'auth' => env('STARTERKIT_AUTH_LAYOUT', 'particles'),
        'admin' => env('STARTERKIT_ADMIN_LAYOUT', 'sidebar'),
    ],

    'dark_mode' => [
        'enabled' => true,
        'default' => 'light',
    ],

    'assets' => [
        'auth' => [
            'css' => 'vendor/artflow-studio/starterkit/assets/auth.css',
            'js' => 'vendor/artflow-studio/starterkit/assets/auth.js',
        ],
        'admin' => [
            'css' => 'vendor/artflow-studio/starterkit/assets/admin.css',
            'js' => 'vendor/artflow-studio/starterkit/assets/admin.js',
        ],
    ],
];

Environment Variables

STARTERKIT_AUTH_LAYOUT=glass              # Default auth layout
STARTERKIT_ADMIN_LAYOUT=topnav            # Default admin layout
STARTERKIT_DARK_MODE_ENABLED=true         # Dark mode available
STARTERKIT_DARK_MODE_DEFAULT=light        # Default theme

โš™๏ธ Configuration

Default Configuration

Edit config/starterkit.php:

return [
    'layouts' => [
        'auth' => env('STARTERKIT_AUTH_LAYOUT', 'particles'),
        'admin' => env('STARTERKIT_ADMIN_LAYOUT', 'sidebar'),
    ],

    'dark_mode' => [
        'enabled' => true,
        'default' => 'light',
    ],

    'assets' => [
        'auth' => [
            'css' => 'vendor/artflow-studio/starterkit/assets/auth.css',
            'js' => 'vendor/artflow-studio/starterkit/assets/auth.js',
        ],
        'admin' => [
            'css' => 'vendor/artflow-studio/starterkit/assets/admin.css',
            'js' => 'vendor/artflow-studio/starterkit/assets/admin.js',
        ],
    ],
];

Environment Variables

STARTERKIT_AUTH_LAYOUT=glass              # Default auth layout
STARTERKIT_ADMIN_LAYOUT=topnav            # Default admin layout
STARTERKIT_DARK_MODE_ENABLED=true         # Dark mode available
STARTERKIT_DARK_MODE_DEFAULT=light        # Default theme

๐Ÿ› ๏ธ Publishing Tags

Default Publishing (Automatic)

# These publish automatically with: php artisan starterkit:install

php artisan vendor:publish --tag=starterkit-auth-layouts    # Auth views (14 layouts)
php artisan vendor:publish --tag=starterkit-assets          # CSS/JS files
php artisan vendor:publish --tag=starterkit-config          # config/starterkit.php

Optional Publishing

# Admin layouts (not needed for basic auth)
php artisan vendor:publish --tag=starterkit-admin-layouts

# Database migrations
php artisan vendor:publish --tag=starterkit-migrations

# Documentation
php artisan vendor:publish --tag=starterkit-docs

# Fortify configuration (if you need to customize Fortify)
php artisan vendor:publish --tag=starterkit-fortify-config

๐ŸŽฏ Usage Examples

Use Authentication Layout

<!-- resources/views/auth/login.blade.php -->
@extends('starterkit::layouts.auth.login')

@section('content')
    <form method="POST" action="{{ route('login') }}">
        @csrf
        
        <div class="mb-3">
            <label for="email" class="form-label">Email</label>
            <input type="email" class="form-control" id="email" name="email" required>
        </div>

        <div class="mb-3">
            <label for="password" class="form-label">Password</label>
            <input type="password" class="form-control" id="password" name="password" required>
        </div>

        <button type="submit" class="btn btn-primary w-100">Sign In</button>
    </form>
@endsection

Use Admin Layout

<!-- resources/views/admin/dashboard.blade.php -->
@extends('starterkit::layouts.admin.sidebar')

@section('content')
    <div class="container-fluid">
        <h1>Admin Dashboard</h1>
        <!-- Your admin content -->
    </div>
@endsection

๐ŸŒ™ Dark Mode

All layouts support native Bootstrap dark mode:

<!-- Light theme (default) -->
<html data-bs-theme="light">

<!-- Dark theme -->
<html data-bs-theme="dark">

JavaScript to toggle:

function toggleTheme() {
    const html = document.documentElement;
    const current = html.getAttribute('data-bs-theme') || 'light';
    const next = current === 'dark' ? 'light' : 'dark';
    
    html.setAttribute('data-bs-theme', next);
    localStorage.setItem('theme', next);
}

// Load saved theme
window.addEventListener('load', () => {
    const saved = localStorage.getItem('theme');
    if (saved) {
        document.documentElement.setAttribute('data-bs-theme', saved);
    }
});

๐ŸŽจ Available Layouts

Authentication Layouts (14 Options)

Layout Best For Features
particles Modern feel Animated particles, connecting lines
centered Classic login Simple centered form
split Brand showcase Side-by-side layout
glass Contemporary Glassmorphism effect
hero Marketing Large hero section
modern Professional Contemporary design
3d Creative 3D effects
premium-dark Luxury Dark theme
gradient-flow Dynamic Animated gradients
minimal Clean Ultra-simple
clean Business Professional design
hero-grid Modern Grid-based
sidebar Navigation Sidebar style
base Minimal HTML Base layout

Admin Layouts (5 Options)

Layout Best For Features
sidebar Dashboards Collapsible sidebar
topnav Web apps Horizontal navigation
minimal Analytics Content-focused
neo Modern Glassmorphic design
classic Enterprise Traditional design

Preview Layouts

# After installation, visit in browser:
http://localhost:8000/test/layouts

๐Ÿงช Testing Authentication

Test Registration & Role-Based Redirect

# Start server
php artisan serve

# Visit registration page
http://localhost:8000/register

# Register a new user - should redirect to /dashboard

Test Role-Based Login

// Create test users with roles
php artisan tinker

use App\Models\User;
use Spatie\Permission\Models\Role;

// Create roles
Role::create(['name' => 'admin']);
Role::create(['name' => 'moderator']);

// Create admin user
$admin = User::factory()->create(['email' => 'admin@test.com']);
$admin->assignRole('admin');

// Create moderator user
$mod = User::factory()->create(['email' => 'mod@test.com']);
$mod->assignRole('moderator');

Then login:

  • admin@test.com โ†’ redirects to /admin/dashboard
  • mod@test.com โ†’ redirects to /moderator/dashboard
  • Other users โ†’ redirects to /dashboard

โ“ FAQ

Q: Do I need npm/build step?

A: No! All assets are pre-compiled. Just run php artisan starterkit:install.

Q: Can I customize the AuthService?

A: Yes! Run php artisan starterkit:install --publish-auth-service to get your own editable copy.

Q: How do I use with Spatie roles?

A: AuthService automatically detects Spatie Laravel Permission. Just assign roles to users and the redirects work automatically.

Q: Can I change layouts dynamically?

A: Yes! Update STARTERKIT_AUTH_LAYOUT in .env and refresh.

Q: What if I don't use roles?

A: All users redirect to /dashboard by default. You can customize in AuthService.

Q: Are the responses extensible?

A: Yes! All responses are in vendor/artflow-studio/starterkit/src/Http/Responses/. Each one can be customized.

๐Ÿšจ Troubleshooting

Issue: Still redirecting to /home

Solution:

php artisan config:clear
php artisan cache:clear  
php artisan route:clear

Issue: Role redirects not working

Checklist:

  1. Is Spatie installed? composer show spatie/laravel-permission
  2. Did you run migrations? php artisan migrate
  3. Does user have role? User::find(1)->getRoleNames()
  4. Do routes exist? php artisan route:list --path=admin

Issue: "Class not found" errors

Solution:

composer dump-autoload
php artisan clear-compiled
php artisan config:clear
php artisan cache:clear

Issue: Response not binding

Verify binding:

php artisan tinker --execute="dd(app(Laravel\Fortify\Contracts\LoginResponse::class));"

Should output: ArtflowStudio\StarterKit\Http\Responses\LoginResponse

๐Ÿ“š Additional Resources

๐Ÿ“ Summary

Feature Status Details
Fortify Response Contracts โœ… 20/20 All contracts implemented
Role-Based Redirects โœ… Built-in Spatie automatic detection
AuthService โœ… Available In package, publishable
Auth Layouts โœ… 14 layouts Ready to use
Admin Layouts โœ… 5 layouts Pre-built
Dark Mode โœ… Native Bootstrap native
Pre-Built Assets โœ… Yes No npm/build needed
One-Command Install โœ… Yes Fully automated

๐Ÿ“„ License

This package is open-sourced software licensed under the MIT license.

๐Ÿค Contributing

Contributions are welcome! Please feel free to submit pull requests.

๐Ÿ“ง Support

For issues, questions, or suggestions, please open an issue on GitHub or contact the maintainers.

<!-- resources/views/dashboard.blade.php -->
@extends('starterkit::layouts.admin.sidebar')

@section('title', 'Dashboard')

@section('content')
    <div class="container-fluid">
        <h1>Welcome to Dashboard</h1>
        <!-- Your content here -->
    </div>
@endsection

Custom Middleware

// routes/web.php
Route::middleware(['custom-auth'])->group(function () {
    Route::get('/dashboard', [DashboardController::class, 'index'])->name('dashboard');
    Route::get('/admin', [AdminController::class, 'index'])->name('admin');
});

Handle Auth Events

// app/Providers/EventServiceProvider.php
protected $listen = [
    \Illuminate\Auth\Events\Login::class => [
        \App\Listeners\AuthenticationListener::class,
    ],
    \Illuminate\Auth\Events\Registered::class => [
        \App\Listeners\AuthenticationListener::class,
    ],
    \Illuminate\Auth\Events\Logout::class => [
        \App\Listeners\AuthenticationListener::class,
    ],
];

๐Ÿ“‚ Package Structure

package/
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ Console/
โ”‚   โ”‚   โ”œโ”€โ”€ InstallCommand.php              # Main installation
โ”‚   โ”‚   โ””โ”€โ”€ PublishCommand.php              # Publishing helper
โ”‚   โ”‚
โ”‚   โ”œโ”€โ”€ Services/
โ”‚   โ”‚   โ””โ”€โ”€ AuthService.php                 # Auth logic & hooks
โ”‚   โ”‚
โ”‚   โ”œโ”€โ”€ Http/
โ”‚   โ”‚   โ”œโ”€โ”€ Controllers/Auth/
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ CustomAuthRedirectController.php  # Redirect logic
โ”‚   โ”‚   โ””โ”€โ”€ Middleware/
โ”‚   โ”‚       โ””โ”€โ”€ CustomAuthMiddleware.php    # Route protection
โ”‚   โ”‚
โ”‚   โ”œโ”€โ”€ Listeners/
โ”‚   โ”‚   โ””โ”€โ”€ AuthenticationListener.php      # Event listeners
โ”‚   โ”‚
โ”‚   โ”œโ”€โ”€ Actions/Fortify/
โ”‚   โ”‚   โ”œโ”€โ”€ CreateNewUser.php               # User creation
โ”‚   โ”‚   โ”œโ”€โ”€ CreateNewUserWithHooks.php      # User creation with hooks
โ”‚   โ”‚   โ”œโ”€โ”€ UpdateUserPassword.php          # Password updates
โ”‚   โ”‚   โ”œโ”€โ”€ UpdateUserProfileInformation.php # Profile updates
โ”‚   โ”‚   โ”œโ”€โ”€ ResetUserPassword.php           # Password resets
โ”‚   โ”‚   โ””โ”€โ”€ PasswordValidationRules.php     # Validation
โ”‚   โ”‚
โ”‚   โ”œโ”€โ”€ Providers/
โ”‚   โ”‚   โ”œโ”€โ”€ StarterKitServiceProvider.php   # Main provider
โ”‚   โ”‚   โ””โ”€โ”€ StarterKitFortifyServiceProvider.php # Fortify setup
โ”‚   โ”‚
โ”‚   โ””โ”€โ”€ StarterKitServiceProvider.php
โ”‚
โ”œโ”€โ”€ resources/
โ”‚   โ”œโ”€โ”€ views/layouts/starterkit/
โ”‚   โ”‚   โ”œโ”€โ”€ auth/                    # 13 authentication layouts
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ centered.blade.php
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ split.blade.php
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ glass.blade.php
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ particles.blade.php
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ hero.blade.php
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ modern.blade.php
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ 3d.blade.php
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ premium-dark.blade.php
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ gradient-flow.blade.php
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ minimal.blade.php
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ clean.blade.php
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ hero-grid.blade.php
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ sidebar.blade.php
โ”‚   โ”‚   โ”‚
โ”‚   โ”‚   โ””โ”€โ”€ admin/                   # 5 admin layouts
โ”‚   โ”‚       โ”œโ”€โ”€ sidebar.blade.php
โ”‚   โ”‚       โ”œโ”€โ”€ topnav.blade.php
โ”‚   โ”‚       โ”œโ”€โ”€ minimal.blade.php
โ”‚   โ”‚       โ”œโ”€โ”€ neo.blade.php
โ”‚   โ”‚       โ””โ”€โ”€ classic.blade.php
โ”‚   โ”‚
โ”‚   โ””โ”€โ”€ css/ (SCSS source for dev)
โ”‚
โ”œโ”€โ”€ public/vendor/artflow-studio/starterkit/
โ”‚   โ””โ”€โ”€ assets/                      # Pre-built production assets
โ”‚       โ”œโ”€โ”€ auth.css (257 KB)
โ”‚       โ”œโ”€โ”€ auth.js
โ”‚       โ”œโ”€โ”€ admin.css (235 KB)
โ”‚       โ””โ”€โ”€ admin.js
โ”‚
โ”œโ”€โ”€ config/
โ”‚   โ””โ”€โ”€ starterkit.php               # Configuration
โ”‚
โ”œโ”€โ”€ database/
โ”‚   โ””โ”€โ”€ migrations/                  # Database setup
โ”‚
โ”œโ”€โ”€ docs/
โ”‚   โ”œโ”€โ”€ START_HERE.md
โ”‚   โ”œโ”€โ”€ LAYOUTS_DOCUMENTATION.html
โ”‚   โ”œโ”€โ”€ DARK_MODE_GUIDE.md
โ”‚   โ”œโ”€โ”€ SCSS_COMPONENTS_GUIDE.md
โ”‚   โ””โ”€โ”€ FINAL_PROJECT_COMPLETION.md
โ”‚
โ”œโ”€โ”€ routes/
โ”‚   โ””โ”€โ”€ test-layouts.php             # Layout testing routes
โ”‚
โ”œโ”€โ”€ composer.json                    # Package metadata
โ””โ”€โ”€ README.md                        # This file

๐Ÿ“‹ All Available Commands

Installation

php artisan starterkit:install                    # Standard install
php artisan starterkit:install --layout=glass     # Custom layout
php artisan starterkit:install --force            # Overwrite existing

Publishing

# Auto-published by install command:
php artisan vendor:publish --tag=starterkit-auth-layouts
php artisan vendor:publish --tag=starterkit-assets
php artisan vendor:publish --tag=starterkit-config

# Optional (not published by default):
php artisan vendor:publish --tag=starterkit-admin-layouts
php artisan vendor:publish --tag=starterkit-migrations
php artisan vendor:publish --tag=starterkit-docs

๐Ÿงช Testing

Manual Layout Testing

php artisan serve
# Visit: http://localhost:8000/test/layouts

All 18 layouts are displayed with live switching options.

Unit Tests

php artisan test

๐Ÿ› Troubleshooting

Assets Not Loading

php artisan optimize:clear
php artisan starterkit:install --force
ls public/vendor/artflow-studio/starterkit/assets/

Layouts Not Showing

php artisan vendor:publish --tag=starterkit-auth-layouts
ls resources/views/vendor/starterkit/layouts/

Fortify Not Working

php artisan fortify:install
php artisan migrate
php artisan starterkit:install

Permission Issues

chmod -R 755 storage bootstrap/cache
php artisan starterkit:install --force

๐Ÿ”ง Requirements

  • PHP: 8.1+
  • Laravel: 11.x
  • Laravel Fortify: ^1.17
  • Bootstrap: 5.3.8
  • Composer: 2.x+

๐Ÿ“Š What's Included

โœ… Layouts (18 Total)

  • 13 authentication layouts (responsive, dark mode)
  • 5 admin dashboard layouts (responsive, dark mode)

โœ… Assets (Pre-built)

  • Auth CSS (257 KB) + JS (4 KB)
  • Admin CSS (235 KB) + JS (4 KB)
  • Bootstrap 5.3.8 integration
  • Zero build required!

โœ… Services

  • AuthService with complete hook system
  • CustomAuthMiddleware for route protection
  • AuthenticationListener for events
  • 6 Fortify actions with customization

โœ… Documentation

  • Interactive layout showcase
  • Quick start guide
  • Dark mode implementation guide
  • Complete Fortify integration docs
  • SCSS components reference

โœ… Database

  • User table migrations
  • Auth tables setup

๐Ÿš€ Development

Local Setup

git clone https://github.com/rahee554/Laravel-Starter-Kit.git
cd Laravel-Starter-Kit
composer install
npm install

cp .env.example .env
php artisan key:generate

php artisan migrate
php artisan serve
npm run dev

Build Commands

npm run build           # Production build
php artisan test        # Run tests
npm run test            # JS tests

๐Ÿ“„ License

MIT License - Free to use in your projects!

๐Ÿค Support

For help:

  1. Check docs/ directory
  2. Review LAYOUTS_DOCUMENTATION.html
  3. Visit /test/layouts route
  4. Check Laravel Fortify docs

๐Ÿ“Š Package Information

AF Laravel Starter Kit

Ready to build secure Laravel applications with beautiful layouts? ๐Ÿš€

Start with AF Laravel Starter Kit today!