Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

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

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Domain-Driven Design
  3. DDD By Examples - Library

DDD By Examples - Library

MITJava

A comprehensive Domain-Driven Design example project implementing a library system with strategic analysis and tactical patterns.

GitHubGitHub
5.8k stars819 forks0 contributors

What is DDD By Examples - Library?

DDD by Examples Library is a comprehensive, open-source example project that demonstrates how to apply Domain-Driven Design principles to a real-world library management system. It provides a full implementation of strategic design (bounded contexts) and tactical patterns (aggregates, domain events) based on business requirements discovered through Event Storming. The project serves as a learning resource and reference for building domain-centric applications with clean architecture.

Target Audience

Software developers, architects, and teams learning or practicing Domain-Driven Design, particularly those working on complex business domains in Java. It's also valuable for engineers interested in hexagonal architecture, CQRS, and functional programming styles in enterprise applications.

Value Proposition

It offers a complete, production-like DDD example with detailed documentation and tests, bridging the gap between theory and practice. Unlike generic tutorials, it showcases realistic trade-offs (like immediate vs. eventual consistency) and integrates modern tools (ArchUnit, Vavr) while keeping the domain logic isolated from frameworks.

Overview

A comprehensive Domain-Driven Design example with problem space strategic analysis and various tactical patterns.

Use Cases

Best For

  • Learning Domain-Driven Design through a fully implemented case study
  • Understanding how to apply Event Storming and Example Mapping in practice
  • Implementing hexagonal architecture with Spring Boot in Java
  • Exploring CQRS and event-driven communication between aggregates
  • Studying functional programming patterns in a domain model
  • Enforcing architectural boundaries with ArchUnit in a modular monolith

Not Ideal For

  • Projects requiring rapid prototyping with minimal domain complexity
  • Teams heavily invested in JPA or Hibernate ORM solutions
  • Developers seeking a plug-and-play library for common business logic
  • Environments where immediate consistency is a hard requirement without event-driven architecture trade-offs

Pros & Cons

Pros

Comprehensive DDD Example

Provides a full implementation from Event Storming to code, with detailed documentation on bounded contexts and aggregates, as shown in the README's domain description and process discovery sections.

Hexagonal Architecture Integration

Uses hexagonal architecture to separate domain logic from infrastructure, ensuring testability and flexibility, evidenced by the project structure and ArchUnit rules enforcing layer boundaries.

Functional Programming Style

Leverages immutable objects, pure functions, and Vavr monads for domain logic, reducing side effects and improving reliability, as described in the 'Functional thinking' section with code examples.

Type-Safe Domain Modeling

Models business states as distinct types (e.g., AvailableBook, BookOnHold) to enforce invariants at compile time, demonstrated in method signatures that prevent invalid operations.

Cons

No ORM Support

Deliberately avoids ORM frameworks, relying on plain SQL and JdbcTemplate, which may increase persistence complexity and require manual query management for teams accustomed to JPA.

Steep Learning Curve

Assumes familiarity with DDD, Event Storming, and functional programming concepts, making it less accessible for developers without prior experience in these areas.

Complex Setup and Tooling

Relies on specific tools like Vavr, ArchUnit, and custom event handling implementations, which might not integrate easily with existing projects or require additional configuration effort.

Frequently Asked Questions

Quick Stats

Stars5,780
Forks819
Contributors0
Open Issues18
Last commit2 years ago
CreatedSince 2019

Tags

#crud#functional-programming#software-architecture#cqrs#functions#ddd-architecture#domain-driven-design#ddd#java#event-storming#hexagonal-architecture#spring-boot#aggregate-root#modular-monolith

Built With

M
Maven
S
Spring Boot
J
Java
D
Docker
G
Groovy

Included in

Domain-Driven Design12.2k
Auto-fetched 1 day ago

Related Projects

DDDSampleDDDSample

This is the new home of the original DDD Sample app (previously hosted at sf.net)..

Stars5,268
Forks1,510
Last commit10 months ago
IDDD SamplesIDDD Samples

These are the sample Bounded Contexts from the book "Implementing Domain-Driven Design" by Vaughn Vernon: http://vaughnvernon.co/?page_id=168

Stars3,929
Forks920
Last commit2 years 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