10 min read Problem Statement Design a content moderation system for a social platform. User-generated content (text, images, video) must be screened before […] Read article
6 min read Core Entities Product: product_id, sku, name, category_id, unit_cost, unit_weight_grams, dimensions (JSONB: length, width, height in mm), reorder_point, reorder_quantity, lead_time_days, is_active. […] Read article
5 min read 1D DP Space Optimization # Fibonacci: O(n) -> O(1) space def fib(n: int) -> int: if n int: prev2 = […] Read article
5 min read Core Entities User: user_id, name, email, role (EMPLOYEE, MANAGER, ADMIN), hourly_rate (default), timezone, created_at. Project: project_id, name, client_id, status (ACTIVE, […] Read article
5 min read Core Entities Survey: survey_id, creator_id, title, description, status (DRAFT, ACTIVE, PAUSED, CLOSED), settings (JSONB: allow_anonymous, one_response_per_user, show_progress_bar, randomize_questions, response_limit), start_date, […] Read article
7 min read Core Entities Poll: poll_id, creator_id, question, poll_type (SINGLE_CHOICE, MULTIPLE_CHOICE, RANKED, RATING), status (DRAFT, ACTIVE, CLOSED), is_anonymous, allow_change_vote, visibility (PUBLIC, PRIVATE, […] Read article
6 min read Core Entities Home: home_id, owner_id, name, address, timezone, created_at. Room: room_id, home_id, name, floor_number. Device: device_id, home_id, room_id, name, type […] Read article
6 min read Core Entities Tenant: tenant_id, name, slug, plan, custom_domain, storage_quota_gb, created_at. (Multi-tenant: each customer organization is a tenant with isolated content.) […] Read article
6 min read Feed Architecture Overview A social feed shows users content from people and pages they follow, ranked by predicted engagement. The […] Read article
6 min read The Two Pointers Pattern Two pointers uses two indices that move toward each other (or in the same direction) to […] Read article