A comprehensive, enterprise-grade online assessment platform with advanced proctoring, multi-tenant support, and real-time analytics.
- Multiple Question Types: MCQ, True/False, Short Answer, Essay, Matching
- Smart Randomization: Question and answer order randomization
- Flexible Scheduling: Start/end dates with automatic expiration
- Attempts Control: Configurable maximum attempts per quiz
- Instant Grading: Automatic scoring with manual review options
- Organization Management: Complete multi-tenancy support
- Role-Based Access: Admin, Instructor, Student roles with granular permissions
- Group Management: Course groups, study groups, public groups, self-assessment
- Subscription Tiers: Basic, Premium, Enterprise with feature gating
- SmartMonitor: Real-time proctoring with violation detection
- JWT Authentication: Secure token-based authentication
- Tab Monitoring: Detection of tab switches and window focus changes
- Copy/Paste Prevention: Advanced cheating prevention mechanisms
- CSRF Protection: Complete protection against common attacks
- Real-Time Dashboards: Live statistics and performance metrics
- Detailed Analytics: Student progress tracking and performance analysis
- Comprehensive Reports: Quiz analytics, user statistics, system overview
- Export Capabilities: Data export for further analysis
- Email Integration: Automated notifications for quiz completion, assignments
- Template System: Customizable email templates
- Real-Time Updates: Live notifications for important events
- Group Invitations: Seamless collaboration features
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ React.js │ │ Django REST │ │ SQL Server │
│ Frontend │◄──►│ API Backend │◄──►│ Database │
│ │ │ │ │ │
│ • TailwindCSS │ │ • JWT Auth │ │ • Normalized │
│ • React Router │ │ • DRF │ │ • Indexed │
│ • Axios │ │ • Celery Tasks │ │ • Scalable │
│ • Context API │ │ • Redis Cache │ │ • ACID │
└─────────────────┘ └─────────────────┘ └─────────────────┘
- React 18.2 - Modern UI with hooks and context
- TailwindCSS - Utility-first styling framework
- Axios - HTTP client with interceptors
- React Router - SPA routing with protected routes
- React Query - Server state management
- Chart.js - Interactive data visualizations
- Django 4.2.7 - Robust web framework
- Django REST Framework - Powerful API development
- JWT Authentication - Secure token-based auth
- Celery + Redis - Background task processing
- WhiteNoise - Static file serving
- CORS Headers - Cross-origin request handling
- Microsoft SQL Server - Enterprise-grade database
- Redis - Caching and task queue
- Email Integration - SMTP support with templates
- File Storage - Configurable static/media handling
# Required software
Python 3.9+
Node.js 16+
SQL Server 2019+ (or SQL Server Express)
Redis (optional, for background tasks)
# Clone the repository
git clone https://github.com/yourusername/smart-quiz-system.git
cd smart-quiz-system
# Quick setup (Windows)
setup.bat
# Or manual setup below...
cd backend
# Create virtual environment
python -m venv venv
venv\Scripts\activate # Windows
# source venv/bin/activate # Linux/macOS
# Install dependencies
pip install -r requirements.txt
# Configure environment
copy .env.example .env
# Edit .env with your database credentials
# Database setup
python manage.py migrate
python manage.py createsuperuser
# Start development server
python manage.py runserver
cd frontend
# Install dependencies
npm install
# Start development server
npm start
-- Execute the enhanced schema
sqlcmd -S localhost -d SmartQuizDB -i database/enhanced_schema.sql
- Frontend: http://localhost:3000
- Backend API: http://localhost:8000
- Admin Panel: http://localhost:8000/admin
smart-quiz-system/
├── 📁 backend/ # Django REST API
│ ├── 📁 smart_quiz_system/ # Main Django project
│ ├── 📁 apps/ # Django applications
│ │ ├── 📁 authentication/ # User management & JWT
│ │ ├── 📁 organizations/ # Multi-tenant support
│ │ ├── 📁 groups/ # Group management system
│ │ ├── 📁 quizzes/ # Quiz & question management
│ │ ├── 📁 results/ # Quiz attempts & scoring
│ │ ├── 📁 proctoring/ # SmartMonitor system
│ │ └── 📁 notifications/ # Email & notifications
│ ├── 📄 requirements.txt # Python dependencies
│ └── 📄 manage.py # Django management
├── 📁 frontend/ # React Application
│ ├── 📁 public/ # Static assets
│ ├── 📁 src/ # React source code
│ │ ├── 📁 components/ # Reusable components
│ │ ├── 📁 pages/ # Page components
│ │ ├── 📁 services/ # API services
│ │ ├── 📁 context/ # React context providers
│ │ └── 📁 hooks/ # Custom React hooks
│ ├── 📄 package.json # Node dependencies
│ └── 📄 tailwind.config.js # TailwindCSS configuration
├── 📁 database/ # Database scripts
│ ├── 📄 SmartQuizDB_SQLServer.sql # Original schema
│ ├── 📄 enhanced_schema.sql # Enhanced features
│ └── 📄 sample_data.sql # Development data
├── 📁 docs/ # Documentation
│ ├── 📄 SECURITY_FIXES.md # Security improvements
│ ├── 📄 PERFORMANCE_GUIDE.md # Performance optimization
│ ├── 📄 TESTING_STRATEGY.md # Testing implementation
│ └── 📄 PRODUCTION_DEPLOYMENT.md # Deployment guide
└── 📄 README.md # This file
Create a .env
file in the backend directory:
# Django Settings
SECRET_KEY=your-secret-key-here
DEBUG=True
ALLOWED_HOSTS=localhost,127.0.0.1
# Database Configuration
DATABASE_NAME=SmartQuizDB
DATABASE_HOST=localhost
DATABASE_PORT=1433
DATABASE_USER=your_username
DATABASE_PASSWORD=your_password
# Email Configuration
EMAIL_HOST=smtp.gmail.com
EMAIL_PORT=587
EMAIL_HOST_USER=your_email@gmail.com
EMAIL_HOST_PASSWORD=your_app_password
DEFAULT_FROM_EMAIL=Smart Quiz System <noreply@smartquiz.com>
# Redis Configuration (optional)
REDIS_URL=redis://localhost:6379/0
# Application Settings
QUIZ_MAX_DURATION=180
PROCTORING_ENABLED=True
EMAIL_NOTIFICATIONS_ENABLED=True
QUIZ_SETTINGS = {
'MAX_QUIZ_DURATION': 180, # Maximum quiz duration (minutes)
'MAX_QUESTIONS_PER_QUIZ': 100, # Maximum questions per quiz
'MAX_CHOICES_PER_QUESTION': 6, # Maximum choices per MCQ
'DEFAULT_PASSING_SCORE': 60, # Default passing percentage
'MAX_ATTEMPTS_PER_QUIZ': 3, # Maximum attempts allowed
'PROCTORING_ENABLED': True, # Enable proctoring features
'EMAIL_NOTIFICATIONS_ENABLED': True, # Enable email notifications
}
- Complete system management
- User approval and management
- Organization and subscription management
- System analytics and reporting
- Security and compliance oversight
- Quiz creation and management
- Question bank development
- Student group management
- Grade management and review
- Analytics for their courses
- Quiz participation
- Results viewing and analysis
- Group participation
- Self-assessment tools
- Progress tracking
// Example quiz creation payload
const quizData = {
title: "Advanced JavaScript Concepts",
description: "Test your knowledge of ES6+ features",
duration_minutes: 60,
passing_score: 70,
quiz_type: "assessment",
visibility: "group",
group_id: 123,
questions: [
{
question_text: "What is the purpose of async/await?",
question_type: "multiple_choice",
marks: 2,
choices: [
{ choice_text: "Handle asynchronous operations", is_correct: true },
{ choice_text: "Create synchronous code", is_correct: false },
{ choice_text: "Handle errors only", is_correct: false },
{ choice_text: "Improve performance", is_correct: false }
]
}
]
};
// Start quiz attempt
const attempt = await api.post('/api/quizzes/attempts/', {
quiz_id: 123
});
// Submit answers
const submission = await api.post(`/api/quizzes/attempts/${attempt.id}/submit/`, {
answers: [
{ question_id: 1, selected_choices: [1] },
{ question_id: 2, text_answer: "Event loop manages async operations" }
]
});
POST /api/auth/register/ # User registration
POST /api/auth/login/ # User login
POST /api/auth/logout/ # User logout
GET /api/auth/profile/ # Get user profile
POST /api/auth/refresh/ # Refresh JWT token
GET /api/quizzes/ # List quizzes
POST /api/quizzes/ # Create quiz
GET /api/quizzes/{id}/ # Get quiz details
PUT /api/quizzes/{id}/ # Update quiz
DELETE /api/quizzes/{id}/ # Delete quiz
POST /api/quizzes/{id}/attempts/ # Start quiz attempt
GET /api/results/my-results/ # Student's quiz results
GET /api/results/quiz/{id}/analytics/ # Quiz analytics
GET /api/admin/dashboard/stats/ # Admin dashboard stats
GET /api/admin/users/ # User management
cd backend
# Run all tests
python manage.py test
# Run with coverage
pip install coverage
coverage run --source='.' manage.py test
coverage report
cd frontend
# Run tests
npm test
# Run with coverage
npm test -- --coverage --watchAll=false
# Install Cypress
npm install cypress --save-dev
# Run E2E tests
npx cypress run
# Start all services
docker-compose up -d
# Or start individually
python backend/manage.py runserver # Backend
npm start --prefix frontend # Frontend
# Build and deploy
docker-compose -f docker-compose.prod.yml up -d
# Or follow the comprehensive deployment guide
# See docs/PRODUCTION_DEPLOYMENT.md
- ✅ JWT Authentication with refresh tokens
- ✅ Role-based access control (RBAC)
- ✅ CSRF Protection for all forms
- ✅ XSS Prevention with input sanitization
- ✅ SQL Injection Protection with ORM
- ✅ Secure Headers implementation
- ✅ Rate Limiting for API endpoints
- ✅ Password Hashing with Django's PBKDF2
- ✅ Secure Session Management
- ✅ Email Verification system
- ⚡ Database Indexing for optimal query performance
- ⚡ Redis Caching for frequently accessed data
- ⚡ Background Tasks with Celery
- ⚡ Connection Pooling for database efficiency
- ⚡ Static File Optimization with WhiteNoise
- ⚡ Frontend Code Splitting with React lazy loading
- ⚡ Image Optimization and lazy loading
- ⚡ API Response Caching strategies
Browser | Version |
---|---|
Chrome | 88+ |
Firefox | 85+ |
Safari | 14+ |
Edge | 88+ |
We welcome contributions! Please see our Contributing Guidelines for details.
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
- Follow PEP 8 for Python code
- Use ESLint configuration for JavaScript
- Write comprehensive tests for new features
- Update documentation for API changes
- Mobile applications (React Native)
- Advanced analytics with ML insights
- Video-based questions support
- Blockchain-based certificate verification
- Advanced proctoring with AI
- Microservices architecture
- GraphQL API support
- Real-time collaborative features
- Advanced accessibility features
- Multi-language support
- Quiz timer may not sync perfectly across browser tabs
- Large file uploads may timeout on slow connections
- Email delivery may be delayed in high-traffic scenarios
See Issues for a complete list and to report new bugs.
This project is licensed under the MIT License - see the LICENSE file for details.
- Documentation: Wiki
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Email: support@smartquiz.com
- Django and Django REST Framework communities
- React and Create React App teams
- TailwindCSS for the amazing utility framework
- All open-source contributors who made this project possible
⭐ Star this repository if you find it helpful!
Made with ❤️ by Kawchar Ahammed