This example project is based on the great work done in Domain Driven Design and API Platform 3.
The architecture follows:
- Domain Driven Design and hexagonal architecture
- CQRS
- Event Sourcing
It runs on frankenphp, uses Symfony 7, API Platform 4 for exposing the API and Ecotone for managing Event Sourcing.
If you want to try to use and tweak that example, you can follow these steps:
- Run
git clone https://github.com/alanpoulain/apip-eventsourcingto clone the project - Run
make installto install the project - Run
make startto up your containers - Visit https://localhost/api and play with your app!
That implementation is pragmatic and far for being uncriticable. It's mainly a conceptual approach to use API Platform in order to defer operations to command and query buses.
It could and should be improved, therefore feel free to submit issues and pull requests if something isn't relevant to your use cases or isn't clean enough.
To ensure that the CI will succeed whenever contributing, make sure that either static analysis and tests are successful by running make ci
Mathias Arlaud with the help of Robin Chalas