This is the application that powers my blog at paulcourt.co.uk. It was very much an exercise in learning about Event Sourcing and CQRS - and as my first attempt at such, I expect there to be a few bits that more experienced CQRS'ers my find strange.
If that is the case, then I am happy for you to open issues or pull requests in the name of improving my understanding of these concepts.
This is where you are going to find all the front end code and the main
index.php which bootstraps the app
and sets up the controllers and DI container, etc.
The twig based templates used for all page rendering.
This contains the main appliction DI container, controllers and core event sourcing code. The main components
MessageBus (allows any number of listeners to subscribe to events/messages), a
CommandBus (Only allows one
listener to subscribe per command), the
EventStore abstraction and a
GigaFactory (A factoy of factories)
Basic MySQL databse abstraction layer.
One goal I wanted to achive with the setup was to have the core event-sourcing setup separated from any "domain" logic. So I implemented the idea of modules which would be self contained blocks of domain logic.
In this case I have
User module to handle all the aspects of user registration, authentication, etc. and
Article module to handle all the logic related to creating and displaying the actual blog posts.
The idea being that each module would only know about the core event store components and not each other - making the modules re-usable in different applications.