Skip to content
프로젝트

vincenzo-afk/Proctored-MCQ-Exam-Platform

GitHub에서 보기

소개

A browser-based multiple-choice exam platform with camera proctoring, module progression, results, and certificate exports.

학습 및 교육

이 수치를 측정하는 방법

What you can do

  • Module-based assessments: Modules can be created, deleted, shared, unlocked sequentially, and populated with Excel question banks.
  • Browser proctoring: The app requests camera access through navigator.mediaDevices.getUserMedia({ video: true }), captures up to three JPEG snapshots during an exam, and stops the camera when the exam ends. Camera access requires a secure context such as HTTPS or localhost.[2]
  • Retry-based completion: Incorrect first attempts are placed into a retry queue. They must be answered correctly to finish, but only first-attempt correct answers contribute to the score.
  • Administrative controls: Administrators can set the global passing score, edit certificate wording, inspect registered users, reset progress, share modules, and delete modules.

측정된 스타 증가

in 24h
0
in 7 days
0
in 15 days
0
in 1 month
0

서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.

README.md

Original

Proctored MCQ Exam Platform

A browser-based, self-contained multiple-choice assessment platform with camera proctoring, module progression, results, and certificate exports.

License: MIT Primary language: JavaScript

Source · Report a bug · Request a feature

Important: This project is a client-only demonstration application. Account credentials, question banks, results, and captured proctoring photos are handled in browser storage. Do not use it for confidential examinations or real personal data without replacing the authentication, storage, and access-control model.


Table of Contents


About the Project

Proctored MCQ Exam Platform is a framework-free web application for creating and delivering multiple-choice assessments directly in a browser. An administrator can manage modules, upload questions from an Excel workbook, set a passing score, customize certificate text, reset user progress, and generate shareable module links. A registered user can complete unlocked modules, answer shuffled questions, work through an automatic retry queue for incorrect first attempts, review results, and download certificate or result files.

The application is deliberately simple to deploy: the shipped frontend consists of one HTML document, one stylesheet, and one JavaScript file. There is no package manifest, build pipeline, backend service, or runtime API in the current frontend. Data is stored per browser origin in localStorage, while the current session is stored in sessionStorage; this means data is not a shared server-side source of truth and may differ between browsers or devices.[1]

Key capabilities

  • Module-based assessments: Modules can be created, deleted, shared, unlocked sequentially, and populated with Excel question banks.
  • Browser proctoring: The app requests camera access through navigator.mediaDevices.getUserMedia({ video: true }), captures up to three JPEG snapshots during an exam, and stops the camera when the exam ends. Camera access requires a secure context such as HTTPS or localhost.[2]
  • Retry-based completion: Incorrect first attempts are placed into a retry queue. They must be answered correctly to finish, but only first-attempt correct answers contribute to the score.
  • Administrative controls: Administrators can set the global passing score, edit certificate wording, inspect registered users, reset progress, share modules, and delete modules.
  • Exports: Results can be downloaded as a PDF; passed modules provide certificate PNG and PDF downloads, and certificates can also be printed.
  • Responsive interface: The CSS includes light and dark themes, mobile layouts, responsive result tables, share-link modal styling, and print rules for certificates.
  • No build step: The project can be served as static files from a local development server or any static hosting provider.

Architecture overview

flowchart LR
    Browser[Browser]
    HTML[index.html]
    CSS[style.css]
    JS[script.js]
    Storage[(localStorage / sessionStorage)]
    Camera[Web Camera]
    CDN[CDN libraries]
    QR[QR Server API]

    Browser --> HTML
    HTML --> CSS
    HTML --> JS
    JS <--> Storage
    JS --> Camera
    HTML --> CDN
    JS --> QR

The repository also contains supabase_schema.sql. It defines exams and results tables with JSON fields and anonymous row-level-security policies, but the current index.html and script.js do not import or call Supabase. Treat that SQL file as a separate schema artifact rather than an active backend integration.


Tech Stack

Area Technology Evidence in repository
Markup HTML5 index.html
Styling CSS3 with custom properties and media queries style.css
Application logic Vanilla JavaScript script.js
Client persistence localStorage and sessionStorage script.js
Spreadsheet parsing SheetJS xlsx 0.18.5 via cdnjs index.html
Certificate and result PDF generation jsPDF 2.5.1 and jsPDF-AutoTable 3.5.31 via cdnjs index.html, script.js
Certificate image export html2canvas 1.4.1 via cdnjs index.html, script.js
Icons and fonts Font Awesome 6.4.0, Google Fonts Inter and Playfair Display index.html
Share QR code api.qrserver.com image endpoint script.js
Optional database artifact Supabase SQL schema supabase_schema.sql; not wired into the current frontend
Build and package management None No package.json, lockfile, or build configuration is present

