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 Upvote/Downvote Reactions to Projects #7

Open
shri30yans opened this issue Oct 18, 2024 · 1 comment
Open

Add Upvote/Downvote Reactions to Projects #7

shri30yans opened this issue Oct 18, 2024 · 1 comment

Comments

@shri30yans
Copy link
Collaborator

shri30yans commented Oct 18, 2024

Implement upvote and downvote reactions for projects.

Preferable prerequisites: #6 #2

Requirements

  1. Database Schema Update:

    • Create a new table to store reactions:
    • This table will store:
      • project_id: The ID of the project being reacted to. Needs to be of UUID type.
      • reactor_id: The ID of the user reacting.
      • time: The timestamp when the reaction was made.
      • reaction_type: The type of reaction (upvote or downvote)
    • Create corresponding types in TypeScript for frontend and Go for backend.
  2. Adjusting Project Score:

    • Modify the Projects table to include a score column
      • Implement logic to update the score based on reactions:
      • If the reaction is an upvote, increment the score.
      • If the reaction is a downvote, decrement the score.
  3. Sorting Projects:

Acceptance Criteria

  • Users can upvote or downvote a project.
  • Reactions are stored in the new Reactions table.
  • The project score is updated correctly based on reactions.
  • Projects are displayed in order of score on the Project page.

Additional Notes:

  • Ensure proper testing for the new functionality and database changes.
@bunsamosa-bot
Copy link

bunsamosa-bot bot commented Oct 18, 2024

Thank you for opening this issue! A Maintainer will review it soon!

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

No branches or pull requests

1 participant