fixik/ddd-generator

DDD generator for Laravel

Installs: 5

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 0

Open Issues: 0

pkg:composer/fixik/ddd-generator

v0.0.1 2026-01-03 01:03 UTC

This package is auto-updated.

Last update: 2026-01-07 19:49:58 UTC


README

CI Coverage Latest Version Total Downloads License

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

  • 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 (core, api, api-http)
  • Custom base namespace & path
  • Fully covered by tests

🚀 Quick Start

Install

composer require fixik/ddd-generator --dev

Generate API HTTP module

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

This will generate:

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

📦 Presets

Preset Description
core Domain only (Entity, ServiceProvider)
api core + CQRS + Repository
api-http api + HTTP layer (Controller, Routes, Requests)

📚 Documentation

👉 Full documentation:

https://olegmarko.github.io/ddd-generator/

Includes:

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

🧠 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.

📄 License

MIT