A web application that generates customized quizzes using AI. Create quizzes on any topic with customizable difficulty levels and number of questions.
- Custom quiz generation with GPT
- Multiple difficulty levels (Easy, Medium, Hard, Mixed)
- Customizable number of questions
- Score tracking
- Detailed explanations for answers
- Dark/Light mode support
- Saves generated quizzes for later use
- Clone the repository
git clone https://github.com/yourusername/quiz-generator.git
cd quiz-generator- Install dependencies
npm install- Create a
.envfile in the root directory with the following variables:
# Server port
VITE_PORT=3060
# OpenAI API credentials
VITE_OPENAI_ORGANIZATION="your_organization_id"
VITE_OPENAI_PROJECT="your_project_id"
VITE_OPENAI_API_KEY="your_api_key"- Create required directories:
mkdir -p data/generatedStart both frontend and backend servers:
npm startThis will run:
- Frontend:
http://localhost:5173 - Backend:
http://localhost:3060
Run frontend only:
npm run devRun backend only:
npm run serverquiz-generator/
├── src/ # Frontend source code
├── server/ # Backend server code
├── data/
│ └── generated/ # Generated quiz files
└── public/ # Static assets
| Variable | Description | Required |
|---|---|---|
| VITE_PORT | Backend server port | Yes |
| VITE_OPENAI_ORGANIZATION | OpenAI Organization ID | Yes |
| VITE_OPENAI_PROJECT | OpenAI Project ID | No |
| VITE_OPENAI_API_KEY | OpenAI API Key | Yes |
- React + Vite
- Express.js
- OpenAI API
- TailwindCSS
- Node.js
MIT