Low-Level Design tutorial
Turn a design into code that is easy to change. Learn OOP, SOLID, UML and design patterns by refactoring and building real classes, checked by hidden tests and drawn as class diagrams as you go.
Course contents
LLD Foundations
- OOP Basics — Learn classes and objects, then the four big ideas of object-oriented code: encapsulation, abstraction, inheritance and polymorphism, with QuickBite examples you can run.
- SOLID Principles — Learn the five SOLID rules with pictures and runnable examples, then fix QuickBite's god-class OrderService until hidden tests pass and the design smells are gone.
- UML Diagrams — Learn to read and draw the two UML diagrams teams really use, class diagrams and sequence diagrams, then turn a QuickBite class diagram into working code.
- Creational Patterns — Learn simple factory, factory method, builder and singleton with QuickBite examples, then replace an if-chain with a notifier factory and add WhatsApp.
- Structural Patterns — Learn adapter, decorator, facade and proxy with QuickBite examples, then adapt two map services to one interface and add a caching decorator.
- Behavioural Patterns — Learn strategy, observer, state, command and chain of responsibility, then turn QuickBite's order status if-chains into state classes with listeners.
- API and Interface Design — Design APIs other code can rely on: clear contracts, one answer shape, input checks, stable error codes and safe versioning, checked by contract tests.
- Concurrency Basics — See race conditions happen, find them with a scheduler that tries every order, and fix them with locks, one-step updates and queues.
LLD Case Studies
- Parking Lot — Design a parking lot: spot sizes, the smallest spot that fits, tickets and fees, then build it against a hidden test suite.
- Elevator — Design an elevator that serves floors fairly: time in steps, a set of requests, and the elevator algorithm, tested step by step.
- LRU Cache — Build a least-recently-used cache with O(1) get and put, using a Map that remembers order, and check it against a speed test.
- Rate Limiter — Build a per-user token bucket rate limiter with lazy refill and an injectable clock, tested with a fake clock.
- Splitwise — Design an expense splitter: equal, exact and percent splits in whole rupees, net balances, and settling up with few payments.
- Library System — Design a library: copies, loans with due days and fines, a three-book limit and a fair waiting list, built against hidden tests.
- Vending Machine — Rebuild a vending machine with the State pattern: coins, change, sold-out items and refunds, with hidden tests and a design check.
- Seat Booking — Design cinema seat booking like BookMyShow: hold then confirm, expiring holds, all-or-nothing groups and a lock tested in every order.