1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
//! # cqrs
//!
//! `cqrs` is an event-driven framework for writing software that uses events as
//! the "source of truth" and implements command–query responsibility separation (CQRS).
//!
//! The framework is built around a few key concepts:
//!
//! * _Events_: The things that happened in the system
//! * _Aggregates_: Projections of events that calculate a view of the current
//! state of the system
//! * _Commands_: Intentions which, when executed against an aggregate, may produce
//! zero or more events, or which may be prohibited by the current state of
//! an aggregate
//! * _Reactions_: Processes that execute an action when certain events occur
//! in the system
//!
//! The framework is written to be applicable to a generic backend, with an
//! implementation provided for a PostgreSQL backend.
//!
//! For an example of how to construct a domain which includes aggregates, events,
//! and commands, look at the `cqrs-todo-core` crate, which is a simple to-do list
//! implementation.
//!
//! The source repository also contains a binary in the `cqrs-todoql-psql` directory
//! which demonstrates the use of the `todo` domain in concert with the PostgreSQL
//! backend and a GraphQL frontend using the [`juniper`][juniper] crate.
//!
//! [juniper]: https://crates.io/crates/juniper
pub use crate;
pub use *;