Sobes.tech
Middle

Case: Design a review system with moderation, where the author sees their review during moderation, but other users do not.

sobes.tech AI

Answer from AI

For a review system with moderation, where the author sees their review immediately, and other users only after approval, the following architecture can be designed:

  1. Data Model:
  • Review contains fields: id, text, author_id, status (e.g., "under moderation", "approved", "rejected"), creation date.
  1. Display Logic:
  • The author sees all their reviews, including those with the status "under moderation".
  • Other users see only reviews with the status "approved".
  1. Moderation Process:
  • After creation, the review receives the status "under moderation".
  • The moderator checks the review and changes the status to "approved" or "rejected".
  1. Interface:
  • The author is shown a separate section with their reviews and their statuses.
  • The general list of reviews is filtered by the "approved" status.
  1. Security:
  • Access rights should be checked when requesting reviews to prevent unauthorized users from seeing reviews under moderation.

This approach ensures transparency for the author and quality control for other users.