AddThisFeature

Ratings and Reviews

Show real customer opinion on an item instead of asking buyers to take your word.

involved Social & Sharing

What it adds

A star rating and written review per item, with a stored aggregate shown alongside the item and a moderation step before publication.

What your agent is told to do

5
  1. 1

    Show the aggregate where the item appears: an average, a count, and a breakdown by star level. Read that from a stored aggregate on the item, updated as reviews change, not from an aggregate query over the review table on every page render.

  2. 2

    Decide who is allowed to review and enforce it server-side. Restricting reviews to verified purchasers is the single change that most improves trust and most reduces spam.

  3. 3

    Route new reviews through the app's existing Moderation Queue and reuse AI Text Content Moderation if it is present, rather than adding a second approval inbox. Do not build a parallel review-approval screen.

  4. 4

    Wire the existing Content Reporting feature to reviews so a published review can be flagged by other users, and give the item owner a single public reply per review rather than an open thread.

  5. 5

    Do not let the owner delete or hide individual bad reviews. A review system the owner can curate is worthless to the reader, and shows up as a suspiciously perfect average.

Edge cases it handles

8
  • Recomputing an average by scanning every review on each write will be fine at ten reviews and will time out at fifty thousand. Keep a running count and sum on the item and update them transactionally with the review.
  • The same buyer must not be able to leave a second review on the same item. Enforce it with a uniqueness constraint in the database, not just a check in the controller, or concurrent submissions will slip through.
  • New reviews must not appear publicly until they have passed moderation, and the author must still see their own pending review so they do not submit it again.
  • When an author deletes their account or is anonymised, the review text should survive with the byline replaced. Cascading the delete silently removes evidence and changes the average.
  • Editing a review from four stars to one, or deleting it, must adjust the stored aggregate by exactly that difference. A drift bug here is invisible until the displayed average stops matching the reviews on screen.
  • An item with one five-star review must not be presented as better than an item with four hundred reviews averaging 4.6. Show the count wherever the average is shown.
  • Review bodies accept pasted markup, links, and contact details. Escape on output and strip links from unverified authors, or the reviews become an advertising channel.
  • A rejected review needs a reason sent to the author. Silent rejection reads as a bug and gets resubmitted.

Definition of done

9
  • Each item shows an average, a total count, and a distribution across star levels.
  • The aggregate is stored and updated incrementally, with no full scan of reviews on write.
  • A second review from the same author on the same item is rejected by a database constraint.
  • New reviews are held in the existing moderation queue and are invisible publicly until approved.
  • Editing or deleting a review leaves the stored average and count exactly correct.
  • Deleting an author's account preserves the review text with an anonymised byline.
  • Owners can reply publicly to a review but cannot remove or hide one.
  • The feature matches the existing design system.
  • No existing functionality is broken.

Related features

How it works

  1. 1

    Copy the link

    Grab the Markdown instruction URL for this feature.

  2. 2

    Give it to your AI

    Paste it into Claude Code, Cursor, v0, Lovable — whatever you build with.

  3. 3

    It inspects, then implements

    Your agent reads your existing app first, then adds the feature to fit it.

Works with your stack

These instructions are written to adapt. They tell the agent to detect your framework, match your existing design system, and reuse what you already have — rather than assuming a particular stack.

Need it tighter than that? Customize the feature and tell it exactly what you're running.