Skip to content

bwaidelich/Wwwision.Users

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Wwwision.Users

Simple (and WIP) package demonstrating/testing features of the Neos.Cqrs package

Setup

  1. Install via git or composer
  2. Make sure that the Neos.Cqrs package (including https://github.com/neos/Neos.Cqrs/pull/62/files) is installed
  3. 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

Features

Integration of 3rd party services

The package comes with a (very simple) AccountService that demonstrates/tests how event-sourced systems can interact with other APIs.

Commands with sensitive data

By hashing the password already in the command we minimize leakage (idea by Robert Lemke)

Logging commands

With a simple AOP Aspect we log calls to all command handlers - demonstrating that we don't need a CommandBus to intercept these

CLI interaction

A CommandController demonstrates interaction with aggregates from CLI

Policy with runtime evaluations

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.

Optimistic locking

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

About

Simple (and WIP) package demonstrating/testing features of the Neos.Cqrs package

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published