Welcome to Ocoda Event Sourcing

Ocoda Event Sourcing is a powerful library designed to simplify the implementation of advanced architectural patterns in your NestJS application. It provides essential building blocks to help you implement Domain-Driven Design (DDD), leveraging Event Sourcing and CQRS to tackle the complexities of modern systems.

Whether you're building microservices, event-driven systems, or simply want a clean and scalable architecture, this library offers the tools you need to create maintainable, business-aligned solutions.

Why Use Ocoda Event Sourcing?

While NestJS provides the @nestjs/cqrs (opens in a new tab) library for basic CQRS functionality, Ocoda Event Sourcing goes beyond by focusing on Domain-Driven Design and offering deeper integration with Event Sourcing. It gives you a more feature-rich framework to tackle complex business logic, ensure consistency, and manage state in a more scalable and flexible way.

Key Features:

  • Domain-Driven Design (DDD): Implement core DDD principles with ease, including aggregates, value objects, and repositories.
  • CQRS (Command Query Responsibility Segregation): Cleanly separate the responsibility of handling commands and queries for better scalability and maintainability.
  • Event Sourcing: Capture every change in your system as an immutable event, allowing you to rebuild the entire state and maintain a full audit trail.

What You'll Find Here

This documentation is focused on guiding you through using the library to implement DDD, Event Sourcing, and CQRS in your NestJS projects. While it doesn't dive deeply into explaining these concepts, we provide:

  • Step-by-step usage guides to help you integrate the library seamlessly into your application.
  • A brief overview of the core patterns—DDD, CQRS, and Event Sourcing—in the Patterns section for those who need a quick refresher.
  • A curated list of resources for deeper learning on the Further Reading page.

Get Started

Ready to dive in? Head over to the Getting Started guide and begin implementing a scalable and maintainable architecture for your NestJS application with Ocoda Event Sourcing.