PHPackages                             fixik/ddd-generator - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. fixik/ddd-generator

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

fixik/ddd-generator
===================

DDD generator for Laravel

v0.0.7(3mo ago)116MITPHPPHP ^8.1CI passing

Since Jan 3Pushed 3mo agoCompare

[ Source](https://github.com/OlegMarko/ddd-generator)[ Packagist](https://packagist.org/packages/fixik/ddd-generator)[ RSS](/packages/fixik-ddd-generator/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (4)Versions (8)Used By (0)

Laravel DDD Generator
=====================

[](#laravel-ddd-generator)

[![CI](https://github.com/OlegMarko/ddd-generator/actions/workflows/ci.yml/badge.svg)](https://github.com/OlegMarko/ddd-generator/actions/workflows/ci.yml)[![Coverage](https://camo.githubusercontent.com/b75bbfc118dd88d75e2fdfbf6c08f2ba08da7923a27122b648a43a9bfd9d6abf/68747470733a2f2f636f6465636f762e696f2f67682f4f6c65674d61726b6f2f6464642d67656e657261746f722f6272616e63682f6d61696e2f67726170682f62616467652e737667)](https://codecov.io/gh/OlegMarko/ddd-generator)[![Latest Version](https://camo.githubusercontent.com/0fec410ebe99be3e76086a2b7fe89ce3ec7e7e0274abf1a0c76cbc8e6294de79/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f666978696b2f6464642d67656e657261746f72)](https://packagist.org/packages/fixik/ddd-generator)[![Total Downloads](https://camo.githubusercontent.com/9a58fa4e989d06431809b87f94dcb0f083e99505164156b6e0c62263c2982c3b/68747470733a2f2f706f7365722e707567782e6f72672f666978696b2f6464642d67656e657261746f722f646f776e6c6f616473)](https://packagist.org/packages/fixik/ddd-generator)[![License](https://camo.githubusercontent.com/bffd1e1de84358f7e22ba4dd7534727697e02793894c754ae80a249f896ead20/68747470733a2f2f706f7365722e707567782e6f72672f666978696b2f6464642d67656e657261746f722f6c6963656e7365)](https://packagist.org/packages/fixik/ddd-generator)

A Laravel package for generating **Domain-Driven Design (DDD)** modules with **CQRS**, **modular architecture**, and **HTTP API presets**.

> Opinionated, test-driven, production-ready scaffolding for large Laravel apps.

---

✨ Features
----------

[](#-features)

- Modular DDD structure (`App/Modules/*`)
- Clean separation:
    - Domain / Application / Infrastructure
- CQRS (Commands / Queries / Handlers)
- HTTP API generation (Controllers, Requests, Resources, Routes)
- Idempotent generators (safe to re-run)
- Preset-based generation (`domain`, `http-crud`, `http-api`) + optional `--style=cqrs`
- Custom base namespace and path
- Fully covered by tests

---

🚀 Quick Start
-------------

[](#-quick-start)

### Install

[](#install)

```
composer require fixik/ddd-generator --dev
```

### Generate API HTTP module

[](#generate-api-http-module)

```
php artisan ddd:make http-api Order --entity=Order
```

This will generate:

- Domain entity &amp; repository
- CQRS commands / queries &amp; handlers
- HTTP controller, request, resource
- Module routes
- Module ServiceProvider

📦 Presets
---------

[](#-presets)

PresetDescription`domain`Domain only (Entities, Events, Repositories)`domain` + `--style=cqrs`Domain + CQRS (Commands, Queries, Handlers)`http-crud`Domain + HTTP CRUD (Controllers, Requests, Routes)`http-api`Domain + HTTP API (Controllers, Requests, Routes)`http-api` + `--style=cqrs`Domain + CQRS + HTTP API📚 Documentation
---------------

[](#-documentation)

### 👉 Full documentation:

[](#-full-documentation)

Includes:

- Architecture overview
- Presets explained
- CQRS flow
- Configuration
- Extending generators

🧠 Philosophy
------------

[](#-philosophy)

This package enforces explicit architecture:

- No hidden magic
- No guessing entities
- No global routes
- No infrastructure leaks into domain
- Designed for long-living Laravel applications.

⚡ Performance &amp; Caching
---------------------------

[](#-performance--caching)

The generator provides optional cache commands for large, modular applications:

- `php artisan ddd:modules-cache`
- `php artisan ddd:event-listeners-cache`
- `php artisan ddd:cache-clear`

These commands are intended **ONLY for production environments**.

They should NOT be used in:

- local development
- automated tests
- CI pipelines

They work similarly to Laravel's `route:cache` and `event:cache`and significantly reduce bootstrapping overhead in large projects.

📄 License
---------

[](#-license)

### MIT

[](#mit)

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance80

Actively maintained with recent releases

Popularity7

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

 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

Every ~5 days

Total

7

Last Release

104d ago

### Community

Maintainers

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

---

Top Contributors

[![OlegMarko](https://avatars.githubusercontent.com/u/17251450?v=4)](https://github.com/OlegMarko "OlegMarko (9 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/fixik-ddd-generator/health.svg)

```
[![Health](https://phpackages.com/badges/fixik-ddd-generator/health.svg)](https://phpackages.com/packages/fixik-ddd-generator)
```

###  Alternatives

[barryvdh/laravel-ide-helper

Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.

14.9k123.0M687](/packages/barryvdh-laravel-ide-helper)[wnx/laravel-stats

Get insights about your Laravel Project

1.8k1.8M7](/packages/wnx-laravel-stats)[orchestra/canvas

Code Generators for Laravel Applications and Packages

21017.2M158](/packages/orchestra-canvas)[pulkitjalan/ip-geolocation

IP Geolocation Wrapper with Laravel Support

89164.9k1](/packages/pulkitjalan-ip-geolocation)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)[interaction-design-foundation/laravel-geoip

Support for multiple Geographical Location services.

17221.0k3](/packages/interaction-design-foundation-laravel-geoip)

PHPackages © 2026

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