Preface

Welcome to Building Conduit.

In this book you will discover how to implement the Command Query Responsibility Segregation and event sourcing (CQRS/ES) pattern in an Elixir application.

This book will take you through the design and build, from scratch, of an exemplary Medium.com clone. The full source code is available to view and clone from GitHub. As each feature is developed, a link to the corresponding Git commit will be provided so you can browse the source code at each stage of development.

The application will be built as if it were a real world project. Including the specification of integration and unit tests to verify the functionality under development.

By the end of this book you should have a solid grasp of how to apply the CQRS/ES pattern to your own Elixir applications.

You will learn how to:

  • Follow test-driven development to build an HTTP API exposing and consuming JSON data.
  • Validate input data using command validation.
  • Create a functional, event sourced domain model.
  • Define a read model and populate it by projecting domain events.
  • Authenticate a user using a JSON Web Token (JWT).