Get Started · Phoenix Framework

Get Started with ReckonDB

Everything you need to build scalable, event-driven applications with ReckonDB.

Installation

Set up ReckonDB via Hex or Docker

Architecture

Understand the core components

Best Practices

Event sourcing guidelines

Quick Start

Get up and running fast

Installation Methods

Installation Methods

Hex Package Manager

For BEAM ecosystem projects. Integrates seamlessly with Phoenix, Commanded, and other Elixir libraries.

Add to your mix.exs:

defp deps do
  [
    {:ex_esdb, "~> 0.5.1"},
    {:ex_esdb_commanded, "~> 0.2.4"},
    {:commanded, "~> 1.4"}
  ]
end

Commanded Integration

ReckonDB works perfectly with Commanded for CQRS/Event Sourcing applications.

Docker Container

Pre-configured container with ReckonDB Server and RevProx+LoadBalancer ready to use.

Quick start with Docker:

docker run -p 8080:8080 -p 2113:2113 \
  reckondb/reckondb:latest

Ready to use

Includes both Event Store and API Gateway with sensible defaults.

Core Architecture

Core Architecture

ReckonDB Server

The core Event Store built on ExESDB. Handles event persistence, stream management, and guarantees event ordering.

Features:

  • ACID transactions for events
  • Optimistic concurrency control
  • Built-in event versioning
  • Horizontal scaling support

RevProx + LoadBalancer

Gateway API and Load Balancer built on ExESDB Gater. Provides REST/GraphQL APIs and intelligent request routing.

Features:

  • RESTful API endpoints
  • GraphQL subscriptions
  • Smart load balancing
  • WebSocket support

Phoenix Umbrella App Support

ReckonDB is designed to work seamlessly with Phoenix Umbrella applications, enabling you to build modular, scalable systems with clear bounded contexts.

Perfect for:

  • Domain-driven design
  • Microservices architecture
  • Multi-tenant applications

Benefits:

  • Isolated event stores per domain
  • Shared infrastructure
  • Easy deployment

Recommended Architecture Pattern

Based on our comprehensive implementation guidelines, we recommend using a vertical slicing architecture with clear bounded contexts.

reckon_[domain]/
|-- lib/
|   |-- reckon_[domain]/
|   |   |-- [business_operation]/
|   |   |   |-- command.ex
|   |   |   |-- event.ex
|   |   |   `-- handler.ex
|   |   `-- projections/
|   `-- mix/tasks/
|-- config/
`-- test/

Implementation Guidelines

Implementation Guidelines

Event Sourcing Best Practices

✅ Do This:

  • Use business-meaningful event names like AccountActivated
  • Design events as immutable facts about what happened
  • Use vertical slicing architecture for bounded contexts
  • Implement proper aggregate boundaries

❌ Avoid This:

  • Generic CRUD events like UserUpdated
  • Storing current state instead of events
  • Large aggregates with many responsibilities
  • Directly coupling domains together

Quick Start Guide

Get your first ReckonDB application running in minutes.

  1. Install: Add ReckonDB to your project dependencies
  2. Configure: Set up your event store configuration
  3. Build: Create your first commands and events