Reactor is a Laravel package that provides minimal scaffolding for Laravel applications, making it simple for developers to get started with a fully functional web application. This package has a strong focus on frontend tooling and comes with Authentication, Inertia.js, React, and a very opinionated setup. Created by Lucky Media, Reactor aims to simplify and streamline your development process.
While Laravel Breeze provides a simple and minimal boilerplate with authentication for starting a new Laravel project, Reactor for Laravel is specifically designed to offer a more comprehensive set of features and tools catered towards modern web application.
Reactor has a more advanced and opinionated frontend setup compared to Breeze. It includes pre-configured ESLint and Prettier configs, Husky hooks for automatic code formatting and linting, and a GitHub Workflow that leverages Laravel Pint. Together, these tools contribute to a clean and consistent codebase, fostering best practices among developers.
Reactor comes with pre-built, opinionated frontend components that are influenced by shadcn/ui
. These components are built with composability in mind, making it easier to build and customize application UI.
- Authentication
- Pest for Laravel
- PHP Ide Helper
- Inertia.js with React
- Configured ESLint and Prettier
- Husky hooks to automatically format and lint code
- GitHub Workflow to automatically format code with Laravel Pint
- Opinionated frontend components with composability in mind, heavily inspired by
shadcn/ui
- Radix UI headless components
- Sonner for Toast notifications
- Lucide React for icons
Before you get started with Reactor for Laravel, make sure you have the following prerequisites:
- Laravel 9+
- Composer
- Node.js 16+
Follow these steps to install:
- Install the package via Composer:
composer require lucky-media/reactor
- Install the package by running
php artisan reactor:install
- Run the frontend build process:
npm run dev
Reactor for Laravel comes with a pre-configured and opinionated setup for Laravel applications. This includes frontend components, headless components, and more.
The package comes with a ready-to-use authentication system. Make sure you've configured your database and run migrations. To customize your authentication views, you can either modify the included components or create your own.
Reactor for Laravel comes with Pest for Laravel pre-installed. To run your tests, simply run:
./vendor/bin/pest
Reactor for Laravel is built on top of Inertia.js with React for a smooth, single-page application experience. Make sure to review the Inertia.js documentation to understand and wire up additional pages.
The package comes with pre-configured ESLint and Prettier configs, ensuring consistent and clean code. Additionally, Husky hooks run automatically to format and lint your code before committing.
Integrate with popular IDEs to improve the developer experience. In the scripts section of your composer.json
file, you need to add the following:
{
"post-update-cmd": [
"@php artisan vendor:publish --tag=laravel-assets --ansi --force",
"@php artisan ide-helper:models -N",
"@php artisan ide-helper:generate",
"@php artisan ide-helper:eloquent",
"@php artisan ide-helper:meta"
]
}
Reactor for Laravel includes a pre-configured GitHub Workflow to automatically format code with Laravel Pint. This ensures a clean codebase and encourages best practices across your team.
The included frontend components are highly opinionated and influenced by shadcn/ui. They are designed for composability and ease of use. Be sure to explore and customize these components according to your needs.
- Components are composed using Tailwind Variants.
- Radix UI headless components are used for greater flexibility. Read their docs here.
The package includes Sonner for Toast notifications, and Lucide React for icons. These packages are integrated to provide a uniform and highly customizable frontend experience.
If you find any issues or have suggestions for improvements, please feel free to open an issue on the GitHub repository.
Please email us at hello@luckymedia.dev if you find any security vulnerabilities in Reactor. All security vulnerabilities will be promptly addressed.
Reactor is open-sourced software licensed under the MIT license.