Implement a cart validation service with tax calculation and discount handling.
composer install
composer start
# → http://localhost:8080curl http://localhost:8080/
# {"app":"Cart Validation Test","status":"running"}composer testsrc/
├── Domain/ # Pure business logic (no dependencies)
│ ├── Entity/
│ ├── ValueObject/ # Money, Percentage
│ ├── Service/ # CartCalculator
│ └── Exception/
├── Application/ # Use cases and orchestration
│ ├── DTO/
│ ├── Service/ # DiscountService, TaxService
│ └── UseCase/
├── Infrastructure/
└── Presentation/
└── Controller/
See SPECIFICATIONS.md for full details.
- Start with
MoneyandPercentage(Value Objects) - Write tests first (TDD)
- All amounts in cents (integers, no floats)
- Domain layer has zero external dependencies
Good luck! 🍀