5 min read Dark Mode System — Low-Level Design A dark mode system persists a user’s theme preference, propagates it across devices, and […] Read article
6 min read What is a Follow System? A follow system lets users subscribe to updates from other users or entities: follow a […] Read article
6 min read What is Subscription Management? A subscription management system handles recurring billing: plans, upgrades/downgrades, trial periods, proration, cancellations, and payment retries. […] Read article
7 min read Requirements Users share a unique referral code or link to invite new users Referrer earns a reward when a referred […] Read article
7 min read What is a Feature Store? A feature store is a centralized repository for ML features. It solves the “feature engineering […] Read article
7 min read What is Event Sourcing? In a traditional system, the database stores the current state: “Account balance = $500.” In event […] Read article
7 min read Requirements Users can post comments on content items (posts, videos, products) Threaded replies (nested comments) up to N levels deep […] Read article
6 min read Requirements Create and manage discount coupons (percentage, fixed amount, free shipping) Apply coupon to a cart: validate, compute discount, prevent […] Read article
6 min read When to Use Two Pointers Two pointers reduce O(n²) brute force to O(n) or O(n log n) by exploiting sorted […] Read article
6 min read Requirements Search available rooms for a date range (check-in, check-out, guests, room type) Book a room: prevent double-booking the same […] Read article