PHPackages                             devcortes/laravel-clean-architecture - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. devcortes/laravel-clean-architecture

ActiveLibrary[Framework](/categories/framework)

devcortes/laravel-clean-architecture
====================================

A Laravel package to scaffold hexagonal architecture modules

v1.0.0(2mo ago)046MITPHPPHP ^8.1

Since Apr 21Pushed 2mo agoCompare

[ Source](https://github.com/danteCortes/clean-architecture)[ Packagist](https://packagist.org/packages/devcortes/laravel-clean-architecture)[ RSS](/packages/devcortes-laravel-clean-architecture/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (2)Versions (2)Used By (0)

Laravel Hexagonal Maker
=======================

[](#laravel-hexagonal-maker)

A Laravel package to scaffold hexagonal architecture modules with a single Artisan command.

Installation
------------

[](#installation)

```
composer require vendor/laravel-hexagonal-maker --dev
```

The package auto-discovers itself via Laravel's package auto-discovery.

Usage
-----

[](#usage)

```
php artisan make:module NombreModulo
```

### Example

[](#example)

```
php artisan make:module Product
```

This will generate the following structure in `app/Src/Product/`:

```
app/Src/Product/
├── Domain/
│   ├── Entities/Product.php
│   └── ValueObjects/ProductId.php
├── Application/
│   └── UseCases/CreateProductUseCase.php
└── Infrastructure/
    ├── Persistence/
    │   ├── Models/ProductModel.php
    │   ├── Repositories/ProductRepositoryInterface.php
    │   └── Repositories/MongoProductRepository.php
    └── Http/
        ├── Controllers/ProductController.php
        └── Requests/CreateProductRequest.php

```

Autoloading
-----------

[](#autoloading)

Add the `App\Src` namespace to your `composer.json`:

```
"autoload": {
    "psr-4": {
        "App\\": "app/",
        "App\\Src\\": "app/Src/"
    }
}
```

Then run:

```
composer dump-autoload
```

Binding the Repository
----------------------

[](#binding-the-repository)

After generating the module, bind the repository interface to its implementation in a Service Provider:

```
use App\Src\Product\Infrastructure\Persistence\Repositories\ProductRepositoryInterface;
use App\Src\Product\Infrastructure\Persistence\Repositories\MongoProductRepository;

$this->app->bind(ProductRepositoryInterface::class, MongoProductRepository::class);
```

Publishing Stubs
----------------

[](#publishing-stubs)

You can publish the stubs to customize them:

```
php artisan vendor:publish --tag=hexagonal-stubs
```

Stubs will be published to `stubs/hexagonal/`.

Requirements
------------

[](#requirements)

- PHP 8.1+
- Laravel 10 or 11
- `mongodb/laravel-mongodb` (for MongoDB models)

License
-------

[](#license)

MIT

###  Health Score

38

—

LowBetter than 83% of packages

Maintenance86

Actively maintained with recent releases

Popularity10

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity42

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

74d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/db82fdeee0b597d4af1611249a41322014a4c5f97ab3504610d0fabf00797bf8?d=identicon)[devcortes](/maintainers/devcortes)

---

Top Contributors

[![danteCortes](https://avatars.githubusercontent.com/u/11085153?v=4)](https://github.com/danteCortes "danteCortes (1 commits)")

### Embed Badge

![Health badge](/badges/devcortes-laravel-clean-architecture/health.svg)

```
[![Health](https://phpackages.com/badges/devcortes-laravel-clean-architecture/health.svg)](https://phpackages.com/packages/devcortes-laravel-clean-architecture)
```

###  Alternatives

[laravel/sail

Docker files for running a basic Laravel application.

1.9k205.7M1.3k](/packages/laravel-sail)[laravel/ai

The official AI SDK for Laravel.

1.0k3.2M201](/packages/laravel-ai)[laravel/mcp

Rapidly build MCP servers for your Laravel applications.

77022.3M151](/packages/laravel-mcp)[laravel/boost

Laravel Boost accelerates AI-assisted development by providing the essential context and structure that AI needs to generate high-quality, Laravel-specific code.

3.5k21.5M601](/packages/laravel-boost)[laravel/cashier

Laravel Cashier provides an expressive, fluent interface to Stripe's subscription billing services.

2.6k29.9M148](/packages/laravel-cashier)[laravel/pulse

Laravel Pulse is a real-time application performance monitoring tool and dashboard for your Laravel application.

1.7k15.1M132](/packages/laravel-pulse)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
