collections should be atoms too

extend example with different entity types
add repository unit tests