Design Patterns and Low-Level Design Guide
Low-level design interviews ask you to turn a short description into classes and interfaces. This guide starts with a repeatable routine and the SOLID rules, then the three families of patterns, then full worked designs.
All code is TypeScript that was run, and the worked designs include tests.
Who it is for: Developers preparing for object-oriented design rounds and anyone who wants cleaner designs.
10 lessons · Published by Jainik · Last updated
1. Routine and principles
- 1. Design Patterns & LLD · 20 minHow to Run a Low-Level Design Interview, and SOLID in Plain Words
The five-step routine, composition over inheritance, SOLID with before and after examples, and ASCII UML.
2. The patterns
- 2. Design Patterns & LLD · 20 minCreational Patterns: Factory, Builder, Singleton and Friends
Factories, builder, the module singleton and its traps, prototype, and dependency injection as the practical replacement.
- 3. Design Patterns & LLD · 18 minStructural Patterns: Adapter, Decorator, Facade, Proxy and Composite
The intent of each pattern, how to tell them apart, and the JavaScript Proxy object.
- 4. Design Patterns & LLD · 20 minBehavioural Patterns: Strategy, Observer, Command, State and Chain of Responsibility
The five main behavioural patterns plus iterator and template method, with runnable TypeScript.
- 5. Design Patterns & LLD · 20 minPatterns You Already Use: Middleware, Hooks, Dependency Injection, and Anti-Patterns
Express and Koa middleware, EventEmitter, Redux, React, and the anti-patterns that spoil designs.
3. Worked designs
- 6. Design Patterns & LLD · 28 minDesign a Parking Lot
Best-fit and nearest-spot strategies, hourly pricing with a daily cap, and a double-booking race fixed with compare-and-set.
- 7. Design Patterns & LLD · 30 minDesign an LRU Cache and a Hash Map
Chaining and resize, a map plus doubly linked list, TTL, and stampede control.
- 8. Design Patterns & LLD · 30 minDesign a Vending Machine and an Elevator (State Machines)
The State pattern versus a transition table, and elevator scheduling compared by floors travelled.
- 9. Design Patterns & LLD · 30 minDesign a Deck of Cards, Blackjack and a Chat Server (Class Models)
Ace scoring, stacked-deck tests, and a chat server built with the observer pattern.
- 10. Design Patterns & LLD · 32 minDesign a Rate Limiter and a Notification Service (Class Models)
Token bucket and window limiters, channel strategy, backoff with jitter, and idempotency.
More reading orders are on the guides page, and every series is listed on the home page.