lucky-media/reactor
Composer 安装命令:
composer require lucky-media/reactor
包简介
Minimal Laravel authentication scaffolding with React, Inertia and Tailwind CSS.
README 文档
README
Reactor for Laravel
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.
Why Reactor?
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.
Features
- 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
Installation
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
Usage
Reactor for Laravel comes with a pre-configured and opinionated setup for Laravel applications. This includes frontend components, headless components, and more.
Authentication
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.
Pest for Laravel
Reactor for Laravel comes with Pest for Laravel pre-installed. To run your tests, simply run:
./vendor/bin/pest
Inertia.js with React
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.
ESLint, Prettier, and Husky
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.
PHP Ide Helper
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"
]
}
GitHub Workflow with Laravel Pint
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.
Frontend Components
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.
Sonner, and Lucide React
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.
Support
If you find any issues or have suggestions for improvements, please feel free to open an issue on the GitHub repository.
Security Vulnerabilities
Please email us at hello@luckymedia.dev if you find any security vulnerabilities in Reactor. All security vulnerabilities will be promptly addressed.
Credits
License
Reactor is open-sourced software licensed under the MIT license.
lucky-media/reactor 适用场景与选型建议
lucky-media/reactor 是一款 基于 JavaScript 开发的 Composer 扩展包,目前已累计 568 次下载、GitHub Stars 达 66, 最近一次更新时间为 2023 年 04 月 24 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「auth」 「laravel」 「react」 「inertia」 「tailwind」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 lucky-media/reactor 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 lucky-media/reactor 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 lucky-media/reactor 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Async Reactive Postgres Driver for PHP (Non-blocking)
Laravel Multiauth package
A lightweight and powerful OAuth 2.0 authorization and resource server library with support for all the core specification grants. This library will allow you to secure your API with OAuth and allow your applications users to approve apps that want to access their data from your API.
This package provides a flexible way to add Role-based Permissions to Laravel 6.x
Email Toolkit Plugin for CakePHP
Laravel integration for blade-to-react
统计信息
- 总下载量: 568
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 66
- 点击次数: 16
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-04-24