REST API consumer library
Consume a third-party menu API, list its products and push a correction back. No framework allowed — so the structure has to carry the weight on its own.
- Layered by intent. Domain, Application, Infrastructure and Presentation stay independently replaceable.
- Ports and adapters. Repository interfaces live in the domain; the Guzzle-backed implementations never leak into it.
- Use cases, not controllers. GetProductList and UpdateProduct hold the logic — HTTP actions only translate it.
- Tested against a stubbed API. Functional tests run over WireMock in Docker, one make away.
- src/
- Domain/models & repository ports
- Models/Menu · Product
- Repository/interfaces only
- Application/use cases
- UseCase/GetProductList · UpdateProduct
- Infrastructure/the outside world
- Client/ApiGreatFoodClient
- Repository/API-backed adapters
- Presentation/PublicApi/V1 actions
- test/functional, over WireMock














