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(3mo ago)0106MITPHPPHP ^8.1

Since Apr 21Pushed 3mo 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 1w ago

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

37

—

LowBetter than 81% of packages

Maintenance78

Regular maintenance activity

Popularity13

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity43

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

119d 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.9k212.4M1.5k](/packages/laravel-sail)[laravel/ai

The official AI SDK for Laravel.

1.1k4.6M323](/packages/laravel-ai)[laravel/mcp

Rapidly build MCP servers for your Laravel applications.

79227.1M229](/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.6k26.0M810](/packages/laravel-boost)[laravel/cashier

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

2.6k31.8M162](/packages/laravel-cashier)[tallstackui/tallstackui

TallStackUI is a powerful suite of Blade components that elevate your workflow of Livewire applications.

731189.9k16](/packages/tallstackui-tallstackui)

PHPackages © 2026

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