How paritosh264/honest-iq works
This is a Flask-based webcam proctoring monitor. A participant opens the introduction, starts a test, and the browser streams camera frames to the server; a background detector checks faces, lip movement, and hands, then publishes alerts for the browser to display. Detected multiple faces or hands can trigger screenshot emails. The implementation is concentrated in main.py, with browser behavior in two JavaScript files. HTML-to-script wiring is not shown, so those links are omitted; the alert script’s HTTP interactions are explicit.
Main entry points: main.py Background detector · get_alerts.js Frame capture · face_obj.js Camera preview · index.html Landing page
Components 19
Participant interface
- Flask routes
main.py - Landing page
templates/index.html - Test instructions
templates/introduction.html - Camera preview
templates/face_obj.js - Alert display
templates/get_alerts.js
Frame and alert flow
- Frame capture
templates/get_alerts.js - Frame endpoint
main.py - Latest frame
main.py - Current alerts
main.py - Alerts endpoint
main.py
Proctoring analysis
- Background detector
main.py - Face and lip checks
main.py - Hand checks
main.py
Evidence notifications
- Multi-face capture
main.py - Hand capture
main.py - Email sender
main.py
Other components
- Participant
- Browser camera
- Gmail SMTP
Connections 20
- Participant → Flask routes: opens site
main.py - Flask routes → Landing page: renders
main.py - Participant → Flask routes: starts test
main.py - Flask routes → Test instructions: renders
main.py - Camera preview → Browser camera: requests access
templates/face_obj.js - Frame capture → Browser camera: captures frames
templates/get_alerts.js - Frame capture → Frame endpoint: posts frames
templates/get_alerts.js - Frame endpoint → Latest frame: updates
main.py - Background detector → Latest frame: reads
main.py - Background detector → Face and lip checks: checks faces
main.py - Background detector → Hand checks: checks hands
main.py - Background detector → Current alerts: publishes alerts
main.py - Background detector → Multi-face capture: captures screenshot
main.py - Background detector → Hand capture: captures screenshot
main.py - Alerts endpoint → Current alerts: reads
main.py - Frame capture → Alerts endpoint: polls alerts
templates/get_alerts.js - Frame capture → Alert display: updates display
templates/get_alerts.js - Multi-face capture → Email sender: sends email
main.py - Hand capture → Email sender: sends email
main.py - Email sender → Gmail SMTP: sends message
main.py