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

Competition Participation #10

Open
1 of 3 tasks
varunsingh87 opened this issue Dec 23, 2023 · 0 comments · Fixed by #13
Open
1 of 3 tasks

Competition Participation #10

varunsingh87 opened this issue Dec 23, 2023 · 0 comments · Fixed by #13
Assignees
Labels
EPIC A large idea comprising many stories story New feature or request

Comments

@varunsingh87
Copy link
Owner

varunsingh87 commented Dec 23, 2023

Competition Teams

Users can create and join teams for a competition, and the submission is attached to this team.

Requirements

  • A logged in user can join a competition, becoming a participant
  • A teams page lists all teams
  • Teams have a max of 4 people
  • A participant may switch from a one-participant team to a new team by fulfilling the above conditions
  • A participant may leave a competition, but this action is irreversible to enforce commitments to teams
  • To switch teams, one of the following must happen:
    • a participant must submit a join request and (a member of) the team must accept the request
    • the team (member) must invite the participant and the participant must accept the invite
  • Currently joined competitions show up at top of home page for a user

Software Design

Schema Changes

  • submissions table -> teams table as an object property:
ID Competition Submission Join Requests
TEAM_1 COMPETITION_1 SUBMISSION_1 [USER_ID_4]
TEAM_2 COMPETITION_1 SUBMISSION_2 [USER_ID_5, USER_ID_6]
TEAM_3 COMPETITION_2 SUBMISSION_3 []
  • New table: participants:
User Team
USER_ID_1 TEAM_1
USER_ID_2 TEAM_1
USER_ID_3 TEAM_2
USER_ID_1 TEAM_3

Indexes: by_user, by_team

With this normalized database design, switching and joining teams is simple and efficient.

Competition Participation.pdf

Subtasks

@varunsingh87 varunsingh87 added the story New feature or request label Dec 23, 2023
@varunsingh87 varunsingh87 changed the title Hackathon participation Competition participation Dec 23, 2023
@varunsingh87 varunsingh87 self-assigned this Dec 23, 2023
@varunsingh87 varunsingh87 moved this from Backlog to In progress in Spoke Web Application Dec 26, 2023
varunsingh87 added a commit that referenced this issue Dec 27, 2023
* Add column width enforcement to prettier
* Add null check and error messages
* Update schema
varunsingh87 added a commit that referenced this issue Dec 29, 2023
…ation, reimplement addCompetition

* Turn new-competition into a TypeScript file
varunsingh87 added a commit that referenced this issue Jan 4, 2024
* Extract into new components
* Make navbar links nextjs router links
varunsingh87 added a commit that referenced this issue Jan 4, 2024
* Extract into new components
* Make navbar links nextjs router links
varunsingh87 added a commit that referenced this issue Jan 4, 2024
* Extract into new components
* Make navbar links nextjs router links
@varunsingh87 varunsingh87 linked a pull request Jan 5, 2024 that will close this issue
@github-project-automation github-project-automation bot moved this from In progress to Done in Spoke Web Application Jan 5, 2024
@varunsingh87 varunsingh87 reopened this Jan 15, 2024
@varunsingh87 varunsingh87 pinned this issue Jan 15, 2024
@varunsingh87 varunsingh87 changed the title Competition participation Competition Participation Jan 15, 2024
@varunsingh87 varunsingh87 added the EPIC A large idea comprising many stories label Jan 15, 2024
@varunsingh87 varunsingh87 added this to the Phase 1 Stories milestone Jan 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
EPIC A large idea comprising many stories story New feature or request
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant