# π€ AI-Powered MCQ System with Hugging Face
An intelligent Multiple Choice Question system that uses **Hugging Face AI models** to automatically generate questions and evaluate answers.
## π Features
### π€ **AI-Powered Question Generation**
- **Automatic MCQ Creation** using Hugging Face models
- **Topic-based Generation** (Math, Science, History, etc.)
- **Difficulty Levels** (Easy, Medium, Hard)
- **Smart Question Suggestions**
### π **Lecturer Dashboard**
- Create papers manually or with AI assistance
- Generate questions from 8+ subject areas
- Real-time AI health monitoring
- Export results and analytics
### π **Student Interface**
- Take AI-generated MCQ tests
- Timed examinations with auto-submit
- Instant AI-powered feedback
- Performance tracking
### π οΈ **Admin Panel**
- System-wide statistics
- User management
- AI service monitoring
- Database analytics
## ποΈ **System Architecture**
### **4-Layer Architecture:**
1. **ποΈ Data Layer** - MongoDB with Mongoose ODM
2. **π API Layer** - Express.js REST API with AI integration
3. **π§ Business Logic** - AI services and auto-grading
4. **π¨ Presentation** - React with Tailwind CSS
## π€ **AI Integration**
### **Hugging Face Models Used:**
- **Question Generation**: `google/flan-t5-large`
- **Answer Evaluation**: `microsoft/deberta-v3-large`
- **Text Processing**: Various specialized models
### **AI Capabilities:**
- Generate contextual MCQ questions
- Evaluate open-ended answers
- Provide intelligent feedback
- Support multiple difficulty levels
## π οΈ **Setup Instructions**
### **1. Prerequisites**
```bash
- Node.js 16+
- MongoDB
- Hugging Face API Key
```
### **2. Environment Setup**
```bash
# Clone and install
npm install
# Set up environment variables
cp .env.example .env
```
### **3. Configure .env**
```env
# Database
MONGODB_URI=mongodb://localhost:27017/mcq_system
JWT_SECRET=your_jwt_secret_key
# Hugging Face AI
HUGGINGFACE_API_KEY=your_huggingface_api_key
AI_QUESTION_MODEL=google/flan-t5-lar β¦