rushing/laravel-react-component-registry 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

rushing/laravel-react-component-registry

Composer 安装命令:

composer require rushing/laravel-react-component-registry

包简介

Laravel package for React component discovery, registration, and showcase functionality

README 文档

README

A Laravel package for React component discovery, registration, and showcase functionality. Easily browse and explore React components in your Laravel application with a beautiful, shadcn/ui-based interface.

Features

  • 🔍 Automatic Component Discovery - Recursively scans configured directories for React components
  • 🎨 Beautiful UI - Clean, responsive interface built with shadcn/ui components
  • ⚙️ Highly Configurable - Customize routes, directories, templates, and more
  • 🗃️ Smart Caching - Performance-optimized with configurable caching
  • 📝 Todo Tracking - Extract and display TODO comments for component development tracking
  • 🔧 Props Documentation - Automatically extract TypeScript prop definitions
  • 🌍 Environment Aware - Disable in production environments automatically
  • 🎯 Laravel 12 Ready - Built specifically for Laravel 12 with Inertia.js integration

Installation

Install the package via Composer:

composer require stephenr85/laravel-react-component-registry

Publish the configuration file:

php artisan vendor:publish --tag=config --provider="StephenR85\LaravelReactComponentRegistry\ComponentRegistryServiceProvider"

Optionally publish the views for customization:

php artisan vendor:publish --tag=views --provider="StephenR85\LaravelReactComponentRegistry\ComponentRegistryServiceProvider"

Configuration

Enable the component registry in your .env file:

COMPONENT_REGISTRY_ENABLED=true

Configure the package in config/component-registry.php:

return [
    'enabled' => env('COMPONENT_REGISTRY_ENABLED', false),
    'excluded_environments' => ['production'],
    'routes' => [
        'prefix' => 'dev/components',
        'middleware' => ['web'],
        'name_prefix' => 'component-registry.',
    ],
    'directories' => [
        'resources/js/components',
        'resources/js/pages',
    ],
    // ... more configuration options
];

Usage

Once configured, visit /dev/components (or your configured route prefix) to browse your React components.

Component Discovery

The package will automatically discover React components (.tsx and .jsx files) in your configured directories. It extracts:

  • Component names and descriptions
  • TypeScript prop definitions
  • TODO/FIXME comments for development tracking
  • File metadata and organization

Todo Tracking

Add TODO comments in your components to track development progress:

// TODO: Add loading state handling
// TODO: Implement error boundaries
// FIXME: Performance optimization needed

export default function MyComponent() {
  // Component code
}

These will be automatically extracted and displayed in the component registry with a progress tracker.

Facade Usage

You can also interact with the component registry programmatically:

use StephenR85\LaravelReactComponentRegistry\Facades\ComponentRegistry;

// Discover all components
$components = ComponentRegistry::discover();

// Find a specific component
$component = ComponentRegistry::findComponent('my-component');

// Clear the discovery cache
ComponentRegistry::clearCache();

Development Status

Task 1 Complete - Package scaffolding and Laravel integration
🚧 Task 2 In Progress - Core component discovery service
Task 3 Planned - Route and controller implementation
Task 4 Planned - Template and view system
Task 5 Planned - Configuration and documentation

Requirements

  • PHP 8.2+
  • Laravel 12.0+
  • Inertia.js 2.0+

Testing

Run the package tests:

composer test

License

The MIT License (MIT). Please see License File for more information.

rushing/laravel-react-component-registry 适用场景与选型建议

rushing/laravel-react-component-registry 是一款 基于 TypeScript 开发的 Composer 扩展包,目前已累计 0 次下载、GitHub Stars 达 0, 最近一次更新时间为 2025 年 09 月 09 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 rushing/laravel-react-component-registry 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 rushing/laravel-react-component-registry 我们能提供哪些服务?
定制开发 / 二次开发

基于 rushing/laravel-react-component-registry 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 0
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 19
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: TypeScript

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-09-09