Minimal project where I tackle the challenge of maintaining invariants on two entities of a model
For a description of the project, go to Let transaction control to the client Medium Story.
App, where dependencies are injected and flow is triggered.
Repos, Mongo implementation of the repos.
Transaction, Mongo implementation of transaction.
Use Cases, where the domain logic resides.
Entities.
In hindsight, Transaction and Repos should be in the same module