nunomaduro/laravel-starter-kit-inertia-react

The skeleton application for the Laravel framework.

Installs: 108

Dependents: 0

Suggesters: 0

Security: 0

Stars: 85

Watchers: 4

Forks: 16

Open Issues: 1

Language:TypeScript

Type:project

pkg:composer/nunomaduro/laravel-starter-kit-inertia-react

v1.0.2 2025-10-13 01:41 UTC

This package is auto-updated.

Last update: 2025-10-13 01:43:24 UTC


README

Overview Laravel Starter Kit

Build Status Total Downloads Latest Stable Version License

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.

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.4+.

Create your type-safe Laravel application using Composer:

composer create-project nunomaduro/laravel-starter-kit-inertia-react --prefer-dist example-app

Initial Setup

Navigate to your project and complete the setup:

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:

npm install playwright
npx playwright install

Verify Installation

Run the test suite to ensure everything is configured correctly:

composer test

You should see 100% test coverage and all quality checks passing.

Available Tooling

Development

  • composer dev - Starts Laravel server, queue worker, log monitoring, and Vite dev server concurrently

Code Quality

  • composer lint - Runs Rector (refactoring), Pint (PHP formatting), and Prettier (JS/TS formatting)
  • composer test:lint - Dry-run mode for CI/CD pipelines

Testing

  • composer test:type-coverage - Ensures 100% type coverage with Pest
  • composer test:types - Runs PHPStan at level 9 (maximum strictness)
  • composer test:unit - Runs Pest tests with 100% code coverage requirement
  • composer test - Runs the complete test suite (type coverage, unit tests, linting, static analysis)

Maintenance

  • composer update:requirements - Updates all PHP and NPM dependencies to latest versions

License

Laravel Starter Kit Inertia React was created by Nuno Maduro under the MIT license.