DDD Architecture
Organize Controllers, Services, Repositories and DTOs from day one.
Generate Controllers, DTOs, Services, Repositories, JWT-ready APIs and Public Identifiers with a single Artisan command.
Built for developers who care about architecture, maintainability and automation.
Install the package.
composer require domain/laravel-domain-generatorGenerate your first domain.
php artisan make:domain UserYour first complete Laravel domain is generated in seconds.
Instead of manually creating Controllers, DTOs, Services, Repositories and authentication boilerplate, the package generates a scalable Domain Driven Design structure automatically.
Perfect for projects using:
The package follows an automated quality pipeline inspired by Laravel, Filament and Spatie.
| Feature | Description |
|---|---|
| 🚀 Automated Releases | Semantic versioning with GitHub Releases |
| 📖 Live Documentation | Automatic deployment with VitePress |
| 🔒 Security | Composer Audit and CodeQL |
| ⚙️ Code Quality | Laravel Pint and PHPStan |
| 📦 Package Validation | Composer validation on every push |
| 🧪 CI Pipeline | Lint, Build and Documentation deployment |
The package generates a structure similar to this.
app/
├── Domain/
│ └── User/
│ ├── DTO/
│ ├── Repositories/
│ └── Service/
├── Http/
│ ├── Controllers/
│ ├── Requests/
│ └── Resources/
└── Models/Every generated file follows Laravel conventions while keeping business logic isolated inside the Domain layer.
| Feature | Benefit |
|---|---|
| 🧱 DDD-first | Domain-oriented architecture from day one. |
| 🔐 JWT Ready | Authentication endpoints already included. |
| 🆔 Public IDs | ULID, UUID and UUID32 support. |
| 📦 Generic Repository | Pagination, filters and relationships built in. |
| 🏗️ Clean Architecture | Business logic isolated from HTTP. |
| 🚀 Professional CI/CD | GitHub Actions, Releases and automated documentation. |
Continue with the Installation guide and generate your first production-ready Laravel domain.
→ Next: Installation