Getting Started

Prerequisites

A modern browser with JavaScript enabled is required. Camera-enabled exam sessions must be served from HTTPS or localhost because browser camera access is restricted to secure contexts.[2] No Node.js, npm, Python package, database, or API key is required by the application itself.

Installation

Clone the repository and enter the project directory:

git clone https://github.com/vincenzo-afk/Proctored-MCQ-Exam-Platform.git
cd Proctored-MCQ-Exam-Platform

There is no dependency-installation command and no build command. For local development, use a static HTTP server rather than opening the HTML file directly:

python3 -m http.server 8000

Open http://localhost:8000 in a browser. If Python is unavailable, use any equivalent static file server; the repository does not require a specific server implementation.

Configuration and data

The application has no .env file and reads no environment variables. Its initial state is created in the browser by script.js.

Storage key Purpose Storage area
users Registered users, passwords, names, creation timestamps, and module progress localStorage
globalModules Module definitions and uploaded questions localStorage
PASS_SCORE Global passing percentage; defaults to 70 localStorage
certConfig Administrator-customizable certificate labels localStorage
theme Light or dark theme preference localStorage
currentUser Current logged-in user session sessionStorage
pendingSharedModule A module ID received from a share URL before login completes sessionStorage

Because the data is browser-local, clearing site data, changing origin, using another browser, or switching devices can remove or isolate application data.[1] Passwords are stored as client-side values, so the built-in authentication is not suitable for production identity management.

Excel question-bank format

The administrator upload flow reads the first worksheet. Row 1 is treated as a header row, and each later row must contain a serial value plus a question and four non-empty options. Option A is treated as the correct answer by the current implementation; column G is an optional explanation shown after answering.

Column Meaning Required
A Serial No; the row number is used when absent
B Question Yes
C Option A; correct answer Yes
D Option B Yes
E Option C Yes
F Option D Yes
G Explanation No

Example header row:

Serial,Question,Option A (Correct),Option B,Option C,Option D,Explanation

Usage

Administrator flow

  1. Open the app and register or log in with the admin account created by script.js.
  2. Use Global Passing Score to set a percentage from 0 to 100.
  3. Create modules with a title and description, then upload an .xlsx or .xls file from the module card.
  4. Use Share to create a module URL. The app displays a QR image from api.qrserver.com and attempts to copy the URL to the clipboard.
  5. Review registered users, reset their progress when needed, and customize certificate labels.

The admin account is created locally with username admin and password admin123 when no admin record exists. This is demonstration behavior, not a secure deployment credential. Change the authentication implementation before using the app with real users.

Learner flow

  1. Register with a full name, username, password, and confirmation.
  2. Open an unlocked module from the dashboard.
  3. Read the exam instructions and allow camera access.
  4. Answer each question. The option order is shuffled for every displayed question.
  5. Complete any retry questions created by incorrect first attempts.
  6. Review the score and answer summary. A passing module is marked complete and unlocks the next module by position.
  7. View or download the generated certificate from the dashboard.

Sharing behavior

A shared URL has the following form:

https://your-static-host.example/?module=MODULE_ID

The module ID is stored in the pending session until the user logs in. The current implementation shares module access within the same browser-origin data model; it does not create a server-backed exam record or enforce server-side authorization.


API Reference

The application does not expose backend HTTP routes or a documented REST API. All application logic runs in the browser.

The one outbound service call constructed by the current JavaScript is the QR image URL below:

Method URL Purpose
GET https://api.qrserver.com/v1/create-qr-code/?size=200x200&data=... Render a QR image for a generated module URL

The frontend also loads third-party JavaScript, fonts, and CSS from CDN URLs declared in index.html. These dependencies are not bundled or pinned by a lockfile.


Project Structure

