Skip to content

ManwilBahaa/Would-You-Rather

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Would You Rather Project

It is a React - Redux front end for the application. created using the Create-React-App. It is a multi player game that lets the user create and answer would you rather questions . Any changes made will dynamically update to every user.

Installation

  1. once youve cloned the files open command line in the file directory by using :
  2. > cd '{FILE_PATH}'
  3. run command
  4. > npm install
  5. Once all the required files are installed you can then start by running:
  6. > npm start

Login Flow

We always want to make sure we know who the logged in user is, so information about the logged in user should appear on the page. If someone tries to navigate anywhere by entering the address in the address bar, the user is asked to sign in and then the requested page is shown. The application allows the user to log out and log back in

Application Functionality

Each polling question resides in the correct category. For example, if a question hasn’t been answered by the current user, it should be in the “Unanswered” category.

  1. The details of the poll are available at questions/:question_id.
  2. When a poll is clicked on the home page, the following is shown:
    • the text “Would You Rather”;
    • the picture of the user who posted the polling question; and
    • the two options.
  3. For answered polls, each of the two options contains the following:
    • the text of the option;
    • the number of people who voted for that option;
    • the percentage of people who voted for that option.
  4. The option selected by the logged in user should be clearly marked.
  5. When the user is logged in, the details of the poll are shown. If the user is logged out, he/she is asked to log in before before being able to access the poll.
  6. The application asks the user to sign in and shows a 404 page if that poll does not exist. (In other words, if a user creates a poll and then the same or another user tries to access that poll by its url, the user should be asked to sign in and then be shown a 404 page. Please keep in mind that new polls will not be accessible at their url because of the way the backend is set up in this application.)

Pool

  1. Upon voting in a poll, all of the information of the answered poll is displayed.
  2. The user’s response is recorded and is clearly visible on the poll details page.
  3. When the user comes back to the home page, the polling question appears in the “Answered” column.
  4. The voting mechanism works correctly, and the data on the leaderboard changes appropriately.

Adding new questions

  1. The form is available at/add.
  2. The application shows the text “Would You Rather” and has a form for creating two options.
  3. Upon submitting the form, a new poll is created and the user is taken to the home page.
  4. The new polling question appears in the correct category on the home page.

Leaderboard

  1. The Leaderboard is available at/leaderboard.
  2. Each entry on the leaderboard contains the following:
    • the user’s name;
    • the user’s picture;
    • the number of questions the user asked; and
    • the number of questions the user answered.
  3. Users are ordered in descending order based on the sum of the number of questions they’ve answered and the number of questions they’ve asked.

Navigation

The app contains a navigation bar that is visible on all of the pages.

The user can navigate between the page for creating new polls, and the leaderboard page, and the home page without typing the address into the address bar.

Working with BackEnd

The data that’s initially displayed is populated correctly from the backend.

Each user’s answer and each new poll is correctly recorded on the backend.

About

It is a multi player game that lets the user create and answer would you rather questions . Any changes made will dynamically update to every user.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors