Quiz game with varying topics and a local ranking. The game consists of a round of 5 questions where the user can choose the theme, difficulty, and type of questions, which can be multiple choice or true/false. At the end of a round, the player can view their performance, and if it is good, they will be registered in a local ranking. This application supports two languages: English (en) and Portuguese (pt-BR). The translations were done mixing dynamic and static translation files. I used i18next for the static translations and Google Translate API for the dynamic translations (reference to APIs below).
- Open Trivia Database: The core API used in this project. that's where the questions for the game is coming from!
- Gravatar: Used for getting players' image in an easy way.
- Google translate: Used to translate some dynamic texts.
-
Cloning and entering the repository
git clone git@github.com:ImVictorM/Trivia-Game.git && cd Trivia-Game
-
Install dependencies
npm install
-
Start the application
-
To start in development mode:
npm run dev
-
To start in production mode:
npm run build && npm run preview
- Running all tests:
npm test
- Running a specific test:
npm test -t {test_file_name}
- Running test coverage:
npm run test:coverage
- Running tests in the browser:
npm run test:ui