A comprehensive Domain-Driven Design example project implementing a library system with strategic analysis and tactical patterns.
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.
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.
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.
A comprehensive Domain-Driven Design example with problem space strategic analysis and various tactical patterns.
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.
Uses hexagonal architecture to separate domain logic from infrastructure, ensuring testability and flexibility, evidenced by the project structure and ArchUnit rules enforcing layer boundaries.
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.
Models business states as distinct types (e.g., AvailableBook, BookOnHold) to enforce invariants at compile time, demonstrated in method signatures that prevent invalid operations.
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.
Assumes familiarity with DDD, Event Storming, and functional programming concepts, making it less accessible for developers without prior experience in these areas.
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.
This is the new home of the original DDD Sample app (previously hosted at sf.net)..
These are the sample Bounded Contexts from the book "Implementing Domain-Driven Design" by Vaughn Vernon: http://vaughnvernon.co/?page_id=168
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.