SmartProctor is a full-stack online examination platform designed to conduct, monitor, evaluate, and analyze exams securely. It integrates backend lifecycle enforcement, role-based access control, WebSocket proctoring, analytics dashboards, and automated grading workflows.
The system now supports a complete exam lifecycle workflow, including backend enforcement and frontend integration.
-
JWT-based authentication
-
Role-based access control
-
Roles:
- Admin
- Teacher
- Student
-
Protected routes (frontend & backend)
-
Role-aware UI rendering
-
Session dependency injection
-
WebSocket authentication support
-
Centralized role service
-
Permission layers:
- Exam permissions
- Student permissions
- Proctor permissions
- Attempt permissions
-
Session middleware for request validation
The exam system now follows a structured lifecycle.
- Draft
- Scheduled
- Active
- Completed
- Graded
- Lifecycle rules defined at service layer
- Attempt creation restrictions
- Submission locking
- Auto state transitions
- Grading flow enforcement
- Backward compatibility for older session logic
-
SQLAlchemy models
-
Alembic migration system (baseline + lifecycle + grading flow)
-
Proper relational mapping:
- Exam
- ExamSession
- ExamAttempt
- ExamAnswer
- ExamQuestion
- Question
- Violation
- Upcoming exams
- Exam history
- Results overview
- Timer system
- Question navigation
- Secure submission confirmation
- Lifecycle-based UI rendering
- One active attempt enforcement
- Submission tracking
- Violation logging
- Scheduled exams
- Active exams
- Completed exams
- View student attempts
- Access answer data
- Review grading results
- Performance metrics
- Exam statistics
- Aggregated data insights
- Review violations per student
- Monitor suspicious activity
- WebSocket signaling layer
- Proctor-student channel separation
- Violation recording
- Snapshot tracking
- Session manager
- Background worker for automatic submission
- Handles expired attempts
- Ensures integrity of timed exams
Backend tests implemented for:
- Attempt service
- Exam endpoints
- Lifecycle enforcement
- Backward compatibility
- Session validation
- FastAPI
- SQLAlchemy
- Alembic migrations
- JWT authentication
- WebSocket manager
- Service-layer architecture
- Permission-based authorization
- React
- Role-based routing
- Protected routes
- Modular UI components
- Analytics pages
- Teacher review interfaces
- Inference pipeline
- Head pose detection
- Phone detection
- Face tracking modules
- Schema definitions for inference
- Strict lifecycle enforcement at backend
- Server-controlled exam state transitions
- Role-based permission guards
- Authenticated WebSocket communication
- Auto-submit for time enforcement
- Violation tracking system
The following features are planned for future implementation:
- Real-time cheating detection scoring
- Multi-face detection
- Suspicious movement alerts
- Audio-based anomaly detection
- Behavior confidence scoring
- Per-question performance analysis
- Difficulty index calculation
- Student ranking system
- Exportable reports (PDF/CSV)
- Time-per-question analysis
- Secure browser / kiosk mode integration
- Screenshot detection research
- Window resize detection tracking
- Clipboard monitoring
- Multi-device session blocking
- Rich text editor for questions
- Image-based questions
- Randomized question pools
- Adaptive exams
- Question tagging & filtering
- Redis for real-time session handling
- Celery or task queue for background jobs
- Dockerized deployment
- CI/CD pipeline
- Production database migration strategy
- Audit logs dashboard
- Exportable violation reports
- Institution-level analytics
- Activity traceability
cd backend
pip install -r requirements.txt
alembic upgrade head
uvicorn app.main:app --reload
cd frontend
npm install
npm run dev
pytest
Active branch:
feature/exam-lifecycle
Current priority:
- Stabilizing grading flow
- Refining attempt review UI
- Hardening lifecycle enforcement rules