How laksh1441942-wq/exam-shield works
ExamShield manages a question-paper lifecycle: administrators create exams, upload and parse controlled-format PDFs, generate shuffled variants, encrypt and anchor them, then configure key custody and release controls. After approvals and the on-chain time-lock, centres retrieve released exams through the secure terminal, where authorized decryption, integrity checks, watermarking, and audit logging apply. The API routes orchestrate domain services and persist state. The README documents the end-to-end workflow and capabilities; unsampled blockchain contract and route details are represented only where documented.
Main entry points: exams.py Exam lifecycle routes · main.py FastAPI application · database.py SQL database · terminal.js Secure terminal UI
Components 22
Web clients
- Admin dashboard
frontend/js/dashboard.js - Secure terminal UI
frontend/js/terminal.js - Frontend API client
frontend/js/api.js
API and identity
- FastAPI application
backend/main.py - Authentication routes
backend/routes/auth.py - Signed sessions
backend/utils/session.py
Exam lifecycle
- Exam lifecycle routes
backend/routes/exams.py - Terminal listing
backend/routes/terminal.py - Question PDF parsing
backend/services/pdf_service.py - Question variants
backend/services/variant_service.py
Release and security
- Encryption and hashes
backend/services/crypto_service.py - Shamir key shares
backend/services/shamir_service.py - Centre watermarking
backend/services/watermark_service.py - Blockchain adapter
backend/services/blockchain_service.py - Release contract
blockchain/contracts/ExamShield.sol
Persistence and audit
- SQL database
backend/database.py - Exam and identity models
backend/models - Audit trail
backend/services/audit_service.py - Audit API
backend/routes/audit.py - Paper artifact storage
storage
Other components
- Super Admin
- Exam Centre
Connections 26
- Super Admin → Admin dashboard: uses
README.md - Exam Centre → Secure terminal UI: uses
README.md - Admin dashboard → Frontend API client: requests API
- Secure terminal UI → Frontend API client: requests API
- Frontend API client → FastAPI application: calls API
README.md - FastAPI application → Authentication routes: mounts routes
backend/main.py - FastAPI application → Exam lifecycle routes: mounts routes
backend/main.py - FastAPI application → Terminal listing: mounts routes
backend/main.py - FastAPI application → Audit API: mounts routes
backend/main.py - Authentication routes → Signed sessions: manages sessions
backend/routes/auth.py - Authentication routes → Audit trail: logs events
backend/routes/auth.py - Exam lifecycle routes → Question PDF parsing: parses uploads
backend/routes/exams.py - Exam lifecycle routes → Question variants: generates variants
backend/routes/exams.py - Exam lifecycle routes → Encryption and hashes: encrypts artifacts
backend/routes/exams.py - Exam lifecycle routes → Shamir key shares: splits and rebuilds
backend/routes/exams.py - Exam lifecycle routes → Centre watermarking: stamps papers
backend/routes/exams.py - Exam lifecycle routes → Blockchain adapter: checks and records
backend/routes/exams.py - Blockchain adapter → Release contract: calls contract
backend/services/blockchain_service.py - Exam lifecycle routes → SQL database: reads and writes
backend/routes/exams.py - Terminal listing → SQL database: reads exams
backend/routes/terminal.py - SQL database → Exam and identity models: registers schema
backend/database.py - Exam lifecycle routes → Paper artifact storage: stores artifacts
README.md - Exam lifecycle routes → Audit trail: records lifecycle
README.md - Audit API → SQL database: reads audit records
backend/routes/audit.py - Audit API → Exam and identity models: queries audit model
backend/routes/audit.py - Secure terminal UI → Exam lifecycle routes: requests decryption
README.md