🚀 A modern, interactive quiz application built with React, TypeScript, and styled-components.
✔ Light/Dark Mode - Toggle between themes with persistent settings
✔ Interactive Quizzes - Answer questions and get instant feedback
✔ Review Mode - See correct answers and explanations
✔ JSON Import/Export - Easily load and share quizzes
✔ Responsive Design - Works on desktop and mobile
✔ Type-Safe - Built with TypeScript for better code reliability
Check out the app here: Demo Link
- React 18 (Functional Components + Hooks)
- TypeScript (Static Typing)
- styled-components (CSS-in-JS Theming)
- LocalStorage (Theme Persistence)
- Google Fonts (Inter + Space Mono)
- Clone the repository:
git clone https://github.com/Ghassanee/QCM-Quiz-Generator
- Install dependencies:
npm install # or yarn install - Start the development server:
npm start # or yarn start
src/
├── components/ # Reusable UI components
│ ├── Question.tsx # Quiz question component
│ ├── Quiz.tsx # Main quiz interface
│ └── ThemeToggle.tsx
├── context/ # React context providers
│ └── ThemeContext.tsx
├── styles/ # Global styles
│ └── GlobalStyles.ts
├── types/ # TypeScript interfaces
│ └── quiz.ts
├── App.tsx # Main app component
└── index.tsx # Entry point
- Load a Quiz: Upload a JSON file in the correct format (see
sample-quiz.json). - Take the Quiz: Select answers and submit to see your score.
- Review Mode: After submission, check explanations for each question.
{
"title": "JavaScript Quiz",
"questions": [
{
"id": 1,
"question": "What is a closure?",
"options": [
{ "text": "A function + its lexical scope", "correct": true },
{ "text": "A JavaScript class", "correct": false }
]
}
]
}MIT © Ghassanee
Enjoy quizzing! 🎉
Feel free to contribute or report issues.
