Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Rails
  3. aggregate_root

aggregate_root

MITRubyv2.18.0

A Ruby library for implementing event-driven architectures in Rails applications, providing event publishing, storage, and subscription.

Visit WebsiteGitHubGitHub
1.5k stars128 forks0 contributors

What is aggregate_root?

Rails Event Store is a Ruby library that implements an event store for Rails applications, enabling developers to publish, store, and subscribe to events. It solves the problem of tightly coupled architectures by providing a robust foundation for event-driven design, audit logging, and event sourcing. It acts as a central hub for domain events, replacing patterns like ActiveRecord callbacks with more explicit and scalable event handling.

Target Audience

Rails developers and teams building complex applications who want to adopt event-driven architectures, implement event sourcing, or improve system decoupling and observability. It's particularly valuable for projects needing audit trails, domain event capture, or hexagonal architecture patterns.

Value Proposition

Developers choose Rails Event Store for its deep Rails integration, comprehensive feature set for event management, and strong emphasis on testing and reliability. It offers a battle-tested, open-source alternative to building custom event systems, with extensive documentation and a modular gem ecosystem that extends its capabilities.

Overview

A Ruby implementation of an Event Store based on Active Record

Use Cases

Best For

  • Implementing event-driven architectures in Rails applications
  • Building audit logs and compliance trails for domain actions
  • Decoupling business logic from side-effects like notifications or metrics
  • Creating read-models and projections for complex query needs
  • Replacing ActiveRecord callbacks with explicit domain events
  • Adopting event sourcing patterns for domain model persistence

Not Ideal For

  • Microservices architectures using multiple programming languages or non-Rails frameworks
  • Applications requiring high-throughput, real-time event streaming like financial trading platforms
  • Simple CRUD applications where traditional ActiveRecord patterns suffice without audit or decoupling needs

Pros & Cons

Pros

Seamless Rails Integration

Designed specifically for Rails, it hooks into ActiveRecord for persistence and follows Rails conventions, reducing setup friction as highlighted in the documentation.

Comprehensive Event Handling

Supports publish-subscribe with synchronous and asynchronous handlers, enabling decoupled architecture and side-effect extraction from controllers, as described in use cases.

Robust Testing Culture

The project enforces 100% mutation testing coverage across gems, ensuring high reliability and encouraging best practices in event-driven code.

Extensible Gem Ecosystem

Modular gems like ruby_event_store-browser for UI and ruby_event_store-rspec for testing provide tailored extensions without bloating the core, as shown in the gem list.

Cons

Active Record Lock-in

Event storage is tightly coupled to ActiveRecord, making it less suitable for apps using alternative ORMs like ROM or NoSQL databases without extra work from contributed gems.

Architectural Overhead

Implementing full event-sourcing requires significant design changes and can introduce complexity that outweighs benefits for straightforward domains, despite the library's practicality.

Steep Learning Curve

Adopting event-driven patterns forces teams to move beyond familiar ActiveRecord callbacks, requiring upfront investment in new mental models for events and aggregates.

Frequently Asked Questions

Quick Stats

Stars1,526
Forks128
Contributors0
Open Issues6
Last commit2 days ago
CreatedSince 2015

Tags

#event-driven#event-driven-architecture#rails#cqrs#event-sourcing#domain-driven-design#ddd#cqrs-es#audit-log#hexagonal-architecture#active-record#aggregate-root#pub-sub#ruby

Built With

R
Rails
R
Ruby
R
RSpec
A
Active Record

Links & Resources

Website

Included in

Rails3.9k
Auto-fetched 1 day ago

Related Projects

devisedevise

Flexible authentication solution for Rails with Warden.

Stars24,341
Forks5,504
Last commit14 days ago
spreespree

Open-source headless eCommerce platform with REST API, TypeScript SDK, and Next.js storefront for cross-border, B2B or marketplace eCommerce.

Stars15,360
Forks5,244
Last commit2 days ago
activeadminactiveadmin

The administration framework for Ruby on Rails applications.

Stars9,684
Forks3,325
Last commit1 day ago
CarrierwaveCarrierwave

Classier solution for file uploads for Rails, Sinatra and other Ruby web frameworks

Stars8,774
Forks1,650
Last commit3 months ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub