Incident

Event Sourcing and CQRS in Elixir made simple.

Goals

Event Sourcing and CQRS

In a nutshell, Event Sourcing ensures that all changes to application state are stored as a sequence of events. But if you are new to Event Sourcing and CQRS I highly recommend watch Greg Young's presentation at Code on the Beach 2014 before moving forward.

Main Components

Roadmap

Next Steps

Done

Installation

If available in Hex, the package can be installed by adding incident to your list of dependencies in mix.exs:

def deps do
  [
    {:incident, "~> 0.1.0"}
  ]
end

Configuration

Event Store and Projection Store Setup

Configure incidentEvent Store and Projection Store adapters and if desired, some options. The options will be passed in during the adapter initialization.

config :incident, :event_store, adapter: Incident.EventStore.InMemoryAdapter,
  options: [
    initial_state: []
]

config :incident, :projection_store, adapter: Incident.ProjectionStore.InMemoryAdapter,
  options: [
    initial_state: %{}
]

Getting Started

There is an example application that implements a Bank application for reference, including all the details and usage in IEx as well.

Documentation

Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/incident.