This Commanded demo application focuses around a simple giftcard domain, designed to show how to configure and use the library.
It is heavily inspired by the Axon Framework demo application.
There are just two events in the lifecycle of a gift card:
- Issued: a new gift card gets created with some amount of money stored.
- Redeemed: all or part of the monetary value stored on the gift card is used to purchase something.
-
Clone the git repo:
git clone https://github.com/slashdotdash/gift-card-demo.git
-
Get mix dependencies:
mix deps.get
-
Create and initialise the database:
mix setup
In this demo the write (event store) and read (projections) models share the same database (named giftcard_<env>
). In a production environment you might choose to configure and use two separate databases, one for each model.