Skip to content

A small but complete example of CQRS and Event-Sourcing using aneshas/eventstore and Ambar

Notifications You must be signed in to change notification settings

aneshas/cqrs-clinic

Repository files navigation

Event-Sourced Clinic

diagram A small but complete example of CQRS and Event-Sourcing in a largely simplified clinic domain. The system is composed of a few http endpoints which expose the following use cases and queries:

  • Command - Admit a patient to the clinic
  • Command - Transfer a patient to a different ward
  • Command - Discharge a patient
  • Query - Fetch the complete patient roster

The system showcases eventstore library which uses postgres as an event store (in this case) along with its convenient abstractions (aggregate, eventstore, projection mechanism, etc...) and Ambar data streaming emulator as the event bus / projection engine which is used to project the events into a read model persisted in mongodb.

How to run

  1. Clone the repository
  2. Run docker-compose up or make up (make stop) to start the services
  3. Visit swagger ui and explore the endpoints

About

A small but complete example of CQRS and Event-Sourcing using aneshas/eventstore and Ambar

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published