Medium
Meta

Design a Social Networking Platform Object-Oriented Design Interview

Design a social networking domain model covering users and profiles, friendship requests and symmetric friendships, and posts with a visibility policy, comments, and reactions — enforcing symmetric friendship, unique requests, author ownership, and visibility-based read authorization.

1. Problem Statement

Design a social networking platform: users become friends via a request-and-accept handshake, and publish posts that are visible to the public, only to friends, or only to themselves, and that others can comment on and react to according to that visibility. Start by clarifying scope and the core objects.

2. Live Coding Format

Work in the provided coding workspace while explaining your decisions to the live interviewer. Validation may use inline tests, examples, comments, or a verbal walkthrough.

3. Key Focus Areas

  • 1
    Friend request handshake and symmetric friend graph
  • 2
    Unique pending request per pair and no self-friend
  • 3
    Post visibility policy and read authorization
  • 4
    Author ownership, comments, and per-user reactions

4. What Strong Candidates Should Demonstrate

  • Model users, symmetric friendships, and a request handshake with correct authorization.
  • Represent post visibility (PUBLIC/FRIENDS/ONLY_ME) as a replaceable read-authorization policy.
  • Enforce author-only post mutation and one-reaction-per-user semantics.
  • Separate the social graph and content model from feed generation.

Want interactive feedback?

Practice this problem in the live coding workspace while the interviewer probes your clarification, implementation, trade-offs, and validation.

Continue to Dashboard

Core Concepts

Object-Oriented DesignGraph ModelingAuthorizationStrategy Pattern

Continue preparing

Build a complete software engineer mock interview plan

Prepare by company

Related Object-Oriented Design

Design a Professional Networking Platform

Design a professional networking domain model covering members and profiles (experience/education), connection requests and undirected connections, and posts with comments and reactions, enforcing symmetric connections, no self-connection, unique pending requests, and profile-edit authorization.

Related Object-Oriented Design

Design a Car Rental System

Design a car rental domain model covering vehicle categories and vehicles, branches, customers and drivers, a rental date range, rate-based quotes, reservations, pickup rental agreements, and return inspection with extra charges — preventing overlapping rentals of the same vehicle.

Related Object-Oriented Design

Design a Group Expense-Splitting Ledger

Design a system where users form groups, log shared expenses using pluggable splitting strategies (equal/exact/percentage), maintain pairwise balances, and settle debts.

Related Object-Oriented Design

Design a Library Management System

Design a library that models catalog titles versus physical copies, members and librarians, checkout/return/renew/reserve flows with loan due dates, an overdue fine policy, and notifications as a boundary.