A modern, lightweight quiz application built with React and Vite.
git clone https://github.com/brukcodes/Quiz.git
cd Quiz
npm install
npm run dev- ⚡ Fast development with React + Vite (HMR enabled)
- 📝 Multiple-choice questions with flexible data format
- 📊 Score tracking and results screen
- ⏱️ Optional time limits per question
- 🎯 Difficulty levels and question tags
- 📱 Mobile-friendly and accessible UI
- 🔧 Easy to extend and customize
- React 19
- Vite 7
- JavaScript (ESLint configured)
- CSS
src/
├── components/ # React components
├── data/ # Question data (JSON/JS)
├── styles/ # CSS files
├── App.jsx
└── main.jsx
public/ # Static assets
index.html
Questions are stored in src/data/ as JSON:
{
"id": "q1",
"question": "What is the capital of France?",
"choices": [
{ "id": "a", "text": "Paris" },
{ "id": "b", "text": "Rome" },
{ "id": "c", "text": "Madrid" }
],
"answer": "a",
"timeLimitSeconds": 30,
"difficulty": "easy",
"tags": ["geography"]
}npm run build # Create production build
npm run preview # Preview production build
npm run lint # Run ESLintDeploy the dist/ folder to GitHub Pages, Netlify, Vercel, or any static host.
Contributions welcome! Please open an issue or pull request with your changes.
Made by @brukcodes