This repository is a comprehensive catalog of software design pattern implementations in Java, maintained by Ilkka Seppรคlรค (iluwatar). It contains over 300 self-contained modules, each demonstrating a classic GoF pattern, architectural pattern, concurrency pattern, or microservices pattern. The code is educational and demonstrative rather than production-ready, with each module providing a runnable App.java entry point, clear class hierarchies, and accompanying unit tests. The project serves as a reference for developers learning design patterns, and the implementations are intentionally simplified to focus on the pattern's mechanics. The architecture is modular: each pattern lives in its own Maven module with a consistent structure (main source, test source, documentation images, and localized READMEs). Some modules integrate with Spring Boot, JPA/Hibernate, Kafka, or MongoDB for realistic context, but the vast majority use in-memory data structures. The codebase spans Java 8 to modern features, with extensive use of Lombok, SLF4J, and JUnit 5. While not a single deployable application, the repository effectively demonstrates how patterns solve common design problems. Notable for both its breadth and craftsmanship, the repository includes patterns from creational (Builder, Factory), structural (Adapter, Proxy), behavioral (Observer, Strategy), and architectural (Hexagonal, Clean Architecture) categories. Many modules implement reusable abstractions (e.g., Converter, Specification, Filterer, EventDispatcher) that can be extracted and used in new projects. The project's high star count and active contributor base reflect its status as a primary learning resource for Java design patterns.
This repository is an educational resource focused on teaching the Gang of Four (GoF) design patterns through comprehensive explanations, code examples, and diagrams. It covers creational, structural, and behavioral patterns, with each pattern accompanied by detailed markdown documentation, visual diagrams, and runnable code samples in both Java and Kotlin. The project structure organizes content by pattern type, making it easy to locate and study specific patterns. The code examples demonstrate practical implementations of each pattern in context-specific scenarios, such as a banking system for the Command pattern, a notification system for the Decorator pattern, and a file system for the Composite pattern. While the build configuration defaults to running a Singleton demo, each pattern includes independent main functions or demo classes that can be executed separately. The repository also features automated workflows for building and deploying the documentation via GitHub Pages. Despite some maintenance challenges like duplicate documentation files (marked for removal in a future version) and the coexistence of Java and Kotlin examples, the project shows active maintenance through contribution guidelines, regular updates, and a clear migration path toward consolidating documentation. The examples are well-crafted, self-contained, and illustrate core object-oriented design principles effectively, making them valuable for both learning and reference purposes.