This is a modern, interactive Quiz Application built using the MERN stack (MongoDB, Express.js, React.js, Node.js). It allows users to take quizzes on various topics with different difficulty levels, and provides immediate feedback and scoring.
- Dynamic quiz generation based on topic and difficulty
- Timer for each question
- Immediate feedback on answers
- Final score display with a visual chart
- Ability to add new questions to the database
- Responsive design for various screen sizes
- AI Questions Generation: Google Gemini API
- Frontend: React.js with Vite
- Styling: CSS with responsive design
- Charts: Chart.js with react-chartjs-2
- Routing: React Router
- HTTP Client: Axios
The project follows a standard React application structure with additional folders for components and styles. Key files and directories include:
src/
: Source code for the React applicationComponents/
: React componentsassets/
: Static assets like imagesApp.jsx
: Main application componentmain.jsx
: Entry point of the React application
vite.config.js
: Vite configuration filepackage.json
: Project dependencies and scripts
- Clone the repository
- Install dependencies:
npm install
- Set up environment variables - VITE_GOOGLE_API_KEY=
- Start the development server:
npm run dev
- On the home page, select a difficulty level and a topic for your quiz.
- Click "START QUIZ" to begin.
- Answer each question within the time limit.
- After completing the quiz, view your score and a chart of your performance.
- You can retry the quiz or return to the main menu.
Contributions are welcome! Please feel free to submit a Pull Request.