Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Ishaq74/concordia/llms.txt
Use this file to discover all available pages before exploring further.
Reviews & Ratings
Concordia’s review system enables customers to rate and review services with threaded discussion support, moderation workflow, and provider response capabilities.Overview
The review system is implemented insrc/database/schemas/services_reviews.schema.ts and provides:
- Star ratings (1-5 scale)
- Written review content
- Threaded replies (provider responses)
- Moderation workflow
- Multi-language support
Review Schema
Fromsrc/database/schemas/services_reviews.schema.ts:
Review Fields
Identification
Unique review identifier
Reference to the service being reviewed
Parent review ID for threaded replies
nullfor root reviews (customer reviews)- Set to parent review ID for replies (provider responses)
Author Information
Display name of the reviewerExample:
"John Smith"Email address of the reviewerUsed for notifications, not displayed publicly
Optional authenticated user IDLinks review to user account if authenticated
Reviews can be left by authenticated users (with
authorId) or guests (authenticated via email verification).Review Content
Review text as structured JSONSupports rich text formatting, allowing paragraphs, lists, etc.Example:
Star rating on a scaleTypically 1-5 stars, where:
1= Very poor2= Poor3= Average4= Good5= Excellent
ISO 639-1 language code of the reviewExample:
"fr", "en", "es"Moderation
Review moderation status:
pending- Awaiting moderator approvalapproved- Visible to publicrejected- Hidden, rejected by moderator
Timestamps
When the review was submitted
Last modification time (automatically updated)
Threaded Replies
The schema supports threaded discussions through theparentId field:
Review Structure
Each customer review can have multiple provider replies. This enables ongoing conversation and clarification.
Review Workflow
Customer Review Process
- Customer completes booking - Booking status must be
completed - Customer writes review - Submits rating and written feedback
- Review enters moderation - Status:
pending - Moderator reviews - Checks for spam, inappropriate content
- Approval decision:
- Approved → Status:
approved, visible to public - Rejected → Status:
rejected, hidden
- Approved → Status:
Provider Response Process
- Review is approved - Customer review visible
- Provider writes response - Creates reply with
parentId - Response moderation - Status:
pending - Moderator approves - Status:
approved - Response displayed - Shown under original review
Provider responses also go through moderation to ensure professional, appropriate communication.
Example Review & Reply
Customer Review (Root)
Provider Response (Reply)
Database Indexes
Fromservices_reviews.schema.ts:
Index Usage
service_id index
Fast retrieval of all reviews for a serviceQuery:
SELECT * FROM services_reviews WHERE service_id = ? AND status = 'approved'status index
Moderation queue queriesQuery:
SELECT * FROM services_reviews WHERE status = 'pending' ORDER BY created_atrating index
Filter reviews by rating levelQuery:
SELECT * FROM services_reviews WHERE service_id = ? AND rating >= 4parent_id index
Retrieve all replies for a reviewQuery:
SELECT * FROM services_reviews WHERE parent_id = ?author_id index
User’s review historyQuery:
SELECT * FROM services_reviews WHERE author_id = ?Integration with Bookings
From the specifications, reviews should only be allowed for completed bookings:Moderation Guidelines
Approve Reviews That:
- Provide honest, constructive feedback
- Are based on actual service experience
- Use respectful language
- Include specific details about the service
Reject Reviews That:
- Contain profanity or hate speech
- Are spam or promotional content
- Include personal attacks
- Are from users without completed bookings
- Contain false or misleading information
Moderators should review both customer reviews and provider responses to maintain a professional, helpful review section.
Review Aggregation
Fromservices_listings.schema.ts, services can cache aggregate rating data:
Trigger rating recalculation when reviews are approved, rejected, or deleted to keep aggregate data accurate.
Display Logic
Showing Reviews
Sorting Options
- Most Recent:
ORDER BY created_at DESC - Highest Rated:
ORDER BY rating DESC, created_at DESC - Lowest Rated:
ORDER BY rating ASC, created_at DESC - Most Helpful: Requires additional helpful votes system
Best Practices
For Customers
- Be specific - Mention particular aspects of the service
- Be fair - Balance pros and cons
- Be timely - Review soon after service completion
- Be respectful - Critique service, not person
For Providers
- Respond professionally - Thank customers, address concerns
- Be timely - Respond within 24-48 hours
- Be constructive - Turn negative reviews into learning opportunities
- Don’t argue - Stay professional even with unfair reviews
For Moderators
- Review promptly - Process within 24 hours
- Be consistent - Apply guidelines uniformly
- Be fair - Consider context and intent
- Document reasons - Note why reviews are rejected
For Developers
- Verify booking completion - Check completed booking before allowing review
- Prevent duplicates - One review per customer per service
- Sanitize content - Clean HTML/scripts from review text
- Send notifications - Notify provider of new reviews, customer of responses
- Cache aggregates - Update service average rating on review changes