abitbt/laravel-starter

Laravel 12 starter kit with Fortify auth and Bootstrap 5 Tabler UI.

Installs: 4

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 0

Open Issues: 0

Language:Blade

Type:project

pkg:composer/abitbt/laravel-starter

dev-master 2025-10-07 04:13 UTC

This package is auto-updated.

Last update: 2025-10-07 04:13:41 UTC


README

Laravel 12 starter kit with Fortify authentication and a Bootstrap 5 Tabler UIβ€”preconfigured for rapid development, testing, and deployment.

Features

  • πŸš€ Laravel 12 - Latest Laravel framework with modern structure
  • πŸ” Authentication - Complete auth system via Laravel Fortify
    • Login/Register
    • Password Reset
    • Two-Factor Authentication (2FA)
    • Profile Management
  • 🎨 Tabler UI - Beautiful admin-style interface
  • ⚑ Alpine.js - Lightweight JavaScript framework
  • πŸ§ͺ Pest v4 - Modern testing framework
  • πŸ› οΈ Laravel Boost - Enhanced development CLI tools
  • πŸ’… Code Formatting - Pint (PHP) + Prettier (Blade/JS/CSS)
  • πŸŒ“ Theme Switcher - Light/Dark/Auto modes
  • πŸ“¦ Vite - Fast, modern asset bundling

Requirements

  • PHP 8.2 or higher
  • Composer
  • Node.js & npm
  • SQLite (default) or MySQL/PostgreSQL

Installation

Option 1: Using Laravel Installer

laravel new your-project --using=abitbt/laravel-starter
cd your-project

Option 2: Manual Installation

# Clone the repository
git clone https://github.com/abitbt/laravel-starter.git your-project
cd your-project

# Install dependencies
composer install
npm install

# Set up environment
cp .env.example .env
php artisan key:generate

# Create database (SQLite)
touch database/database.sqlite

# Run migrations
php artisan migrate

# Create storage symlink (for public file access)
php artisan storage:link

# Build assets
npm run build

Quick Start

Development Environment

Start all development services at once:

composer run dev

This starts:

Individual Services

Or run services individually:

php artisan serve          # Start server
npm run dev               # Start Vite dev server
php artisan queue:listen  # Start queue worker
php artisan pail          # View logs

Usage

Creating Your First Feature

# Generate model, migration, and factory
php artisan make:model Product -mf --no-interaction

# Generate controller
php artisan make:controller ProductController --resource --no-interaction

# Generate form requests
php artisan make:request StoreProductRequest --no-interaction
php artisan make:request UpdateProductRequest --no-interaction

# Generate tests
php artisan make:test ProductTest --pest --no-interaction

# Run migrations
php artisan migrate

# Run tests
vendor/bin/pest --filter=ProductTest

Code Formatting

# Format PHP code
vendor/bin/pint

# Format Blade/JS/CSS
npm run format

# Check formatting without changes
vendor/bin/pint --test
npm run format:check

Testing

# Run all tests
vendor/bin/pest

# Run specific test file
vendor/bin/pest --filter=ProductTest

# Run tests with coverage
vendor/bin/pest --coverage

Project Structure

β”œβ”€β”€ app/
β”‚   β”œβ”€β”€ Actions/Fortify/      # Authentication actions
β”‚   β”œβ”€β”€ Http/Controllers/     # Application controllers
β”‚   β”œβ”€β”€ Models/               # Eloquent models
β”‚   └── Providers/            # Service providers
β”œβ”€β”€ bootstrap/
β”‚   β”œβ”€β”€ app.php              # Application bootstrap
β”‚   └── providers.php        # Service provider registration
β”œβ”€β”€ config/                  # Configuration files
β”œβ”€β”€ database/
β”‚   β”œβ”€β”€ migrations/          # Database migrations
β”‚   β”œβ”€β”€ factories/           # Model factories
β”‚   └── seeders/             # Database seeders
β”œβ”€β”€ resources/
β”‚   β”œβ”€β”€ css/                 # Stylesheets
β”‚   β”œβ”€β”€ js/                  # JavaScript files
β”‚   └── views/               # Blade templates
β”‚       β”œβ”€β”€ auth/            # Authentication views
β”‚       β”œβ”€β”€ layouts/         # Layout templates
β”‚       └── profile/         # Profile management
β”œβ”€β”€ routes/
β”‚   └── web.php             # Web routes
└── tests/
    β”œβ”€β”€ Feature/            # Feature tests
    └── Unit/               # Unit tests

Default Credentials

After running migrations, you can register a new account or create a user via Tinker:

php artisan tinker

User::factory()->create([
    'name' => 'Admin User',
    'email' => 'admin@example.com',
    'password' => bcrypt('password')
]);

Laravel Boost Tools

This project includes Laravel Boost for enhanced development:

search-docs ['query']        # Search Laravel ecosystem docs
list-artisan-commands        # List available artisan commands
database-query "SQL"         # Run database queries
tinker                       # Interactive REPL
browser-logs                 # View frontend errors
get-absolute-url             # Get shareable project URL

Documentation

Additional Guides

For AI coding agents, see .github/instructions/ directory.

Configuration

Switching to MySQL/PostgreSQL

  1. Update .env:
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=your_database
DB_USERNAME=your_username
DB_PASSWORD=your_password
  1. Run migrations:
php artisan migrate:fresh

Email Configuration

Update .env with your mail settings:

MAIL_MAILER=smtp
MAIL_HOST=smtp.mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=your_username
MAIL_PASSWORD=your_password
MAIL_FROM_ADDRESS="noreply@example.com"
MAIL_FROM_NAME="${APP_NAME}"

Queue Configuration

For production, use database or Redis:

QUEUE_CONNECTION=database  # or redis

Run the queue worker:

php artisan queue:work --tries=3

Deployment

For complete deployment instructions, see DEPLOYMENT.md.

Quick Production Checklist

# 1. Set environment to production
APP_ENV=production
APP_DEBUG=false

# 2. Install dependencies
composer install --optimize-autoloader --no-dev
npm ci
npm run build

# 3. Optimize framework
php artisan config:cache
php artisan route:cache
php artisan view:cache
php artisan event:cache

# 4. Run migrations
php artisan migrate --force

# 5. Create storage link
php artisan storage:link

# 6. Set up queue worker (supervisor)
# 7. Configure web server (Nginx/Apache)
# 8. Set up SSL certificate (Let's Encrypt)

Security

  • All routes are protected with CSRF tokens
  • Passwords are hashed using bcrypt
  • Two-factor authentication available
  • Rate limiting on authentication routes (5 attempts/minute)
  • SQL injection prevention via Eloquent ORM
  • XSS protection via Blade auto-escaping

If you discover a security vulnerability, please email security@abitbt.com. See SECURITY.md for details.

Testing

This project uses Pest v4 for testing. Tests are located in tests/ directory:

# Run all tests
vendor/bin/pest

# Run with coverage
vendor/bin/pest --coverage

# Run specific test suite
vendor/bin/pest tests/Feature
vendor/bin/pest tests/Unit

Contributing

Contributions are welcome! Please see CONTRIBUTING.md for detailed guidelines.

Quick steps:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Follow existing code conventions
  4. Write tests for new features
  5. Format code (vendor/bin/pint and npm run format)
  6. Commit changes (git commit -m 'Add amazing feature')
  7. Push to branch (git push origin feature/amazing-feature)
  8. Open a Pull Request

Changelog

See CHANGELOG.md for recent changes.

Credits

License

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

Made with ❀️ by aBit-Soft