Proctor is designed as a decentralized, offline-first anti-cheat coding environment. It operates on a Local Area Network (LAN) model, mimicking a physical "Exam Hall."
- No Internet Required: The entire session runs on the local network.
- The Admin is the Server: The Proctor (Admin) hosts the backend on their machine.
- The Student is the Client: Students connect directly to the Admin's Local IP address.
Upon opening the application, the user is presented with a Landing Screen asking for their role. This prevents the full IDE interface from loading prematurely.
- Goal: Initialize the exam environment and host the server.
- Inputs:
- Session Name: (e.g., "DSA Final Exam")
- Duration: (e.g., 60 minutes)
- Admin Key: A secret password used to authorize sensitive actions later (like ending the exam).
- System Action:
- Spawns the Go Backend Server locally on port
8080. - Detects the machine's Local IP Address (e.g.,
192.168.1.45). - Calls
POST /create-roomto generate a unique Room ID.
- Spawns the Go Backend Server locally on port
- Goal: Connect to an existing exam session.
- Inputs:
- Host IP Address: (Provided verbally or via projector by the Admin).
- Room ID: (Provided by the Admin).
- Student Name: (e.g., "John Doe").
- Registration Number: (e.g., "REG2024-001").
- System Action:
- Validates inputs.
- Calls
POST /join-roomto the Host IP. - Enters the Lobby State.
Once the server is running, the Admin sees a Control Dashboard:
- Connection Info: Prominently displays Host IP and Room ID for students to copy.
- Student List: Real-time list of connected students.
- Shows: Name, RegNo, Connection Status (Online).
- Controls:
- "Start Exam" Button: Currently disabled until at least one student joins (optional).
After successfully joining, the Student sees a Locked Waiting Screen:
- Status Message: "Connected. Waiting for Proctor to start the session..."
- Session Details: Shows Session Name and allocated duration.
- Restrictions: The Code Editor and Terminal are hidden/disabled.
- Background: The app begins polling the server for the
Activestatus.
- The Backend updates the Room Status to
Active. - The Backend calculates
StartTimeandEndTime.
Upon receiving the Active status signal:
- UI Transition: The Waiting Screen fades out.
- IDE Loads: The main
index.htmlinterface (Monaco Editor + Terminal) appears. - Timer Starts: The countdown timer in the top nav syncs with the server's
EndTime. - Process Shield: The app begins background scanning for blacklisted apps (Discord, ChatGPT, etc.) and reports violations to the Admin.
The Admin Dashboard updates to Live Monitoring Mode:
- Timer: Shows remaining time.
- Student Status Grid:
- Online: Green indicator.
- Offline: Red indicator (if
LastPingis old). - Flagged: Orange/Red warning if the "Process Shield" detects forbidden apps.
- Individual Controls: Clicking a student allows the Admin to:
- Pause Session: Lock that specific student's screen.
- Flag: Manually mark them for review.
- Kick: Remove them from the room.
During the exam, the Admin has absolute control:
- Scenario: A student disconnects or needs a bathroom break.
- Action: Admin selects the student and changes status to
Paused. - Result: Student's screen locks with a "Session Paused" overlay. Admin can set it back to
Activeto resume.
- Scenario: Fire alarm or exam completion.
- Action: Admin clicks "End Session for All."
- Auth: Requires the Admin Key (set during setup).
- Result: All student clients receive
Completestatus.
- When the timer reaches
00:00, the Student App automatically locks. - Current code/files are saved locally or pushed to the server (future feature).
- UI: Shows "Exam Ended. Please wait for instructions."
- Student can click "Submit / End Session."
- Auth: Requires Admin Key (to prevent accidental/rage quitting), or simply confirms submission to server.
- Admin finalizes the room.
- Server exports a
session_log.jsoncontaining:- Attendance list.
- Flagged incidents (Process Shield alerts).
- Session duration.
- Server shuts down.