Design a Review and Rating System for Food Delivery Menu Items

Quick Overview

Design a review and rating system for a food-delivery platform, where customers review the individual menu items they received and every menu shows each item's rating. It tests data modeling, purchase verification, incremental rating aggregation, caching for read-heavy menus, moderation, and handling bursts on popular items.

Design a Review and Rating System for Food Delivery Menu Items

Company: DoorDash

Role: Software Engineer

Category: System Design

Difficulty: medium

Interview Round: Onsite

Design a review system for a food-delivery platform: customers rate and review the individual food items they ordered, and people browsing a restaurant's menu see each item's rating and can read its reviews. Assume the core features are: - A customer who received an order can give each item in it a rating on a 1-to-5 star scale and an optional written review. - Every menu item shows its average rating and number of ratings wherever the menu is displayed. - Anyone viewing an item can page through its reviews. ```hint Where the menu's numbers come from Menus are viewed far more often than reviews are written. Decide where each item's average and count live so that showing a menu never requires scanning that item's reviews. ``` ```hint Proving the reviewer received the item Decide how the write path verifies that the reviewer actually received the item, and what stops the same ordered item from being reviewed twice. ``` ### Constraints and Clarifications - Reviews are attached to individual menu items, not only to the restaurant or to the order as a whole. - The platform already has order, menu and user services that the review system can call or subscribe to. ### Clarifying Questions - Can customers edit or delete a review, and for how long after delivery may they review an item? - Must reviews be moderated before they appear, or can they be published immediately and removed later? - How quickly must a new rating be reflected in an item's displayed average? - In what order should an item's reviews be listed: most recent, most helpful, or highest and lowest rated first? - Are photos, restaurant replies or "helpful" votes in scope? - What scale should the design handle: orders per day, menu views per day, and the share of ordered items that get reviewed? ### What a Strong Answer Covers - Scoped functional and non-functional requirements, with a read-heavy load estimate - A data model that enforces one review per ordered item, lists reviews by item efficiently, and keeps rating aggregates that can be updated incrementally - APIs for submitting, editing and listing reviews, and for fetching rating summaries for a whole menu in one call - A write path covering eligibility checks, moderation and aggregate updates, with no lost or double-counted ratings - A read path with caching that keeps menu pages fast - Handling of popular items, failure recovery, and the metrics that show the pipeline is healthy ### Follow-up Questions - A promotion sends a burst of reviews to one item. Where does contention appear in your design, and how do you remove it? - How do you keep a new item with a single 5-star rating from being ranked above an item with hundreds of ratings averaging 4.7? - How would you detect and handle fake or abusive reviews, including a restaurant reviewing its competitors' dishes? - A restaurant renames or changes a dish. Should its existing reviews stay attached, and how would you model that?

Overview: Design a review and rating system for a food-delivery platform, where customers review the individual menu items they received and every menu shows each item's rating. It tests data modeling, purchase verification, incremental rating aggregation, caching for read-heavy menus, moderation, and handling bursts on popular items.

|Home/System Design/DoorDash
DoorDash logo
DoorDash
Sep 7, 2026
mediumSoftware EngineerOnsiteSystem Design
0
0

Design a review system for a food-delivery platform: customers rate and review the individual food items they ordered, and people browsing a restaurant's menu see each item's rating and can read its reviews.

Assume the core features are:

  • A customer who received an order can give each item in it a rating on a 1-to-5 star scale and an optional written review.
  • Every menu item shows its average rating and number of ratings wherever the menu is displayed.
  • Anyone viewing an item can page through its reviews.

Constraints and Clarifications

  • Reviews are attached to individual menu items, not only to the restaurant or to the order as a whole.
  • The platform already has order, menu and user services that the review system can call or subscribe to.

Clarifying Questions Guidance

  • Can customers edit or delete a review, and for how long after delivery may they review an item?
  • Must reviews be moderated before they appear, or can they be published immediately and removed later?
  • How quickly must a new rating be reflected in an item's displayed average?
  • In what order should an item's reviews be listed: most recent, most helpful, or highest and lowest rated first?
  • Are photos, restaurant replies or "helpful" votes in scope?
  • What scale should the design handle: orders per day, menu views per day, and the share of ordered items that get reviewed?

What a Strong Answer Covers Guidance

  • Scoped functional and non-functional requirements, with a read-heavy load estimate
  • A data model that enforces one review per ordered item, lists reviews by item efficiently, and keeps rating aggregates that can be updated incrementally
  • APIs for submitting, editing and listing reviews, and for fetching rating summaries for a whole menu in one call
  • A write path covering eligibility checks, moderation and aggregate updates, with no lost or double-counted ratings
  • A read path with caching that keeps menu pages fast
  • Handling of popular items, failure recovery, and the metrics that show the pipeline is healthy

Follow-up Questions Guidance

  • A promotion sends a burst of reviews to one item. Where does contention appear in your design, and how do you remove it?
  • How do you keep a new item with a single 5-star rating from being ranked above an item with hundreds of ratings averaging 4.7?
  • How would you detect and handle fake or abusive reviews, including a restaurant reviewing its competitors' dishes?
  • A restaurant renames or changes a dish. Should its existing reviews stay attached, and how would you model that?

Submit Your Answer to Earn 20XP

Sign in to leave a comment

Loading comments...