Skip to content

πŸ‘ Implement Like / Vote FeatureΒ #10

Description

@zainphp

Allow users to like/vote posts to show appreciation and support.
This feature contributes to the Leaderboard rankings for both authors and posts.


βœ… Tasks

  • Database Integration

    • Implement Vote model linking User and Post.
    • Ensure one user can only like a post once (unique constraint).
    • Store timestamps for potential future analytics.
  • UI/UX

    • Add like button (toggle state: liked / not liked).
    • Show total number of likes on each post.
    • Provide real-time feedback (optimistic update or re-fetch).
  • Backend / Fullstack Logic

    • Implement server-side action for toggling like/unlike.
    • Ensure only authenticated users can vote.
    • Integrate vote count into leaderboard logic.
  • Testing & QA

    • Add unit tests for vote creation & deletion.
    • Add integration tests for like toggle flow.
    • Test UI interactions (like, unlike, state updates).

🏁 Acceptance Criteria

  • Authenticated users can like/unlike posts.
  • Total like count is displayed and updated correctly.
  • Each user can only like a post once at a time.
  • Like data contributes to leaderboard rankings.
  • Feedback is clear on interaction.

Metadata

Metadata

Assignees

No one assigned

    Labels

    πŸ“ POST & INTERACTIONSCore features like creating posts, editing, deleting, commenting, and liking.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions