noDDDe
A TypeScript framework for Domain-Driven Design, CQRS, and Event Sourcing
noDDDe is a TypeScript framework for building business applications using Domain-Driven Design (DDD), Command Query Responsibility Segregation (CQRS), and Event Sourcing patterns.
It provides a declarative, type-safe way to express domain aggregates using the functional Decider pattern — no base classes, no decorators, just typed objects and pure functions.
Key Principles
- Pure functions over class hierarchies — Aggregates are objects with handler maps, not classes with methods
- Type safety via mapped types —
DefineCommandsandDefineEventsbuild discriminated unions from simple payload maps - The Decider pattern —
initialState+commands(decide) +apply(evolve) - Infrastructure injection — Dependencies are function parameters, not imports; testable by default
Choose Your Path
New to DDD / CQRS / Event Sourcing?
Start with the foundational concepts:
- Messaging — How typed messages drive the architecture
- The Decider Pattern — The functional foundation
- CQRS — Separating reads from writes
- Event Sourcing — Storing events, not state
Want to build something?
Jump into the hands-on guides:
- Installation — Get
@noddde/coreinstalled - Quick Start — Build a bank account aggregate step by step
Know the patterns?
Go directly to the reference:
- Defining Aggregates — The
defineAggregatefunction - Defining Commands — The
DefineCommandsutility type - Defining Events — The
DefineEventsutility type - Domain Configuration — Wiring everything together
Understand the design
Learn why noddde is built the way it is:
- Why the Decider Pattern? — Pure functions vs. OOP
- Why DefineCommands/Events? — Mapped types vs. enums
- Why Injectable Infrastructure? — Testability by design