A production-ready exam platform with built-in security features to mimic "Safe Exam Browser" behavior using modern Web APIs.
- Admin Panel: Create exams, manage questions, generate student credentials.
- Student Portal: Take exams in a secure fullscreen environment.
- Security:
- Fullscreen Enforcement: Forces fullscreen mode.
- Focus Tracking: Detects Alt+Tab or window switching.
- Blocking Overlay: Blocks the screen immediately upon violation.
- Admin Unlock: Requires an Admin PIN to resume the exam.
- No Copy/Paste: Disbale context menu and clipboard actions.
- Node.js: v18+ (if running locally)
- PostgreSQL: v14+ (if running locally)
- Docker (Recommended for easy setup)
- Ensure Docker Desktop is running.
- Run:
docker-compose up --build
- Access the App:
- Frontend: http://localhost:3000
- Backend API: http://localhost:5000
If you don't use Docker:
- Start PostgreSQL and create a database named
examdb. - Update
server/.envwith your credentials.
cd server
npm install
npm startThe server will sync the database automatically on first run.
cd client
npm install
npm run dev-
Initial Admin Setup:
- Creating the first admin is currently manual or via the
/api/auth/setup-adminendpoint. - Use Postman to POST to
http://localhost:5000/api/auth/setup-adminwith{ "username": "admin", "password": "adminpassword" }.
- Creating the first admin is currently manual or via the
-
Login as Admin:
- Go to
/login. - Create an Exam.
- Add Questions.
- Go to "Students" tab -> Click "Generate Accounts".
- Go to
-
Login as Student:
- Use a generated username (e.g.,
student_1234) and password. - Select an exam.
- The browser will request Fullscreen. Allow it.
- Attempt to switch tabs to test security blocking.
- Use PIN
12345(default in.env) to unlock.
- Use a generated username (e.g.,