{"id":31542080,"url":"https://github.com/kawchar-ahammed/smart-quiz-system","last_synced_at":"2026-04-05T21:01:51.765Z","repository":{"id":314336150,"uuid":"1055121210","full_name":"Kawchar-Ahammed/Smart-Quiz-System","owner":"Kawchar-Ahammed","description":"A comprehensive online quiz management system built with Django REST API and React. Features real-time proctoring, multi-tenant architecture, group management, and advanced analytics for educational institutions and organizations.","archived":false,"fork":false,"pushed_at":"2025-09-11T20:18:43.000Z","size":305,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-11T22:58:29.189Z","etag":null,"topics":["django","educational-platform","javascript","jwt-authentication","multi-tenant-applications","online-assessment","proctoring","python","quiz-platform","quiz-system","rest-api-framework","self-assessment","smart-quiz-system","sql-server","tailwindcss","web-application"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Kawchar-Ahammed.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-11T19:53:40.000Z","updated_at":"2025-09-11T20:28:04.000Z","dependencies_parsed_at":"2025-09-11T22:58:32.265Z","dependency_job_id":"d19ebf92-0f63-4b18-9f1a-079308364fbc","html_url":"https://github.com/Kawchar-Ahammed/Smart-Quiz-System","commit_stats":null,"previous_names":["kawchar-ahammed/smart-quiz-system"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/Kawchar-Ahammed/Smart-Quiz-System","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kawchar-Ahammed%2FSmart-Quiz-System","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kawchar-Ahammed%2FSmart-Quiz-System/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kawchar-Ahammed%2FSmart-Quiz-System/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kawchar-Ahammed%2FSmart-Quiz-System/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Kawchar-Ahammed","download_url":"https://codeload.github.com/Kawchar-Ahammed/Smart-Quiz-System/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kawchar-Ahammed%2FSmart-Quiz-System/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278305387,"owners_count":25965172,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-04T02:00:05.491Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["django","educational-platform","javascript","jwt-authentication","multi-tenant-applications","online-assessment","proctoring","python","quiz-platform","quiz-system","rest-api-framework","self-assessment","smart-quiz-system","sql-server","tailwindcss","web-application"],"created_at":"2025-10-04T11:30:06.455Z","updated_at":"2025-10-04T11:30:10.771Z","avatar_url":"https://github.com/Kawchar-Ahammed.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🎓 Smart Quiz System\n\n\u003e **A comprehensive, enterprise-grade online assessment platform with advanced proctoring, multi-tenant support, and real-time analytics.**\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![Django](https://img.shields.io/badge/Django-4.2.7-green.svg)](https://djangoproject.com/)\n[![React](https://img.shields.io/badge/React-18.2.0-blue.svg)](https://reactjs.org/)\n[![SQL Server](https://img.shields.io/badge/SQL%20Server-2019-red.svg)](https://www.microsoft.com/en-us/sql-server/)\n\n## 🌟 **Key Features**\n\n### 🎯 **Assessment Management**\n- **Multiple Question Types**: MCQ, True/False, Short Answer, Essay, Matching\n- **Smart Randomization**: Question and answer order randomization\n- **Flexible Scheduling**: Start/end dates with automatic expiration\n- **Attempts Control**: Configurable maximum attempts per quiz\n- **Instant Grading**: Automatic scoring with manual review options\n\n### 🏢 **Multi-Tenant Architecture**\n- **Organization Management**: Complete multi-tenancy support\n- **Role-Based Access**: Admin, Instructor, Student roles with granular permissions\n- **Group Management**: Course groups, study groups, public groups, self-assessment\n- **Subscription Tiers**: Basic, Premium, Enterprise with feature gating\n\n### 🔒 **Advanced Security \u0026 Proctoring**\n- **SmartMonitor**: Real-time proctoring with violation detection\n- **JWT Authentication**: Secure token-based authentication\n- **Tab Monitoring**: Detection of tab switches and window focus changes\n- **Copy/Paste Prevention**: Advanced cheating prevention mechanisms\n- **CSRF Protection**: Complete protection against common attacks\n\n### 📊 **Analytics \u0026 Reporting**\n- **Real-Time Dashboards**: Live statistics and performance metrics\n- **Detailed Analytics**: Student progress tracking and performance analysis\n- **Comprehensive Reports**: Quiz analytics, user statistics, system overview\n- **Export Capabilities**: Data export for further analysis\n\n### 🔔 **Communication \u0026 Notifications**\n- **Email Integration**: Automated notifications for quiz completion, assignments\n- **Template System**: Customizable email templates\n- **Real-Time Updates**: Live notifications for important events\n- **Group Invitations**: Seamless collaboration features\n\n## 🏗️ **Architecture Overview**\n\n```\n┌─────────────────┐    ┌─────────────────┐    ┌─────────────────┐\n│   React.js      │    │   Django REST   │    │  SQL Server     │\n│   Frontend      │◄──►│   API Backend   │◄──►│   Database      │\n│                 │    │                 │    │                 │\n│ • TailwindCSS   │    │ • JWT Auth      │    │ • Normalized    │\n│ • React Router  │    │ • DRF           │    │ • Indexed       │\n│ • Axios         │    │ • Celery Tasks  │    │ • Scalable      │\n│ • Context API   │    │ • Redis Cache   │    │ • ACID          │\n└─────────────────┘    └─────────────────┘    └─────────────────┘\n```\n\n### **Technology Stack**\n\n#### **Frontend**\n- **React 18.2** - Modern UI with hooks and context\n- **TailwindCSS** - Utility-first styling framework\n- **Axios** - HTTP client with interceptors\n- **React Router** - SPA routing with protected routes\n- **React Query** - Server state management\n- **Chart.js** - Interactive data visualizations\n\n#### **Backend**\n- **Django 4.2.7** - Robust web framework\n- **Django REST Framework** - Powerful API development\n- **JWT Authentication** - Secure token-based auth\n- **Celery + Redis** - Background task processing\n- **WhiteNoise** - Static file serving\n- **CORS Headers** - Cross-origin request handling\n\n#### **Database \u0026 Infrastructure**\n- **Microsoft SQL Server** - Enterprise-grade database\n- **Redis** - Caching and task queue\n- **Email Integration** - SMTP support with templates\n- **File Storage** - Configurable static/media handling\n\n## 🚀 **Quick Start**\n\n### **Prerequisites**\n```bash\n# Required software\nPython 3.9+\nNode.js 16+\nSQL Server 2019+ (or SQL Server Express)\nRedis (optional, for background tasks)\n```\n\n### **1. Clone \u0026 Setup**\n```bash\n# Clone the repository\ngit clone https://github.com/yourusername/smart-quiz-system.git\ncd smart-quiz-system\n\n# Quick setup (Windows)\nsetup.bat\n\n# Or manual setup below...\n```\n\n### **2. Backend Setup**\n```bash\ncd backend\n\n# Create virtual environment\npython -m venv venv\nvenv\\Scripts\\activate  # Windows\n# source venv/bin/activate  # Linux/macOS\n\n# Install dependencies\npip install -r requirements.txt\n\n# Configure environment\ncopy .env.example .env\n# Edit .env with your database credentials\n\n# Database setup\npython manage.py migrate\npython manage.py createsuperuser\n\n# Start development server\npython manage.py runserver\n```\n\n### **3. Frontend Setup**\n```bash\ncd frontend\n\n# Install dependencies\nnpm install\n\n# Start development server\nnpm start\n```\n\n### **4. Database Configuration**\n```sql\n-- Execute the enhanced schema\nsqlcmd -S localhost -d SmartQuizDB -i database/enhanced_schema.sql\n```\n\n### **5. Access the Application**\n- **Frontend**: http://localhost:3000\n- **Backend API**: http://localhost:8000\n- **Admin Panel**: http://localhost:8000/admin\n\n## 📁 **Project Structure**\n\n```\nsmart-quiz-system/\n├── 📁 backend/                     # Django REST API\n│   ├── 📁 smart_quiz_system/       # Main Django project\n│   ├── 📁 apps/                    # Django applications\n│   │   ├── 📁 authentication/     # User management \u0026 JWT\n│   │   ├── 📁 organizations/      # Multi-tenant support\n│   │   ├── 📁 groups/             # Group management system\n│   │   ├── 📁 quizzes/            # Quiz \u0026 question management\n│   │   ├── 📁 results/            # Quiz attempts \u0026 scoring\n│   │   ├── 📁 proctoring/         # SmartMonitor system\n│   │   └── 📁 notifications/      # Email \u0026 notifications\n│   ├── 📄 requirements.txt        # Python dependencies\n│   └── 📄 manage.py               # Django management\n├── 📁 frontend/                    # React Application\n│   ├── 📁 public/                 # Static assets\n│   ├── 📁 src/                    # React source code\n│   │   ├── 📁 components/         # Reusable components\n│   │   ├── 📁 pages/              # Page components\n│   │   ├── 📁 services/           # API services\n│   │   ├── 📁 context/            # React context providers\n│   │   └── 📁 hooks/              # Custom React hooks\n│   ├── 📄 package.json           # Node dependencies\n│   └── 📄 tailwind.config.js     # TailwindCSS configuration\n├── 📁 database/                   # Database scripts\n│   ├── 📄 SmartQuizDB_SQLServer.sql     # Original schema\n│   ├── 📄 enhanced_schema.sql           # Enhanced features\n│   └── 📄 sample_data.sql              # Development data\n├── 📁 docs/                       # Documentation\n│   ├── 📄 SECURITY_FIXES.md       # Security improvements\n│   ├── 📄 PERFORMANCE_GUIDE.md    # Performance optimization\n│   ├── 📄 TESTING_STRATEGY.md     # Testing implementation\n│   └── 📄 PRODUCTION_DEPLOYMENT.md # Deployment guide\n└── 📄 README.md                   # This file\n```\n\n## 🔧 **Configuration**\n\n### **Environment Variables**\nCreate a `.env` file in the backend directory:\n\n```env\n# Django Settings\nSECRET_KEY=your-secret-key-here\nDEBUG=True\nALLOWED_HOSTS=localhost,127.0.0.1\n\n# Database Configuration\nDATABASE_NAME=SmartQuizDB\nDATABASE_HOST=localhost\nDATABASE_PORT=1433\nDATABASE_USER=your_username\nDATABASE_PASSWORD=your_password\n\n# Email Configuration\nEMAIL_HOST=smtp.gmail.com\nEMAIL_PORT=587\nEMAIL_HOST_USER=your_email@gmail.com\nEMAIL_HOST_PASSWORD=your_app_password\nDEFAULT_FROM_EMAIL=Smart Quiz System \u003cnoreply@smartquiz.com\u003e\n\n# Redis Configuration (optional)\nREDIS_URL=redis://localhost:6379/0\n\n# Application Settings\nQUIZ_MAX_DURATION=180\nPROCTORING_ENABLED=True\nEMAIL_NOTIFICATIONS_ENABLED=True\n```\n\n### **Quiz System Settings**\n```python\nQUIZ_SETTINGS = {\n    'MAX_QUIZ_DURATION': 180,        # Maximum quiz duration (minutes)\n    'MAX_QUESTIONS_PER_QUIZ': 100,   # Maximum questions per quiz\n    'MAX_CHOICES_PER_QUESTION': 6,   # Maximum choices per MCQ\n    'DEFAULT_PASSING_SCORE': 60,     # Default passing percentage\n    'MAX_ATTEMPTS_PER_QUIZ': 3,      # Maximum attempts allowed\n    'PROCTORING_ENABLED': True,      # Enable proctoring features\n    'EMAIL_NOTIFICATIONS_ENABLED': True,  # Enable email notifications\n}\n```\n\n## 👥 **User Roles \u0026 Permissions**\n\n### **Administrator**\n- Complete system management\n- User approval and management\n- Organization and subscription management\n- System analytics and reporting\n- Security and compliance oversight\n\n### **Instructor**\n- Quiz creation and management\n- Question bank development\n- Student group management\n- Grade management and review\n- Analytics for their courses\n\n### **Student**\n- Quiz participation\n- Results viewing and analysis\n- Group participation\n- Self-assessment tools\n- Progress tracking\n\n## 🎮 **Usage Examples**\n\n### **Creating a Quiz (Instructor)**\n```javascript\n// Example quiz creation payload\nconst quizData = {\n  title: \"Advanced JavaScript Concepts\",\n  description: \"Test your knowledge of ES6+ features\",\n  duration_minutes: 60,\n  passing_score: 70,\n  quiz_type: \"assessment\",\n  visibility: \"group\",\n  group_id: 123,\n  questions: [\n    {\n      question_text: \"What is the purpose of async/await?\",\n      question_type: \"multiple_choice\",\n      marks: 2,\n      choices: [\n        { choice_text: \"Handle asynchronous operations\", is_correct: true },\n        { choice_text: \"Create synchronous code\", is_correct: false },\n        { choice_text: \"Handle errors only\", is_correct: false },\n        { choice_text: \"Improve performance\", is_correct: false }\n      ]\n    }\n  ]\n};\n```\n\n### **Taking a Quiz (Student)**\n```javascript\n// Start quiz attempt\nconst attempt = await api.post('/api/quizzes/attempts/', {\n  quiz_id: 123\n});\n\n// Submit answers\nconst submission = await api.post(`/api/quizzes/attempts/${attempt.id}/submit/`, {\n  answers: [\n    { question_id: 1, selected_choices: [1] },\n    { question_id: 2, text_answer: \"Event loop manages async operations\" }\n  ]\n});\n```\n\n## 📊 **API Documentation**\n\n### **Authentication Endpoints**\n```http\nPOST /api/auth/register/          # User registration\nPOST /api/auth/login/             # User login\nPOST /api/auth/logout/            # User logout\nGET  /api/auth/profile/           # Get user profile\nPOST /api/auth/refresh/           # Refresh JWT token\n```\n\n### **Quiz Management**\n```http\nGET    /api/quizzes/                    # List quizzes\nPOST   /api/quizzes/                    # Create quiz\nGET    /api/quizzes/{id}/               # Get quiz details\nPUT    /api/quizzes/{id}/               # Update quiz\nDELETE /api/quizzes/{id}/               # Delete quiz\nPOST   /api/quizzes/{id}/attempts/      # Start quiz attempt\n```\n\n### **Results \u0026 Analytics**\n```http\nGET /api/results/my-results/            # Student's quiz results\nGET /api/results/quiz/{id}/analytics/   # Quiz analytics\nGET /api/admin/dashboard/stats/         # Admin dashboard stats\nGET /api/admin/users/                   # User management\n```\n\n## 🧪 **Testing**\n\n### **Backend Tests**\n```bash\ncd backend\n\n# Run all tests\npython manage.py test\n\n# Run with coverage\npip install coverage\ncoverage run --source='.' manage.py test\ncoverage report\n```\n\n### **Frontend Tests**\n```bash\ncd frontend\n\n# Run tests\nnpm test\n\n# Run with coverage\nnpm test -- --coverage --watchAll=false\n```\n\n### **End-to-End Tests**\n```bash\n# Install Cypress\nnpm install cypress --save-dev\n\n# Run E2E tests\nnpx cypress run\n```\n\n## 🚀 **Deployment**\n\n### **Development**\n```bash\n# Start all services\ndocker-compose up -d\n\n# Or start individually\npython backend/manage.py runserver    # Backend\nnpm start --prefix frontend          # Frontend\n```\n\n### **Production**\n```bash\n# Build and deploy\ndocker-compose -f docker-compose.prod.yml up -d\n\n# Or follow the comprehensive deployment guide\n# See docs/PRODUCTION_DEPLOYMENT.md\n```\n\n## 🔒 **Security Features**\n\n- ✅ **JWT Authentication** with refresh tokens\n- ✅ **Role-based access control** (RBAC)\n- ✅ **CSRF Protection** for all forms\n- ✅ **XSS Prevention** with input sanitization\n- ✅ **SQL Injection Protection** with ORM\n- ✅ **Secure Headers** implementation\n- ✅ **Rate Limiting** for API endpoints\n- ✅ **Password Hashing** with Django's PBKDF2\n- ✅ **Secure Session Management**\n- ✅ **Email Verification** system\n\n## 📈 **Performance Features**\n\n- ⚡ **Database Indexing** for optimal query performance\n- ⚡ **Redis Caching** for frequently accessed data\n- ⚡ **Background Tasks** with Celery\n- ⚡ **Connection Pooling** for database efficiency\n- ⚡ **Static File Optimization** with WhiteNoise\n- ⚡ **Frontend Code Splitting** with React lazy loading\n- ⚡ **Image Optimization** and lazy loading\n- ⚡ **API Response Caching** strategies\n\n## 🌐 **Browser Support**\n\n| Browser | Version |\n|---------|---------|\n| Chrome | 88+ |\n| Firefox | 85+ |\n| Safari | 14+ |\n| Edge | 88+ |\n\n## 🤝 **Contributing**\n\nWe welcome contributions! Please see our [Contributing Guidelines](CONTRIBUTING.md) for details.\n\n### **Development Workflow**\n1. Fork the repository\n2. Create a feature branch (`git checkout -b feature/amazing-feature`)\n3. Commit your changes (`git commit -m 'Add amazing feature'`)\n4. Push to the branch (`git push origin feature/amazing-feature`)\n5. Open a Pull Request\n\n### **Code Standards**\n- Follow PEP 8 for Python code\n- Use ESLint configuration for JavaScript\n- Write comprehensive tests for new features\n- Update documentation for API changes\n\n## 📋 **Roadmap**\n\n### **Version 2.0** (Q4 2025)\n- [ ] Mobile applications (React Native)\n- [ ] Advanced analytics with ML insights\n- [ ] Video-based questions support\n- [ ] Blockchain-based certificate verification\n- [ ] Advanced proctoring with AI\n\n### **Version 2.1** (Q1 2026)\n- [ ] Microservices architecture\n- [ ] GraphQL API support\n- [ ] Real-time collaborative features\n- [ ] Advanced accessibility features\n- [ ] Multi-language support\n\n## 🐛 **Known Issues**\n\n- Quiz timer may not sync perfectly across browser tabs\n- Large file uploads may timeout on slow connections\n- Email delivery may be delayed in high-traffic scenarios\n\nSee [Issues](https://github.com/yourusername/smart-quiz-system/issues) for a complete list and to report new bugs.\n\n## 📄 **License**\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## 📞 **Support \u0026 Contact**\n\n- **Documentation**: [Wiki](https://github.com/yourusername/smart-quiz-system/wiki)\n- **Issues**: [GitHub Issues](https://github.com/yourusername/smart-quiz-system/issues)\n- **Discussions**: [GitHub Discussions](https://github.com/yourusername/smart-quiz-system/discussions)\n- **Email**: support@smartquiz.com\n\n## 🙏 **Acknowledgments**\n\n- Django and Django REST Framework communities\n- React and Create React App teams\n- TailwindCSS for the amazing utility framework\n- All open-source contributors who made this project possible\n\n---\n\n\u003cdiv align=\"center\"\u003e\n\n**⭐ Star this repository if you find it helpful!**\n\nMade with ❤️ by [Kawchar Ahammed](https://github.com/Kawchar-Ahammed)\n\n\u003c/div\u003e","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkawchar-ahammed%2Fsmart-quiz-system","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkawchar-ahammed%2Fsmart-quiz-system","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkawchar-ahammed%2Fsmart-quiz-system/lists"}