This repository is a collection of code examples that demonstrate various design patterns, implemented in JavaScript/TypeScript.
The main objective is to strengthen my understanding of software design patterns by applying them in real-world scenarios. Each pattern is implemented in isolation and includes usage examples.
- Singleton
- Factory
- Strategy
- Observer
- Adapter
- Decorator
- and more...
Each pattern is located in its own directory, following a clear and consistent folder structure:
/src /pattern-type/patter-name
- index.ts
- README.md
- TypeScript
- Node.js
To run the examples:
npm install
npm run dev-<factory_name>