Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Ratings and Review Functionality #3

Open
aashish-dhiman opened this issue May 14, 2024 · 0 comments
Open

Add Ratings and Review Functionality #3

aashish-dhiman opened this issue May 14, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@aashish-dhiman
Copy link
Owner

Description:
Enhance the Flipkart Clone project by adding a ratings and review functionality. This feature will allow users to rate products and leave reviews, which will help other users make informed purchasing decisions.

Tasks:

  1. Backend Implementation:

    • Product model already has fields for ratings and reviews.
    • Create endpoints for submitting a new rating and review, editing an existing review, and deleting a review.
    • Ensure that each user can only leave one review per product.
    • Calculate the average rating for each product based on user ratings.
  2. Frontend Implementation:

    • Add UI components to display the average rating and user reviews on the product detail page.
    • Form to submit new ratings and reviews is already there, just make it working by sending request to server on submission.
    • Provide functionality for users to edit and delete their reviews.
    • Display user reviews in a list with sorting options (e.g., newest first, highest rating).
  3. Database Changes:

    • Product schema already includes a reviews array and a ratings field.
    • Ensure that reviews are linked to user IDs and product IDs.

Acceptance Criteria:

  • Users should be able to rate products on a scale (e.g., 1 to 5 stars).
  • Users should be able to write and submit text reviews for products.
  • Each user should be able to edit or delete their own reviews.
  • The product detail page should display the average rating and a list of reviews.
@aashish-dhiman aashish-dhiman added the enhancement New feature or request label May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant