Design patterns are proven OOP solutions to recurring problems. These five appear in almost every codebase — see the Design Patterns course for the full catalogue. Pattern Problem it solves You have seen it in… Factory Create objects without hard-coding concrete classes Calendar.getInstance(), React.createElement Singleton Exactly one shared instance Loggers, configuration (prefer DI scopes) Strategy Swap algorithms at runtime Sorting comparators, payment providers Observer Notify many listeners of changes DOM events, RxJS, Kafka consumers Decorator Add behaviour without subclassing Java I/O streams, Python @decorators, middleware The example below implements all five in TypeScript and can be run in the Playground.