/fuse-laravel:fusecorefrom fuse-laravel
Guides creation of modules and implementation of features in FuseCore modular-monolith Laravel projects with React 19 integration, auto-discovery, and SOLID principles.
Ships in fuse-laravel. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Before ANY implementation in FuseCore project, spawn 3 agents in parallel, one Agent call each with a name:
/FuseCore/After implementation, run fuse-ai-pilot:sniper for validation.
FuseCore is a Modular Monolith architecture for Laravel 13 with React 19 integration.
| Component | Purpose |
|---|---|
| Module | Self-contained feature (User, Dashboard, Blog) |
| Auto-Discovery | Automatic registration via module.json |
| Traits | HasModule for resource loading |
| Contracts | ModuleInterface, ReactModuleInterface |
| React Integration | Isolated React per module |
| i18n | Multi-language support (FR/EN/DE/IT/ES) |
/FuseCore/{Module}/ - Never in /app/HasModule traitFUSE_SOLID_MAX_LINES - Split larger files (SOLID)/App/Contracts/ - Never in components/Database/Migrations//Routes/api.phpFuseCore/
├── Core/ # Infrastructure (priority 0)
│ ├── App/
│ │ ├── Contracts/ # ModuleInterface, ReactModuleInterface
│ │ ├── Services/ # ModuleDiscovery, RouteAggregator
│ │ ├── Traits/ # HasModule, HasModuleDatabase
│ │ └── Providers/ # FuseCoreServiceProvider
│ ├── Config/fusecore.php
│ └── module.json
│
├── User/ # Auth module
│ ├── App/Models/ # User.php, Profile.php
│ ├── Config/ # Module config (sanctum.php, etc.)
│ ├── Database/Migrations/
│ ├── Resources/React/ # Isolated React
│ ├── Routes/api.php
│ └── module.json # dependencies: []
│
└── {YourModule}/ # Your new module
├── App/
│ ├── Models/
│ ├── Http/Controllers/
│ ├── Services/
│ └── Providers/{YourModule}ServiceProvider.php
├── Config/ # Module-specific config
├── Database/Migrations/
├── Resources/React/
├── Routes/api.php
└── module.json # dependencies: ["User"]
| Topic | Reference | When to consult |
|---|---|---|
| Overview | architecture.md | Understanding FuseCore design |
| Module Structure | module-structure.md | Directory organization |
| Auto-Discovery | module-discovery.md | How modules are loaded |
| module.json | module-json.md | Module configuration |
| Topic | Reference | When to consult |
|---|---|---|
| Contracts | contracts.md | ModuleInterface, ReactModuleInterface |
| Traits | traits.md | HasModule, HasModuleDatabase |
| ServiceProvider | service-provider.md | Module registration |
| Routes | routes.md | API routing |
| Topic | Reference | When to consult |
|---|---|---|
| React Integration | react-integration.md | Frontend per module |
| Migrations | migrations.md | Database per module |
| i18n | i18n.md | Multi-language setup |
| Topic | Reference | When to consult |
|---|---|---|
| Creating Module | creating-module.md | Step-by-step guide |
| Template | Purpose |
|---|---|
| module.json.md | Module configuration |
| ServiceProvider.php.md | Module service provider |
| Controller.php.md | API controller |
| Model.php.md | Eloquent model |
| Migration.php.md | Database migration |
| ReactStructure.md | React module structure |
| ApiRoutes.php.md | API routes file |
| Resource.php.md | API Resource |
| Request.php.md | Form Request |
| Service.php.md | Business logic service |
# 1. Create directory structure
mkdir -p FuseCore/{ModuleName}/{App/{Models,Http/Controllers,Services,Providers},Database/Migrations,Resources/React,Routes}
# 2. Create module.json
# 3. Create ServiceProvider with HasModule trait
# 4. Create routes/api.php
# 5. Run: php artisan fusecore:cache-clear
{
"name": "ModuleName",
"version": "1.0.0",
"enabled": true,
"isCore": false,
"dependencies": ["User"]
}
class ModuleNameServiceProvider extends ServiceProvider
{
use HasModule;
public function boot(): void
{
$this->loadModuleMigrations();
}
}
Route::middleware(['api', 'auth:sanctum'])->group(function () {
Route::apiResource('items', ItemController::class);
});
/FuseCore/{Module}/ directory createdmodule.json with name, version, dependencies{Module}ServiceProvider.php with HasModule trait/Routes/api.php/Database/Migrations//App/Models//App/Http/Controllers//Resources/React/ (if needed)/Resources/React/i18n/locales/| Rule | FuseCore Implementation |
|---|---|
| Single Responsibility | One module = one feature |
| Open/Closed | Extend via ModuleInterface |
| Liskov Substitution | ReactModuleInterface extends ModuleInterface |
| Interface Segregation | Separate contracts |
| Dependency Inversion | Inject via ServiceProvider |
File limits: All files within FUSE_SOLID_MAX_LINES. Split well before it.
| Type | Convention | Example |
|---|---|---|
| Module folder | PascalCase | BlogPost |
| module.json name | PascalCase | "name": "BlogPost" |
| ServiceProvider | {Module}ServiceProvider | BlogPostServiceProvider |
| Controller | {Resource}Controller | PostController |
| Model | Singular | Post |
| Migration | create_{table}_table | create_posts_table |
| Routes file | api.php | Always api.php |
typescript <6.1.0) requires the alias "typescript": "npm:@typescript/typescript6@^6.0.2" + "@typescript/native": "npm:typescript@^7.0.2" (npx tsc = 7.0)inertiajs/inertia-laravel ^3.0) for the React ↔ modules bridgeBindings in register(), observers/hooks in boot(). L13 reminder: instantiating a model during its own boot (new static() inside the model's boot() or a trait's boot*()) throws a LogicException.
public function register(): void
{
$this->app->bind(PostRepositoryContract::class, EloquentPostRepository::class);
}
public function boot(): void
{
Post::observe(PostObserver::class);
}
L13 uses hyphens by default. For FuseCore, configuring the prefix per module via module.json remains compatible:
{
"name": "BlogPost",
"cache_prefix": "blogpost-"
}
FuseCore/<Module>/ folder (Contracts/, Services/, Http/, Models/)final readonly class for module DTOs (PHP 8.3+)register() to boot()new static() inside boot() → LogicException in L13)FUSE_SOLID_MAX_LINES per file (split into sub-modules or Services)references/architecture.md (opens in a new tab)references/contracts.md (opens in a new tab)references/creating-module.md (opens in a new tab)references/i18n.md (opens in a new tab)references/migrations.md (opens in a new tab)references/module-discovery.md (opens in a new tab)references/module-json.md (opens in a new tab)references/module-structure.md (opens in a new tab)references/react-integration.md (opens in a new tab)references/routes.md (opens in a new tab)references/service-provider.md (opens in a new tab)references/templates/ApiRoutes.php.md (opens in a new tab)references/templates/Controller.php.md (opens in a new tab)references/templates/Migration.php.md (opens in a new tab)references/templates/Model.php.md (opens in a new tab)references/templates/ReactStructure.md (opens in a new tab)references/templates/Request.php.md (opens in a new tab)references/templates/Resource.php.md (opens in a new tab)references/templates/Service.php.md (opens in a new tab)references/templates/ServiceProvider.php.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
modular-monolith, laravel-modules, fusecore, module-discovery
23 skills in this plugin
/laravel-ai-sdkUse when integrating AI agents, tool calling, embeddings, structured output, or streaming in Laravel 13 via the `laravel/ai` package./laravel-apiUse when creating API endpoints, transforming responses with API Resources, or handling API authentication, rate limiting, or versioning./laravel-architectureUse when structuring a Laravel project, creating services/repositories/actions, implementing dependency injection, or organizing code layers./laravel-attributesUse when migrating Eloquent models, Jobs, Console commands, Controllers, API Resources, Validation, Factories or Seeders to Laravel 13 PHP attributes./laravel-authUse when implementing user authentication, API tokens, social login, or authorization in Laravel 13./laravel-billingUse when implementing subscriptions, invoices, payment methods, webhooks, or billing portals with Laravel Cashier (Stripe or Paddle).npx claudepluginhub fusengine/claude-plugins --plugin fuse-laravelOther plugins' skills for the same job