elmeg-demo/.specify/tasks/05_social_features.md

843 B

Task: Social Features (Comments & Ratings)

Objective

Implement social interaction layers allowing users to comment on and rate content.

Steps

  • Database Schema:
    • Create Comment model (user_id, content, timestamp, foreign keys to Show/Song/Venue).
    • Create Rating model (user_id, score, foreign keys).
  • API Endpoints:
    • POST /comments/ (Create comment)
    • GET /comments/{entity_type}/{entity_id} (List comments)
    • POST /ratings/ (Rate an item)
    • GET /ratings/average/{entity_type}/{entity_id} (Get average score)
  • Frontend:
    • Create CommentSection component.
    • Create StarRating component.
    • Integrate into Show Detail page.

Acceptance Criteria

  • Users can leave comments on a Show.
  • Users can rate a Show.
  • Average rating is displayed.