SmartExamGen is an intelligent, AI-driven web application built with the MERN stack (MongoDB, Express.js, React, Node.js) and integrated with Gemini (Google's generative AI) to automatically generate subject-specific question papers.
🔍 Designed for educators and institutions to streamline exam creation based on subjects and question types (MCQ, Short Answer, Long Answer, True/False, Fill in the Blanks).
+------------------------+
| Frontend (React) |
| - Login/Signup (OAuth)|
| - Subject Selector |
| - Display Questions |
| - Dashboard/Results |
+----------+-------------+
|
v
+------------------------+
| Backend (Node.js) |
| - Express API Routes |
| - Authentication (JWT)|
| - Score Submission |
+----------+-------------+
|
v
+----------------------+ +---------------------------+
| MongoDB Database |<----->| Google Gemini AI (API) |
| - User Info | | - Question Generation |
| - Scores | +---------------------------+
+----------------------+
✅ Login & Signup (Manual + Google OAuth)
✅ Generate questions based on subject & type
✅ Submit answers and calculate scores
✅ Visual dashboard for score tracking
✅ Compare past and current scores with charts (Bar/Line)
- 🌐 Frontend: React.js, Chart.js, Tailwind CSS
- 🛠️ Backend: Node.js, Express.js
- 🧠 AI Integration: @google/generative-ai (Gemini API)
- 🔐 Auth: JWT, Google OAuth
- 📦 Database: MongoDB (Mongoose)
⚠️ Before you begin, make sure you have Node.js, npm, and MongoDB installed on your system.
git clone https://github.com/your-username/SmartExamGen.git
cd SmartExamGennpm install
npm startCreate a
.envfile inside thebackend/directory with the following content:
PORT=5000
MONGO_URI=your_mongodb_connection_string
JWT_SECRET=your_jwt_secret
GOOGLE_CLIENT_ID=your_google_client_id
GOOGLE_CLIENT_SECRET=your_google_client_secret
GENAI_API_KEY=your_gemini_api_key
npm run devcd ./client
npm install
npm startFrontend will run on http://localhost:3000
Backend will run on http://localhost:5000
- See your scores in each subject
- Compare previous and current performance
- Interactive charts using
Chart.js
- User logs in (manual/Google)
- Selects subject & question type
- Gemini AI generates questions
- User submits answers
- Score saved and shown on dashboard
- Performance compared with history
SmartExamGen uses Gemini AI by Google to generate contextual and varied question sets, ensuring that no two papers are the same!
Contributions, issues, and feature requests are welcome!
Feel free to check issues page.
This project is licensed under the MIT License.
📧 tiwariadwait3gmail.com
🔗 www.linkedin.com/in/adwait-tiwari-3ba40a214