marcosroigdev/ddd-forge

Scaffolding tool for DDD & Hexagonal Architecture in PHP

Installs: 0

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 0

Open Issues: 0

pkg:composer/marcosroigdev/ddd-forge

v0.1.0 2025-09-27 09:08 UTC

README

DDD-Forge social preview

DDD-Forge ⚒️

CI PHP License Packagist Version Packagist Downloads

DDD-Forge is a scaffolding tool for Domain-Driven Design and Hexagonal Architecture in PHP.
Generate clean code, bounded contexts, aggregates, value objects, and use cases with a single command.

🚧 Work in Progress – expect rapid changes.

✨ Features

  • ✅ Initialize hexagonal project structure (init)
  • ⏳ Generate bounded contexts (make:context)
  • ⏳ Create aggregates, value objects and domain events
  • ⏳ Generate use cases and ports
  • ⏳ Symfony & Laravel recipes
  • ⏳ Test scaffolding

🚀 Installation

Require the package in your project (soon available via Packagist):

composer require --dev marcosroigdev/ddd-forge

Requires PHP >= 8.2.

📦 Usage

Run the CLI:

# Using composer script
composer run forge -- init

# Or directly
bin/ddd-forge init

This will generate the base folder structure:

src/
├── Domain
│   └── (Aggregates, ValueObjects, DomainEvents)
├── Application
│   └── (UseCases, Ports)
├── Infrastructure
│   └── (Repositories, Adapters)
└── UI
└── (CLI, HTTP, etc.)

🤝 Contributing

Contributions, ideas and feedback are welcome! Please check CONTRIBUTING.md

📜 License

Released under the MIT License.