This project was bootstrapped with Create React App.
yarn install
(project create with node v18, via nvm)
yarn start
Login box (/login)
- select user
- user is authed (- signup ?)
Homepage (/)
- authed user info
- toggle answered / unanswered polls
- polls ordered most recently created
- unanswered questions shown by default
Question (/questions/:question_id)
- details of that poll
- Unanswered :
-
- Text “Would You Rather”
-
- Avatar of the user who posted the polling question
-
- Two options
-
- Answered
-
- Text of the option
-
- Number of people who voted for that option
-
- Percentage of people who voted for that option
-
- The user answered option is clearly marked
-
- Unanswered :
Business rules
- user cannot change his answer
- only one answer per question per user
Add a question (/add)
- text "Would you rather
- input for two options
- submit form
- redirect to /
- a new question is created
Leaderboard
- Contains :
-
- User’s name
-
- User’s picture
-
- Number of questions the user asked
-
- Number of questions the user answered
-
- Sorted by descending order based on:
-
- the sum of the number of questions
-
- the number of questions they’ve answered
-
Other
- if we navigated without being authed => redirection to login box
- 404 - page or question that does not exist
- Navigation Bar