ngiraud / laravel-starter
An opinionated starter to launch after creating a fresh Laravel application
Fund package maintenance!
Nicolas Giraud
Requires
- php: ^8.4
- illuminate/contracts: ^12.0
- laravel/prompts: ^0.3.6
- spatie/laravel-package-tools: ^1.16
Requires (Dev)
- larastan/larastan: ^2.9||^3.0
- laravel/pint: ^1.14
- laravel/sail: ^1.44
- nunomaduro/collision: ^8.1.1||^7.10.0
- orchestra/testbench: ^10.0.0||^9.0.0||^8.22.0
- phpstan/extension-installer: ^1.3
- phpstan/phpstan-deprecation-rules: ^1.1||^2.0
- phpstan/phpstan-phpunit: ^1.3||^2.0
- rector/rector: ^2.1
README
This package automates the complete setup of a fresh Laravel application by installing and configuring the packages and tools you commonly use in your projects, with full Git management throughout the process.
It configures Docker Compose with Laravel Sail, installs your preferred packages (Telescope, Horizon, Filament, etc.), sets up Composer scripts for development, publishes configuration files and stubs, configures your environment according to your preferences (locale, database, services), and automatically creates semantic Git commits for each step.
Installation
Install the package in your fresh Laravel application:
composer require ngiraud/laravel-starter
Usage
After creating a new Laravel application with a starter kit, simply run:
php artisan starter:install
The command will guide you interactively through the complete setup process:
🔧 Environment Configuration
- Application settings: name, locale (fr/en), database configuration
- Docker services: MySQL, Redis, MinIO, Mailpit, Selenium, and more
- Git repository: automatic initialization and semantic commits throughout
📦 Package Management
- Install Composer packages: Laravel Telescope, Horizon, Filament, Larastan, Rector, etc.
- Frontend dependencies: automatic npm install via Sail
- Service dependencies: automatic installation (e.g., AWS S3 for MinIO)
🛠️ Development Environment
- Composer scripts:
composer dev
,composer test
,composer lint
,composer refactor
- Configuration files: Pint, PHPStan, Rector configurations
- GitHub Actions: CI/CD workflows with proper service dependencies
- Code quality: automatic Rector and Pint formatting at the end
📁 Project Structure
- Custom stubs: AppServiceProvider, User model, TestCase
- Route management: web-local.php for local development
- Language files: French translations if selected
- Action command:
php artisan make:action
for creating Action classes
📋 Available Packages
The installer offers these carefully selected packages:
- 🔭 Laravel Telescope - Debugging and monitoring dashboard
- ⏱️ Laravel Horizon - Redis queue management and monitoring
- 🎛️ Filament - Modern admin panel framework
- 🔍 Larastan - Static analysis with PHPStan for Laravel
- 🔄 Rector - Automated code refactoring and modernization
- 💾 Laravel Backup - Database and file backup automation
- ⚡ Paratest - Parallel test execution for faster testing
- 👀 Laravel Nightwatch - Application monitoring and alerting
⚡ Development Scripts
The installer automatically adds these convenient Composer scripts:
composer dev # Start all development services (logs, vite, queue) composer dev:ssr # Version with Inertia SSR support composer test # Run tests with coverage reporting composer lint # Code formatting with Laravel Pint composer refactor # Automated refactoring with Rector
🚀 Installation Process
The package follows a comprehensive workflow:
- Prerequisites check - Ensures Laravel Sail is installed
- User preferences - Interactive prompts for services and packages
- Git initialization - Sets up repository with initial commit
- Environment setup - Updates .env and .env.example files
- Sail installation - Configures Docker services
- Package installation - Installs selected Composer packages with individual commits
- File publishing - Publishes stubs, configurations, and GitHub Actions
- Database migration - Sets up initial database schema
- Code optimization - Applies Rector and Pint formatting rules
- Completion - Provides next steps for development
Testing
composer test
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.