Simple (and WIP) package demonstrating/testing features of the Neos.Cqrs package
- Install via git or composer
- Make sure that the Neos.Cqrs package (including https://github.com/neos/Neos.Cqrs/pull/62/files) is installed
- head your browser to http://localhost/users
Via "Sign up" you can register new users. If you "sign in" you should be able to rename the user with the same username
The package comes with a (very simple) AccountService that demonstrates/tests how event-sourced systems can interact with other APIs.
By hashing the password already in the command we minimize leakage (idea by Robert Lemke)
With a simple AOP Aspect we log calls to all command handlers - demonstrating that we don't need a CommandBus
to intercept these
A CommandController demonstrates interaction with aggregates from CLI
The aggregate is the API. The provided policy shows how we can intercept calls to User::rename()
to be only allowed by the "owner" & administrators.
A corresponding ViewHelper demonstrates how this can be tested proactively.
By copying the event stream version to the Read Model, we can detect outdated aggregates: Try changing the same user from two browser windows without reloading and you'll see an error. Note Currently we just catch the exception and display an error in the controller