.
├── .github/
│   ├── ISSUE_TEMPLATE/
│   │   ├── bug_report.md
│   │   └── feature_request.md
│   ├── PULL_REQUEST_TEMPLATE.md
│   └── workflows/
│       └── quality.yml
├── index.html              # Screens, forms, tables, certificate layout, and CDN scripts
├── script.js               # Authentication, modules, exams, proctoring, results, and exports
├── style.css               # Themes, components, responsive rules, and print styles
├── supabase_schema.sql     # Standalone Supabase schema artifact; not used by the frontend
├── plan.md                 # Historical implementation plan
├── CONTRIBUTING.md         # Local workflow and pull-request guidance
├── CODE_OF_CONDUCT.md      # Contributor Covenant v2.1
├── LICENSE                 # MIT License
├── SECURITY.md             # Security limitations and reporting guidance
└── README.md               # Project documentation

Features and Roadmap

Current features

  • Username/password registration and login stored in the browser.
  • Administrator module creation, deletion, sharing, and sequential unlocking.
  • Excel upload for first-sheet question banks with four options per question.
  • Question and option shuffling.
  • Camera permission and up to three in-exam proctoring snapshots.
  • Retry queue for questions answered incorrectly on the first attempt.
  • Configurable passing score.
  • Answer summary, PDF result report, certificate PNG, certificate PDF, and print output.
  • Light/dark theme preference and responsive mobile layouts.

Known limitations and possible next steps

The current application has no server-side authentication, authorization, persistence, audit trail, password hashing, encrypted photo storage, multi-device synchronization, automated expiry for proctoring images, or backend validation. The unused supabase_schema.sql is not enough to provide those capabilities because the frontend does not connect to it and its anonymous policies are permissive. A future production implementation should introduce a backend, real identity provider, access-controlled storage, server-side exam validation, retention controls, and automated tests before handling sensitive assessment data.

No changelog or release history file is currently maintained. Repository history is available from the GitHub commit log.


Testing

The repository does not contain a test suite or package-level test script. The included GitHub Actions workflow performs static validation by checking JavaScript syntax, parsing the HTML document, and confirming that the expected local assets are present.

Run the same JavaScript syntax check locally with:

node --check script.js

For a manual smoke test, serve the project locally and verify registration, login, module creation, Excel upload, camera permission handling, question answering, retry completion, result rendering, certificate exports, theme switching, and module sharing. The camera path must be tested from https:// or http://localhost.[2]


Deployment

Static hosting

The app can be deployed to any static host by publishing the repository root. Configure the host with no build command and / as the output directory when it asks for an output directory. The host must serve index.html, script.js, and style.css from the same directory.

Vercel

  1. Import the repository into Vercel.
  2. Select Other or the equivalent static preset.
  3. Leave the build command empty.
  4. Use the repository root as the output directory.
  5. Deploy over HTTPS so camera permissions can be requested by supported browsers.[2]

Operational note

A static deployment creates a separate browser-origin data store for each user. It does not provide shared administrative data, centralized results, or secure storage. Use the application only for demonstrations or non-sensitive internal experiments until a server-backed architecture is implemented.


Contributing

Contributions are welcome when they improve the correctness, accessibility, maintainability, or documented behavior of the project. Start with CONTRIBUTING.md, review the Code of Conduct, and open an issue before substantial changes.

For pull requests, explain the user-facing or maintenance intent, list the checks you ran, document any behavior changes, and call out security or privacy implications. Keep changes focused and preserve the framework-free architecture unless the change explicitly proposes a new architecture.


Security

This repository intentionally documents security limitations because the current implementation stores credentials and assessment data in browser storage and exposes no server-side authorization. Do not upload real personally identifiable information, confidential question banks, or sensitive proctoring material to a deployment of the current app.

For reporting a suspected vulnerability, do not open a public issue with exploit details. Contact @vincenzo-afk privately through GitHub and include the affected file, reproduction steps, impact, and a proposed mitigation when possible. See SECURITY.md for the repository policy.


License

This project is distributed under the MIT License. The preserved copyright notice names BHARANI KUMAR S.


Acknowledgments

The project uses SheetJS for Excel parsing, jsPDF and jsPDF-AutoTable for document exports, html2canvas for certificate image capture, Font Awesome for icons, and Google Fonts for typography. These libraries are loaded from the CDN URLs declared in index.html.

The repository history attributes the existing application work to vincenzo-afk and preserves the MIT license attribution in LICENSE.


References

[1] MDN Web Docs: Window.localStorage — browser-origin persistence and session behavior.

[2] MDN Web Docs: MediaDevices.getUserMedia() — camera permission and secure-context requirements.

[3] GitHub Docs: Classifying your repository with topics — topic naming and quantity constraints.


Back to top

Built with JavaScript, HTML, and CSS by vincenzo-afk.

관련 프로젝트 살펴보기

불러오는 중…