fkrzski / project-skeleton-laravel-react
The skeleton application for the Laravel framework.
Fund package maintenance!
fkrzski
Installs: 0
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
Language:TypeScript
Type:project
pkg:composer/fkrzski/project-skeleton-laravel-react
Requires
- php: ^8.5
- inertiajs/inertia-laravel: ^2.0.11
- laravel/fortify: ^1.32.1
- laravel/framework: ^12.41.1
- laravel/tinker: ^2.10.2
- laravel/wayfinder: ^0.1.12
- nunomaduro/essentials: ^1.0.1
Requires (Dev)
- barryvdh/laravel-ide-helper: ^3.6
- driftingly/rector-laravel: ^2.1.6
- fakerphp/faker: ^1.24.1
- larastan/larastan: ^3.8.0
- laravel/boost: ^1.8.4
- laravel/pail: ^1.2.4
- laravel/pint: ^1.26.0
- laravel/sail: ^1.50
- mockery/mockery: ^1.6.12
- msamgan/laravel-env-keys-checker: ^1.9
- nunomaduro/collision: ^8.8.3
- pestphp/pest: ^4.1.6
- pestphp/pest-plugin-browser: ^4.1.1
- pestphp/pest-plugin-laravel: ^4.0.0
- pestphp/pest-plugin-profanity: ^4.2
- pestphp/pest-plugin-type-coverage: ^4.0.3
- rector/rector: ^2.2.11
- roave/security-advisories: dev-latest
This package is auto-updated.
Last update: 2025-12-08 18:31:22 UTC
README
Laravel Starter Kit (Inertia & React) is an ultra-strict, type-safe Laravel skeleton engineered for developers who refuse to compromise on code quality. This opinionated starter kit enforces rigorous development standards through meticulous tooling configuration and architectural decisions that prioritize type safety, immutability, and fail-fast principles.
Includes Laravel Sail for seamless Docker-based development environment, ensuring consistency across all development machines.
Why This Starter Kit?
Modern PHP has evolved into a mature, type-safe language, yet many Laravel projects still operate with loose conventions and optional typing. This starter kit changes that paradigm by enforcing:
- Fully Actions-Oriented Architecture: Every operation is encapsulated in a single-action class
- Cruddy by Design: Standardized CRUD operations for all controllers, actions, and Inertia & React pages
- 100% Type Coverage: Every method, property, and parameter is explicitly typed
- Zero Tolerance for Code Smells: Rector, PHPStan, ESLint, and Prettier at maximum strictness catch issues before they become bugs
- Immutable-First Architecture: Data structures favor immutability to prevent unexpected mutations
- Fail-Fast Philosophy: Errors are caught at compile-time, not runtime
- Automated Code Quality: Pre-configured tools ensure consistent, pristine code across your entire team
- Just Better Laravel Defaults: Thanks to Essentials / strict models, auto eager loading, immutable dates, and more...
- AI Guidelines: Integrated AI Guidelines to assist in maintaining code quality and consistency
- Full Testing Suite: More than 150 tests with 100% code coverage using Pest
This isn't just another Laravel boilerplate—it's a statement that PHP applications can and should be built with the same rigor as strongly-typed languages like Rust or TypeScript.
Getting Started
Requires PHP 8.5+ and a code coverage driver like pcov for local development, OR Docker for Sail-based development.
Create your type-safe Laravel application using Composer:
composer create-project fkrzski/project-skeleton-laravel-react --prefer-dist example-app
Initial Setup with Laravel Sail (Recommended)
Navigate to your project and start using Docker containers:
cd example-app # Install dependencies (if not already installed) composer install # Start Sail containers ./vendor/bin/sail up -d # Run setup inside the container ./vendor/bin/sail composer setup # Your application is now running at http://localhost
Pro tip: Create a shell alias for Sail:
alias sail='./vendor/bin/sail'
Then you can use sail instead of ./vendor/bin/sail:
sail up -d sail composer setup sail artisan migrate
Initial Setup (Local Development)
Alternatively, you can run the project locally without Docker:
cd example-app # Setup the project composer setup # Start the development server composer dev
Optional: Browser Testing Setup
If you plan to use Pest's browser testing capabilities:
# Local npm install playwright npx playwright install # With Sail ./vendor/bin/sail npm install playwright ./vendor/bin/sail npx playwright install
Verify Installation
Run the test suite to ensure everything is configured correctly:
# Local composer test # With Sail ./vendor/bin/sail composer test
You should see 100% test coverage and all quality checks passing.
Available Tooling
Note: All commands below can be prefixed with
./vendor/bin/sailwhen using Laravel Sail (e.g.,./vendor/bin/sail composer test)
Setup & Development
composer setup- Complete project setup (install dependencies, generate key, run migrations, build assets)composer dev- Starts Laravel server, queue worker, log monitoring, and Vite dev server concurrently
Code Quality
composer pint- Runs Laravel Pint (PHP code formatter) on modified filescomposer analyse- Runs PHPStan static analysiscomposer refactor- Runs Rector for automated refactoringcomposer lint- Runs all formatters: Rector, Pint, and Prettier (JS/TS/CSS)
Testing - Unit & Coverage
composer test:unit- Runs Pest tests in parallel with code coveragecomposer test:unit:mutation- Runs mutation testing with minimum 100% scorecomposer test:type-coverage- Ensures 100% type coverage with Pestcomposer test:profanity- Checks for profanity in test names
Testing - Static Analysis
composer test:env- Validates required environment variablescomposer test:syntax- Checks PHP syntax in all filescomposer test:types- Runs PHPStan and TypeScript type checkingcomposer test:lint- Dry-run mode for linters (CI/CD pipelines)composer test:pint- Pint in test mode (doesn't modify files)composer test:refactor- Rector in dry-run mode
Testing - Complete Suite
composer test- Runs the complete test suite:- Environment validation
- Profanity check
- Syntax validation
- All linters (dry-run)
- Type checking (PHPStan + TypeScript)
- Type coverage (100% minimum)
- Unit tests (parallel with coverage)
- Mutation testing (100% minimum)
Maintenance
composer update:requirements- Updates all PHP and NPM dependencies to latest versions
License
Laravel Starter Kit Inertia React was created by Filip Krzyżanowski under the MIT license.