piconepaolo / laravel-react-untitledui-starter-kit
The skeleton application for the Laravel framework.
Installs: 4
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
Language:TypeScript
Type:project
pkg:composer/piconepaolo/laravel-react-untitledui-starter-kit
Requires
- php: ^8.2
- inertiajs/inertia-laravel: ^2.0
- laravel/fortify: ^1.30
- laravel/framework: ^12.0
- laravel/tinker: ^2.10.1
- laravel/wayfinder: ^0.1.9
- nunomaduro/essentials: *
Requires (Dev)
- driftingly/rector-laravel: ^2.1
- fakerphp/faker: ^1.23
- larastan/larastan: ^3.0
- laravel/pail: ^1.2.2
- laravel/pint: ^1.24
- laravel/sail: ^1.41
- mockery/mockery: ^1.6
- nunomaduro/collision: ^8.6
- phpstan/phpstan: ^2.1
- phpunit/phpunit: ^11.5.3
This package is auto-updated.
Last update: 2026-02-23 20:02:15 UTC
README
Introduction
Our React starter kit provides a robust, modern starting point for building Laravel applications with a React frontend using Inertia.
Inertia allows you to build modern, single-page React applications using classic server-side routing and controllers. This lets you enjoy the frontend power of React combined with the incredible backend productivity of Laravel and lightning-fast Vite compilation.
This React starter kit utilizes React 19, TypeScript, Tailwind CSS 4, and Untitled UI components.
Getting Started
composer install npm install cp .env.example .env php artisan key:generate php artisan migrate
To start the development server:
composer run dev
This concurrently starts the Laravel server, queue worker, log viewer (Pail), and Vite dev server.
Composer Packages
nunomaduro/essentials github
Provides better defaults for your Laravel applications.
What it does:
- Strict Models
- Auto Eager Loading
- Optional Unguarded Models
- Immutable Dates
- Force HTTPS
- Safe Console
- Asset Prefetching
- Prevent Stray Requests
- Fake Sleep
laravel/pint github
Laravel Pint is an opinionated PHP code style fixer for minimalists.
Code style fixer configured with pint.json file.
rector-laravel github
Rector instantly upgrades and refactors the PHP code of your application.
rector-laravel uses Rector and adds extra rules for Laravel. It automates upgrading your code to the latest version of PHP and Laravel and does auto-refactoring based on the rules in rector.php.
phpstan and larastan github
Larastan focuses on finding errors in your code. It catches whole classes of bugs even before you write tests for the code.
Configured with phpstan.neon. This project uses level 6.
Testing
This project uses PHPUnit for testing.
composer test # Run full test suite (lint + tests) php artisan test --compact # Run tests only
Git Hooks (Pre-commit & Pre-push)
This project uses Husky to automate code quality checks before commits and pushes. These hooks ensure consistent code quality across the team.
Pre-commit Hook
Runs automatically before every commit using lint-staged. Only staged files are checked:
For JavaScript/TypeScript files (resources/**/*.{ts,tsx,js,jsx}):
- Prettier: Auto-formats code
- ESLint: Lints and auto-fixes issues
For TypeScript files (resources/**/*.{ts,tsx}):
- TypeScript: Type-checks without emitting files
For PHP files ({app,bootstrap,config,database,routes,tests}/**/*.php):
- Pint: Auto-formats code according to Laravel standards
For PHP application files (excluding tests):
- PHPStan (Level 6): Static analysis to catch bugs
If any check fails, the commit will be blocked. Fix the issues and try again.
Pre-push Hook
Runs automatically before every push:
-
Test Suite (
composer test): Runs all tests- If tests fail, the push is blocked
-
Rector Analysis (
vendor/bin/rector process --dry-run): Checks for potential refactoring improvements- If Rector suggests changes, you'll be prompted to continue or abort
- Run
vendor/bin/rector processto apply suggestions automatically
Working with Git Hooks
Bypassing Hooks (Not Recommended)
If you absolutely need to bypass hooks:
git commit --no-verify -m "your message"
git push --no-verify
Note: Only bypass hooks if you understand the consequences. Your code may not meet quality standards.
Running Checks Manually
# Run lint-staged manually npm run precommit # Run individual checks npm run format # Format frontend code npm run lint # Lint frontend code npm run types # Check TypeScript types vendor/bin/pint # Format PHP code vendor/bin/phpstan analyse # Run PHPStan analysis # Run test suite composer test # Run Rector vendor/bin/rector process --dry-run # Check suggestions vendor/bin/rector process # Apply suggestions
Setting Up Hooks (First Time)
Hooks are automatically installed when you run npm install (via the prepare script). If they're not working:
npm run prepare # Reinstalls Husky hooks
Configuration Files
| File | Purpose |
|---|---|
.husky/pre-commit |
Pre-commit hook script |
.husky/pre-push |
Pre-push hook script |
.lintstagedrc.json |
Lint-staged configuration |
pint.json |
Pint (PHP formatter) rules |
phpstan.neon |
PHPStan static analysis config |
rector.php |
Rector refactoring rules |
eslint.config.js |
ESLint configuration |
.prettierrc |
Prettier configuration |
tsconfig.json |
TypeScript configuration |
License
The Laravel + React starter kit is open-sourced software licensed under the MIT license.