• Stars
    star
    347
  • Rank 122,141 (Top 3 %)
  • Language
    Elixir
  • License
    MIT License
  • Created over 7 years ago
  • Updated over 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

RealWorld example backend implementing the CQRS/ES pattern in Elixir and Phoenix

Conduit

Discover why functional languages, such as Elixir, are ideally suited to building applications following the command query responsibility segregation and event sourcing (CQRS/ES) pattern.

Conduit is a blogging platform, an exemplary Medium.com clone, built as a Phoenix web application.

This is the full source code to accompany the "Building Conduit" eBook.

This book is for anyone who has an interest in CQRS/ES and Elixir. It demonstrates step-by-step how to build an Elixir application implementing the CQRS/ES pattern using the Commanded open source library.


MIT License

Build Status


Getting started

Conduit is an Elixir application using Phoenix 1.4 and PostgreSQL for persistence.

Prerequisites

You must install the following dependencies before starting:

Configuring Conduit

  1. Clone the Git repo from GitHub:

    $ git clone https://github.com/slashdotdash/conduit.git
  2. Install mix dependencies:

    $ cd conduit
    $ mix deps.get
  3. Create the event store database:

    $ mix do event_store.create, event_store.init
  4. Create the read model store database:

    $ mix do ecto.create, ecto.migrate
  5. Run the Phoenix server:

    $ mix phx.server

This will start the web server on localhost, port 4000: http://0.0.0.0:4000

This application only includes the API back-end, serving JSON requests.

You need to choose a front-end from those listed in the RealWorld repo. Follow the installation instructions for the front-end you select. The most popular implementations are listed below.

Any of these front-ends should integrate with the Conduit back-end due to their common API.

Running the tests

MIX_ENV=test mix event_store.create
MIX_ENV=test mix event_store.init
MIX_ENV=test mix ecto.create
MIX_ENV=test mix ecto.migrate
mix test

Need help?

Please submit an issue if you encounter a problem, or need support.

More Repositories

1

awesome-elixir-cqrs

A curated list of awesome Elixir and Command Query Responsibility Segregation (CQRS) resources.
704
star
2

jekyll-lunr-js-search

[UNSUPPORTED] Jekyll + lunr.js = static websites with powerful full-text search using JavaScript
JavaScript
549
star
3

faker-cs

C# port of the Ruby Faker gem (http://faker.rubyforge.org/)
C#
241
star
4

node-ledger-web

Web front-end to access ledger cli data.
JavaScript
144
star
5

saas-startup-checklist

SaaS Startup Checklist
128
star
6

phoenix-react-redux-example

Phoenix framework example using React and Redux
JavaScript
110
star
7

eventsourced

Functional domain models with event sourcing in Elixir
Elixir
104
star
8

rcqrs

Ruby CQRS with Event Sourcing library
Ruby
98
star
9

cqrs-best-practices

Best practices, guidance, and anti-patterns to avoid when building an application following CQRS/ES principles
95
star
10

node-pipes-and-filters

Pipes and Filters for Node.js to divide a larger processing task into a sequence of smaller, independent processing steps (Filters) that are connected by channels (Pipes).
JavaScript
80
star
11

segment-challenge

Segment Challenge is an Elixir Phoenix web application built using Commanded
Elixir
76
star
12

node-ledger

API for the ledger command-line interface (ledger-cli.org).
JavaScript
72
star
13

strava

Elixir wrapper for the Strava API (v3)
Elixir
46
star
14

til

Today I Learned
Elixir
44
star
15

eventstore-migrator

Copy & transform migration strategy for Elixir EventStore
Elixir
31
star
16

node-ledger-rest

REST web service to access the Ledger command-line interface (http://ledger-cli.org/).
JavaScript
27
star
17

stateless

[DEPRECATED] A C# Hierarchical State Machine
C#
23
star
18

Treaty

Rules Engine written in TypeScript implementing the Rete algorithm
20
star
19

domain-driven-js

Domain-driven JavaScript
20
star
20

gift-card-demo

Commanded demo application focused around a simple giftcard domain.
Elixir
20
star
21

implementing-cqrs-in-elixir

An introduction to implementing Command Query Responsibility Segregation (CQRS) in Elixir applications.
17
star
22

node-ledger-import

Import accounting transactions from CSV files to Ledger format.
JavaScript
11
star
23

cqrs-journey-pdf

CQRS Journey Guide converted to PDF for eBook reading.
Ruby
11
star
24

rcqrs-rails

Rails 3 plugin to use the RCQRS library
Ruby
9
star
25

rcqrs-blog

Rails 3 blog app using the RCQRS library
JavaScript
9
star
26

typescript-intro-presentation

Introduction to TypeScript presentation
JavaScript
2
star
27

Duplicity

Duplicate file system changes from one directory to another.
C#
2
star
28

kv

Key/value store using Elixir and Commanded CQRS/ES
Elixir
2
star
29

calculator

Attempt to define supported operations using `before_compile` macro
Elixir
2
star
30

DotNetFlow

An ASP.NET MVC web application for sharing links that demonstrates using CQRS with event sourcing. Inspired by RubyFlow.
JavaScript
2
star
31

eventstore-export

Export events stored in an EventStore database to disk
Elixir
2
star
32

notice

Notice board for tasks
JavaScript
1
star
33

ledger-import

Ruby
1
star
34

commanded_aggregate_race

Elixir
1
star
35

broadway-show

Broadway experiment using a custom `GenStage` producer with partitioning which stops processing on message failure
Elixir
1
star
36

nerves_agile_octopus

Display Agile Octopus electricity prices on an Inky pHAT display connected to a Raspberry Pi using Nerves.
Elixir
1
star