using openApi and hexagonal architecture
For didactic reasons it has been the autogenerated openapi bundle inside the project, we should make another repo and install it in this repository with de composer
docker composer take php-fpm, nginx images from my dockerhub if you want to see the implementation goes to the github repository
assuming you have docker installed
docker-compose -f dev-docker-compose.yml up
run bash of the php-fpm container and run
composer install
to run Unitary tests
./vendor/phpunit/phpunit/phpunit tests/Unitary --testdox
you could import in Postman the integration test with the postman environment
-
/app
- src
- Adapter
- Application
- Domain
- var
- app.db --> sqlite database will be created in this folder on setup
- tests
- Unitary
- Adapter
- Application
- Domain
- Unitary
- src
-
dev-docker-compose.yml
-
docker-compose.yml
-
openapi.yaml
Centering the attention on the hexagonal architecture
- Adapter
- in --> in adapters
- Api
- Handler --> handler of the controllers of openapi bundle
- openapi-issue-tracker-bundle --> autogerated from openapi
- Api
- out -->
- Persistence
- Serializer
- in --> in adapters
- Application
- Model --> generic models of Application layer
- Port
- in
- USE_CASES_FOLDERS
- out
- INTERFACES_OF_OUT_ADAPTERS
- in
- Service --> service available from outside of application to execute Use cases
- Domain
- DOMAIN_MODEL_FOLDERS
- AdapterIn-Application
- two way mapping strategy in modifying use cases
- Web Model autogenerated in openapi
- command in UseCase interface
- Transform Command to Domain Model in useCase service implementation
- two way mapping strategy in modifying use cases
- Application-Domain
- two way mapping strategy in modifying use cases
- Domain-AdapterOut
- two way mapping strategy in modifying use cases