- Think about Shared Kernel (http://ddd.fed.wiki.org/view/welcome-visitors/view/domain-driven-design/view/shared-kernel)
src/
Infrastructure/
Auth/
... // e.g. Symfony/ (acl, voters)
Framework/
... // e.g. Symfony kernel or Zend Expressive
Persistence/
Doctrine/
... // types, create factory, etc.
InMemory/
...
<KV>/ // e.g. Redis
...
Bus/
... // command, event buses
...
Core/
Profile/
Domain/
Account // aggregate
AccountRepository // interface
AccountCreated // domain event
... // entities, vo, factories, exceptions ...
Application/
Create/
CreateAccountCommand
CreateAccountCommandHandler
Query/
FindAccountQuery // or FindAccount
Persistence/
DQL/ // or Doctrine
AccountRepositoryDoctrine // or AccountRepositoryMySQL
... // orm mappings, etc
...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Infrastructure/ // still not sure if it's even needed here
Http/
CreateAccountAction // __invoke
...
Console/
CreateAccount
...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<BoundedContext>/
...