pragmatic-laravel-layered-architecturelisted
Install: claude install-skill yuriymarad/laravel-skills
# Pragmatic Laravel Layered Architecture
A practical backend architecture for Laravel projects that keeps code split by clear responsibilities, helping the codebase stay maintainable as it grows and easier to test.
This approach does not try to force pure Clean Architecture, strict DDD, or other abstractions into Laravel. It simply extends the standard way of building Laravel applications by adding a few practical architectural components and rules that make layer boundaries and responsibilities clearer.
## Architecture Overview
This section describes the main components of our application architecture:
- Http / Console / MCP
- Actions
- Core
- Contracts
- Integrations
- Models
- Values
- Data
- Enums
- Events / Listeners
- Jobs
- Casts
- Providers
- Exceptions
**1. Http / Console / MCP**
Question: How does the outside world enter the system?
Responsibility:
Entry points of the application: HTTP controllers, API, form requests, console commands, MCP tools.
They receive input, validate or normalize request data, call an Action, and return output.
Rules:
- Keep this layer thin.
- Do not put business logic here.
- Use separate Request classes to validate incoming data.
- Do not orchestrate complex workflows here.
Path: `app/Http/Controllers/`, `app/Http/Requests/`, `app/Console/Commands/`, `app/Mcp/`
Example:
```php
class PlaceOrderController
{
public function store(PlaceOrderRequest $request, PlaceOrderAction $action): JsonResponse
{
$order = $action-