Welcome to the Design Patterns Examples repository.
This project documents and demonstrates classic software design patterns through practical, idiomatic implementations in multiple programming languages.
Each language implementation is self-contained and follows the conventions and tooling of its ecosystem.
The goal is clarity, correctness, and comparability — not framework abstraction or tooling experiments.
| Language | Coverage |
|---|---|
| Java | |
| TypeScript | |
| Python | |
| Go |
Each language has its own README with setup instructions, structure, and examples:
- TypeScript →
typescript/README.md - Java →
java/README.md - Python →
python/README.md - Go →
go/README.md
design-patterns/
├── typescript/ # TypeScript implementations
├── java/ # Java implementations
├── python/ # Python implementations
├── go/ # Go implementations
├── Makefile # Root orchestration Makefile
└── README.md
The root Makefile only orchestrates common tasks.
All language-specific logic lives inside each directory.
- Singleton
- Factory Method
- Abstract Factory
- Builder
- Prototype
- Adapter
- Composite
- Proxy
- Decorator
- Facade
- Bridge
- Observer
- Strategy
- Command
- State
- Mediator
- Chain of Responsibility
Install the tooling for the language you want to explore:
- TypeScript: Node.js + pnpm
- Java: JDK 17+ and Maven
- Python: Python 3.9+
- Go: Go 1.22+
Each language directory can be used independently by following its README.
make install # Install dependencies for all languages
make test # Run all tests
make clean # Clean build artifacts- Rust
- Implement design patterns in Rust
- Focus on ownership, borrowing, and concurrency trade-offs
This repository exists to:
- Document design pattern knowledge in a concrete, runnable form
- Compare implementations across languages
- Serve as a long-term reference
- Favor correctness and clarity over abstraction
Feel free to explore, fork, or use this repository as a learning reference.