Skip to content

Feature/community recommendation system#310

Open
kavyamore wants to merge 3 commits into
PatelHarsh2006:mainfrom
kavyamore:feature/community-recommendation-system
Open

Feature/community recommendation system#310
kavyamore wants to merge 3 commits into
PatelHarsh2006:mainfrom
kavyamore:feature/community-recommendation-system

Conversation

@kavyamore
Copy link
Copy Markdown

🚀 Community Recommendation & Interactive Rating System for Food Items

Description

This PR enhances the food menu experience by introducing an interactive community recommendation and rating system for food items.

The goal of this feature is to help users — especially first-time visitors — discover popular and highly recommended dishes through lightweight community-driven interactions integrated directly into the food cards.


✨ Features Added

⭐ Interactive Food Rating System

  • Users can rate food items using clickable star ratings
  • Dynamic average ratings are calculated and displayed
  • Recommendation counts update automatically after rating

👥 First-Time Visitor Recommendation Feature

  • Added a new “Recommend for First-Time Visitors” interaction
  • Users can suggest food items that new customers should try first
  • Displays the total number of community recommendations for each item

🔥 Automatic Trending Badge

  • Food items with high ratings and strong recommendation activity are automatically marked as:

    • 🔥 Most Loved

💾 Local Storage Persistence

Since the current project does not include a backend/database system, localStorage was used to simulate persistent community interactions in a lightweight frontend-only environment.

This allows:

  • Ratings to persist after page refresh
  • Recommendation counts to remain stored locally
  • Duplicate voting/recommendation prevention per browser session

🎨 UI/UX Improvements

  • Responsive recommendation section added to food cards
  • Hover animations and smooth transitions for interactive elements
  • Clean toast-based feedback messages for improved user experience

🛠️ Technical Enhancements

  • Extended food item data structure
  • Added dynamic rating aggregation logic
  • Implemented localStorage-based persistence system
  • Added one-user-one-rating and recommendation restriction logic
  • Integrated automatic trending detection
  • Improved overall frontend interactivity without affecting existing functionality

✅ Result

This feature transforms static food cards into interactive and community-driven UI components while maintaining responsiveness, clean design, and backend independence.
Screenshot 2026-05-27 193100
Screenshot 2026-05-27 193113

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant