⭐Core FeaturesComing Soon
Rating System
How lineups are rated on a 1–10 scale with real-time aggregate scoring.
Video coming soon
Add a YouTube video ID to the topics config
Documentation
Overview
Users can rate any lineup (except their own) on a scale from 0.01 to 10. Ratings are aggregated into an average displayed on the lineup card.
How It Works
- Upsert model — rating again overwrites your previous rating
- Atomic updates —
ratingSum,ratingCount, andavgRatingare updated in a single aggregation pipeline to prevent race conditions - Color scale — the rating slider transitions from red → green → diamond based on value
Schema
Rating {
value: Number (0.01–10)
user: ObjectId → User
lineup: ObjectId → Lineup
}
Design Decisions
<!-- Why 0.01–10? Why upsert instead of allowing multiple ratings? Performance considerations? -->Content coming soon — add your video and detailed writeup here.