LLD | Design Facebook Comment System

3366
Oct 12, 2023
Oct 12, 2023

Design Facebook Comment System

Application Requirements:

  1. Users should be able to comment on posts
  2. Should be able to reply to comments
  3. At most one level of nesting is allowed. If a user replies to a nested comment, the comment should appear below the previous comment
  4. Users should be able to edit and delete their comments. The nesting should adjust on its own

Required Classes

  1. User Class
  2. Comment Class
  3. Post Class

Below is the entire code for the LLD

Comments (4)