How omkar-afk1213/ai_quize works
AI Quiz is a React quiz application with an Express backend. Users choose a topic, difficulty, and question count, request generated questions, answer a multiple-choice quiz, and see a score. The backend uses an OpenAI-compatible provider when configured and falls back to locally generated questions otherwise. The README identifies server.js as the backend; api/generate-quiz.js provides a separate serverless implementation of the generation endpoint. The sampled excerpts do not establish how deployment selects between them or how account data is persisted.
Main entry points: App.jsx Quiz setup · server.js Express API · main.jsx React entry
Components 10
Quiz client
- React entry
src/main.jsx - Login and accounts
src/App.jsx - Quiz setup
src/App.jsx - Questions and scoring
src/App.jsx
Quiz backend
- Express API
server.js - Fallback generator
server.js - Serverless quiz API
api/generate-quiz.js - Health endpoint
api/health.js
External AI
- OpenAI / OpenRouter
Other components
- Student or admin
Connections 7
- React entry → Login and accounts: renders
src/main.jsx - Student or admin → Login and accounts: uses
- Login and accounts → Quiz setup: continues to
src/App.jsx - Quiz setup → Express API: requests questions
README.md - Express API → OpenAI / OpenRouter: requests generation
server.js - Express API → Fallback generator: uses when needed
server.js - Quiz setup → Questions and scoring: shows generated quiz
src/App.jsx