A timed practice quiz built with React where players choose a difficulty and category, answer questions against the clock, and receive a complete review of their answers at the end.
you can try the app here warmUp-quiz
- Name and email validation before starting the quiz
- Difficulty and category selection
- 15-second countdown timer for every question
- Automatic timer reset for each new question
- Keyboard shortcuts (
1–4) for answering questions - Immediate visual feedback for correct and incorrect answers
- Final results page with score summary and complete answer review
- Built using conditional rendering instead of React Router for a simple linear application flow
- React
- JavaScript (ES6+)
- HTML5
- CSS3
- Vite
warmUP-quizApp/
├── public/
│ └── favicon.svg
│
├── src/
│ ├── assets/
│ │
│ ├── components/
│ │ ├── quizScreen.css
│ │ ├── quizScreen.jsx
│ │ ├── resultScreen.css
│ │ ├── resultScreen.jsx
│ │ ├── startScreen.css
│ │ └── startScreen.jsx
│ │
│ ├── data/
│ │ └── questions.js
│ │
│ ├── hooks/
│ │ └── useTimer.js
│ │
│ ├── utils/
│ │ └── helpers.js
│ │
│ ├── App.css
│ ├── App.jsx
│ ├── index.css
│ └── main.jsx
│
├── .gitignore
├── eslint.config.js
├── index.html
├── package.json
├── package-lock.json
└── README.md
The project is organized so that each folder has a single responsibility. User interface components are kept separate from reusable logic, helper functions, and application data, making the codebase easier to understand, maintain, and extend.
The application contains 45 questions, with five questions available for each combination of difficulty (Easy, Medium, and Hard) and category (Science, History, and General Knowledge).
When a player starts a quiz, the application:
- Filters the question bank according to the selected difficulty and category.
- Randomly shuffles the matching questions.
- Selects five questions for the current quiz session.
- displays a review summary upon completion of the quiz.
Player information, selected questions, answers, timer state, and score are managed in App.jsx and passed to child components through props.
Clone the repository:
git clone https://github.com/miruts-code/warmUP-quizApp.gitMove into the project directory:
cd warmUP-quizAppInstall the project dependencies:
npm installStart the development server:
npm run dev