AI-powered coding guidelines for Laravel + Inertia React + Tailwind CSS v4 + shadcn/ui
Install best-practice guidelines for modern Laravel stack via a simple Artisan command. Works seamlessly with AI coding assistants like Claude, Cursor, and GitHub Copilot.
- Inertia React v2 Forms - Modern
<Form>component anduseFormhook patterns - Tailwind CSS v4 Migration - CSS-first config, new utilities, deprecated class replacements
- shadcn/ui Integration - Proper error states, accessible form fields, button icon styling
- Wayfinder Support - Type-safe form actions with
.form()method - Interactive CLI - Select specific guidelines or install all at once
composer require initred/laravel-boost-guidelines --dev
php artisan boost:guidelines --allcomposer require initred/laravel-boost-guidelines --devThe package will be auto-discovered by Laravel.
If you want to contribute or test local changes, add the package as a path repository:
{
"repositories": [
{
"type": "path",
"url": "../laravel-boost-guidelines"
}
]
}Then install:
composer require initred/laravel-boost-guidelines:@dev --devAfter making changes to the package, update it:
composer update initred/laravel-boost-guidelines# Interactive mode - select which guidelines to install
php artisan boost:guidelines
# Install all guidelines
php artisan boost:guidelines --all
# Install specific category only
php artisan boost:guidelines --tailwindcss
php artisan boost:guidelines --inertia-react
# Install multiple categories
php artisan boost:guidelines --tailwindcss --inertia-react
# Force overwrite existing files
php artisan boost:guidelines --force
# Skip boost:update prompt after installation
php artisan boost:guidelines --all --no-update
# List available guidelines
php artisan boost:guidelines --listRun Laravel Boost's update command to apply the guidelines:
php artisan boost:updateAdd to your project's composer.json scripts to automatically install guidelines on composer update:
{
"scripts": {
"post-update-cmd": [
"@php artisan boost:guidelines --all --force --no-update",
"@php artisan boost:update --ansi"
]
}
}Inertia v2 form handling guidelines (upgrade from v1's router.post pattern):
| Feature | Description |
|---|---|
<Form> Component |
Declarative form handling with built-in state management (v2.1+) |
useForm Hook |
For projects not yet on v2.1 |
| shadcn/ui Integration | Field components with proper error states (data-invalid, aria-invalid) |
| shadcn/ui Button | Icon styling best practices (no unnecessary mr-* or size-* classes) |
| Wayfinder Support | Type-safe form actions with .form() method |
| React 19 & Compiler | useRef argument requirements, ref callback syntax, auto-memoization |
Laravel Wayfinder integration for type-safe routing:
| Feature | Description |
|---|---|
| Named Imports | Tree-shakable controller method imports |
| Route Objects | Functions return { url, method } shaped objects |
| Form Support | .form() method for HTML form attributes |
| Query Parameters | query and mergeQuery options for URL params |
| Inertia Integration | Works with <Form> component and useForm hook |
Tailwind CSS v4 migration guide:
| Before (v3) | After (v4) |
|---|---|
tailwind.config.js |
@theme directive in CSS |
@tailwind base/components/utilities |
@import "tailwindcss" |
bg-opacity-50 |
bg-black/50 |
flex-shrink-0 |
shrink-0 |
w-4 h-4 |
size-4 |
git clone https://github.com/initred/laravel-boost-guidelines.git
cd laravel-boost-guidelines
composer install
composer test- PHP 8.2+
- Laravel 11.x or 12.x
- Laravel Boost
Contributions are welcome! Please see CONTRIBUTING.md for details.
MIT License. See LICENSE for details.