Reviews
Customer reviews with a moderation workflow.
Flow
- Customer submits a review (rating 1–5, optional comment)
- Review is created with
pendingstatus - Admin approves or rejects in the admin panel
- Only
approvedreviews are shown publicly
Verified Purchases
Reviews automatically get a “verified purchase” badge if the customer has a completed order containing that product.
Constraints
- One review per customer per product
- Nickname is required for display
// Submit a review
await reviewService.create({
productId, customerId, nickname, rating, comment
});
// Moderate (admin)
await reviewService.moderate(reviewId, "approved");
// Get product rating summary
const { average, count } = await reviewService.getProductRating(productId);Last updated on