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. 1. Design Patterns & LLD · 20 min
    How 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

  1. 2. Design Patterns & LLD · 20 min
    Creational Patterns: Factory, Builder, Singleton and Friends

    Factories, builder, the module singleton and its traps, prototype, and dependency injection as the practical replacement.

  2. 3. Design Patterns & LLD · 18 min
    Structural Patterns: Adapter, Decorator, Facade, Proxy and Composite

    The intent of each pattern, how to tell them apart, and the JavaScript Proxy object.

  3. 4. Design Patterns & LLD · 20 min
    Behavioural Patterns: Strategy, Observer, Command, State and Chain of Responsibility

    The five main behavioural patterns plus iterator and template method, with runnable TypeScript.

  4. 5. Design Patterns & LLD · 20 min
    Patterns 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

  1. 6. Design Patterns & LLD · 28 min
    Design 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.

  2. 7. Design Patterns & LLD · 30 min
    Design an LRU Cache and a Hash Map

    Chaining and resize, a map plus doubly linked list, TTL, and stampede control.

  3. 8. Design Patterns & LLD · 30 min
    Design a Vending Machine and an Elevator (State Machines)

    The State pattern versus a transition table, and elevator scheduling compared by floors travelled.

  4. 9. Design Patterns & LLD · 30 min
    Design 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.

  5. 10. Design Patterns & LLD · 32 min
    Design 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.