ldaidone/laravel-ddd-starter
最新稳定版本:v0.1.0
Composer 安装命令:
composer create-project ldaidone/laravel-ddd-starter
包简介
A Laravel starter template preconfigured for Domain-Driven Design with folder structure, namespaces, and laravel-ddd-commands included.
README 文档
README
A clean, opinionated Laravel project template that comes preconfigured for Domain-Driven Design. This starter includes a ready-made DDD folder structure, PSR-4 autoloading, and the full laravel-ddd-commands package — so you can scaffold domains, entities, use cases, value objects, repositories, and more from day one.
🚀 Quick Start
Create a new Laravel DDD-ready project:
composer create-project ldidone/laravel-ddd-starter app-name
You’ll get a fresh Laravel install with:
- Pre-built DDD folder structure under app/
- Autoload namespaces for Domains & Infrastructure
- The latest version of ldaidone/laravel-ddd-commands
- Optional post-install instructions in your terminal
📂 Folder Structure
This starter ships with an opinionated domain layout already in place:
app/
├── Domains/
│ └── Billing/
│ ├── Entities/
│ ├── ValueObjects/
│ ├── DataTransferObjects/
│ ├── UseCases/
│ ├── Actions/
│ ├── Repositories/
│ └── Events/
└── Infrastructure/
├── Persistence/
├── Http/
├── Services/
└── Support/
You can add more top-level domains freely.
🔧 Included Package: laravel-ddd-commands
This template includes:
"require": { "ldaidone/laravel-ddd-commands": "^0.1.1" }
Which gives you fully integrated generators such as:
php artisan ddd:create-domain Billing php artisan ddd:create-entity Billing/User php artisan ddd:create-use-case Billing/RegisterUser php artisan ddd:create-repository Billing/UserRepository php artisan list ddd
See full documentation here:
🧱 Philosophy
This starter intentionally:
- Removes dynamic configuration for core DDD directories Ensuring predictable project structure and long-term architectural stability.
- Enforces explicit domain boundaries Each domain is isolated inside app/Domains/*.
- Treats Infrastructure as a first-class layer Living under app/Infrastructure.
- Follows Laravel’s conventions wherever possible But strengthens them with DDD clarity.
🧪 Testing
If you extend this template or contribute:
composer test
Support
If this saves you time or helps your project, consider starring ⭐ and consider buying me a coffee! ☕️ — it keeps the ideas flowing!
🤝 Contributing
Pull requests are welcome. Please open an issue first if you're planning large changes.
📄 License
Released under the Apache 2.0 License.
See the LICENSE file for more details.
统计信息
- 总下载量: 0
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 4
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Apache-2.0
- 更新时间: 2025-11-26