Shoaib Khan from Devs Buddy presenting you a highly opinionated Laravel Starter Kit with Inertia and React. It helps you get up and running quickly with clean, consistent, and fully type-safe code.
This starter kit is a fork of laravel's official react starter kit.
It has been modified to be fully strict, with 100% type safety, and follows an action-oriented pattern.
A few more helpful default features have been added, and the built-in authentication system has been updated to follow these strict rules. This ensures consistent code quality across your entire project.
These projects were the main inspiration for creating this starter kit. I’ve added additional features that are essential for most modern applications.
- Fully Strict Types: It follows 100% of type coverage for all the classes, methods and logic.
- Action Oriented Pattern: It uses dedicated Action classes for handling business logic and mutations. This keeps your controllers clean and makes actions reusable across your project.
- Cruddy by Design: It embraces the Cruddy by Design pattern to stay aligned with Laravel’s core concepts, making everything easy to understand and extend.
-
Authentication: Based on Laravel’s built-in authentication, with a few tweaks to fit this project’s structure and standards.
-
Global Configs: Most apps need some kind of global configuration that can be managed from one place and applied across the app. Includes settings like:
- App Logo
- App Favicon
- Basic Mail Config (excluding mail server credentials)
-
Mail Templates: Includes a dynamic mail template system with a flexible Mailable class. You can create templates with fields like Subject and Content, then send emails by simply calling helper methods with the template code — it just works.
-
Queuable Mail: The mailing system combines the global config and mail template features. If mail queueing is enabled in the config, emails will automatically be pushed to the queue for asynchronous delivery.
-
Events: From the beggining this starter kit includes some events that are being fired on each action that may some other action in future, for this I follow to create Event for each action taken in the app, this way in future you just add a listener to listen these events and act upon them.
-
Why custom events instead of model observers?
I prefer explicit event handling over “magic” behavior. With custom events, you can keep logic clean and encapsulated inside dedicated listener classes.
-
-
Custom Helpers: This kit organizes helpers as Traits, Services, Support classes, and Facades.
- A small
helpers.phpfile is still included for global functions where class imports aren’t possible.
- A small
Make sure you have the following installed:
- PHP 8.4+
- Composer
- Node.js & npm (or yarn/pnpm)
Clone the repository and install dependencies:
git clone https://github.com/devsbuddy/laravel-react-starter-kit.git your-awesome-appNavigate to newly created prject directory and run setup commands
cd your-awesome-app # Navigate to the project directory
composer setup # Install all deps and setup projectBy default this starter kit uses sqlite database and if you want to use other database driver you can configure that in your .env file:
# Example PostgreSQL Config
DB_CONNECTION=pgsql
DB_HOST=127.0.0.1
DB_PORT=5432
DB_DATABASE=your_awesome_app
DB_USERNAME=postgres
DB_PASSWORD=After configuring new database you can run migration and seeders:
php artisan migrate --seed
# OR
php artisan migrate:fresh --seedNow as the app is all setup correctly you can start working on it:
# Start development server
composer devNote: composer dev may give you an error about the pail command, specially on Windows machines, as the pail command is not supported on windows.
To make it work you can use alternative command:
# Start development server on Windows
composer dev:winAfter running your development server you can visit to http://localhost:8000 or http://127.0.0.1:8000 on your favorite browser to see the app in action.
You can find more refined and detailed Documentation here.
Contributions are welcome! If you’d like to improve this starter kit, feel free to:
- Fork the repository
- Create a new feature branch (
git checkout -b feature/your-feature) - Commit your changes (
git commit -m 'Added some feature') - Push to the branch (
git push origin feature/your-feature) - Open a Pull Request
Please make sure your code follows the existing structure and style conventions also all tests are passing.
This project is open-source and available under the MIT License.