Adaptive Learning • Real-Time Scoring • Graph-Based Progression
quizengine/
├── backend/
│ ├── algorithms/
│ │ ├── shuffle.js ← Fisher–Yates shuffle
│ │ ├── scoring.js ← Greedy streak scoring engine
│ │ ├── sorting.js ← Leaderboard & difficulty sort
│ │ └── graph.js ← Topological sort, unlock logic
│ ├── config/
│ │ └── db.js ← MongoDB connection
│ ├── controllers/
│ │ ├── authController.js
│ │ ├── quizController.js
│ │ ├── topicController.js
│ │ ├── questionController.js
│ │ └── leaderboardController.js
│ ├── data/
│ │ └── seed.js ← Seed script (6 topics, 30 questions)
│ ├── middleware/
│ │ └── auth.js ← JWT protect + admin middleware
│ ├── models/
│ │ ├── User.js
│ │ ├── Topic.js ← Graph nodes
│ │ ├── Question.js
│ │ └── QuizAttempt.js
│ ├── routes/
│ │ ├── auth.js
│ │ ├── quiz.js
│ │ ├── topics.js
│ │ ├── questions.js
│ │ ├── leaderboard.js
│ │ └── users.js
│ ├── server.js
│ ├── Dockerfile
│ └── package.json
│
├── frontend/
│ ├── public/index.html
│ ├── src/
│ │ ├── components/
│ │ │ ├── Graph/
│ │ │ │ ├── TopicGraph.jsx ← Interactive SVG graph
│ │ │ │ └── TopicCard.jsx
│ │ │ └── UI/
│ │ │ ├── Navbar.jsx
│ │ │ └── Navbar.module.css
│ │ ├── context/
│ │ │ └── AuthContext.jsx ← Global auth state
│ │ ├── pages/
│ │ │ ├── HomePage.jsx
│ │ │ ├── LoginPage.jsx
│ │ │ ├── RegisterPage.jsx
│ │ │ ├── TopicsPage.jsx
│ │ │ ├── QuizPage.jsx ← Main quiz experience
│ │ │ ├── ResultsPage.jsx
│ │ │ ├── LeaderboardPage.jsx
│ │ │ └── HistoryPage.jsx
│ │ ├── styles/
│ │ │ └── global.css ← Design system tokens
│ │ ├── utils/
│ │ │ ├── api.js ← Axios instance
│ │ │ └── algorithms.js ← Client-side algorithm mirrors
│ │ ├── App.jsx
│ │ └── index.jsx
│ ├── Dockerfile
│ ├── nginx.conf
│ └── package.json
│
├── docker-compose.yml
└── README.md
QuizEngine is a full-stack, algorithm-powered quiz platform designed to deliver a smart, adaptive, and engaging learning experience.
It combines:
- 🧠 Data Structures & Algorithms
- ⚡ Real-time interaction
- 🌐 Modern full-stack architecture
to create a production-ready intelligent learning system.
- ⚡ Algorithm-driven quiz logic
- 🔗 Graph-based topic unlocking (DAG)
- 📊 Real-time leaderboard system
- 🔐 Secure authentication (JWT)
- 🐳 Docker-ready deployment
- Fisher–Yates Shuffle (O(n), unbiased randomization)
- Greedy scoring with streak bonuses
- DAG-based topic progression (Topological Sort)
- Multi-condition sorting system
- Real-time quiz interface
- Countdown timer + progress tracking
- Smooth UI transitions
- Dark/Light mode support
- Fully responsive design
- JWT-based authentication system
- Protected routes & middleware
- Admin-controlled data operations
- Dynamic leaderboard ranking
- Quiz history tracking
- Score visualization
- Performance-based topic unlocking
graph TD
A[React Frontend] --> B[API Layer]
B --> C[Node.js Backend]
C --> D[MongoDB Database]
Ensures true randomness in quiz sessions with O(n) complexity.
-
+5 → Correct
-
−1 → Incorrect (min = 0)
-
🔥 Streak bonuses:
- 3 correct → +2
- 5 correct → +5
- Topic unlocking based on prerequisites
- Ensures structured learning progression
- Implemented using Kahn’s Algorithm
- Leaderboard → score desc + name tie-break
- Questions → difficulty-based ordering
- Multi-field comparator system
HTML → CSS → JavaScript → React
↘
Node.js → Full Stack
cd backend
cp .env.example .env
npm install
npm run seed
npm run devcd frontend
npm install
npm startdocker-compose up --build
docker-compose exec backend node data/seed.js✔ Combines DSA + Full Stack Development ✔ Demonstrates real-world system design ✔ Implements scalable architecture ✔ Showcases problem-solving + engineering thinking
- 🤖 AI-based adaptive difficulty
- 🌐 Multiplayer quiz system
- ⚡ WebSocket real-time updates
- 📊 Advanced analytics dashboard
- 📱 Mobile app version
Rahul Raj Jaiswal 💼 LinkedIn: https://www.linkedin.com/in/rahulrajjaiswal/
This project is licensed under the MIT License.


