Skip to content

A full-stack trivia game where players earn points based on how well they are able to guess the years in which various world history events took place.

Notifications You must be signed in to change notification settings

savreline/what-year

Repository files navigation

What Year Was That?

"What Year Was That?" is a trivia game where players earn points based on how well they are able to guess the years in which various world history events took place. Correctness of a player's guess relative to other player's guesses is shown on a bar chart.

The game is a single web application built using the MERN stack. Communication with the database is via a server-side API. Bar charts are made using D3.js. The project is deployed on an AWS EC2 instance running Ubuntu 18.04.5 and Apache2 web server and on MongoDB Atlas. Deployed version can be viewed at: whatyear.savreline.com

Packages

  • Production Dependencies: React.js, Express.js, MongoDB, D3.js, Axios, Bootstrap
  • Development Dependencies: Babel, Webpack, ESLint, nodemon

API

  • GET: /question/:questionId - fetches the question with the given questionId
  • POST: /question/:questionId - adds the latest player's guess to the question with the given questionId
  • GET: /question/ - fetches the entire question data set (for testing purposes only)
  • GET: /players - fetches the entire player data set (for the leaderboard)
  • POST: /players - adds a new player's data to the player data set
  • GET: /players/:playerName - used for fetching the list of questions completed by the player

Additional Information

Screenshots
Design Notes
Development Notes

Acknowledgements

The jscomplete.com full-stack Javascript course was used as a starting point. Additional resources that were particularly helpful when working with D3.js are cited at the top of the BarChart component.

About

A full-stack trivia game where players earn points based on how well they are able to guess the years in which various world history events took place.

Topics

Resources

Stars

Watchers

Forks

Languages