How arnavmahajan630/certiproof-v2 works
CertiProof is an exam-scoring system that binds rubric, candidate answer, model identity, score computation, and provenance into a publicly verifiable record. Teachers certify rubrics and review results; students submit answers and retrieve scorecards; auditors or scorecard holders can verify them. Evaluation is orchestrated by the Gateway: it records the submission, obtains Stage 0 embeddings, commits their witness hash to the audit chain, requests proof-bound scoring and explanations, persists results, and creates a scorecard. OCR is an optional, explicitly unverified input convenience. Wiring beyond the sampled source is included only where the README documents it.
Main entry points: teacher.routes.js Teacher routes · routes.py Worker endpoints · evaluationPipeline.js Evaluation pipeline · verifyService.js Verification service
Components 27
User interface
- Role views
frontend/src/App.jsx - Teacher view
frontend/src/views/Teacher.jsx - Student view
frontend/src/views/Student.jsx - Auditor view
frontend/src/views/Auditor.jsx - API client
frontend/src/api/client.js
Gateway API
- Express app
gateway/src/app.js - Teacher routes
gateway/src/routes/teacher.routes.js - Student routes
gateway/src/routes/student.routes.js - Auditor routes
gateway/src/routes/auditor.routes.js - Evaluation pipeline
gateway/src/services/evaluationPipeline.js - Worker client
gateway/src/services/mlWorkerClient.js - Scorecard service
gateway/src/services/scorecardService.js
Scoring worker
- Worker endpoints
ml-worker/app/routes.py - Stage 0 embeddings
ml-worker/app/rcajx/preprocessing.py - RCAJ-X scoring
ml-worker/app/rcajx/model.py - Evidence explanations
ml-worker/app/rcajx/explain.py - OCR transcription
ml-worker/app/ocr/gemini_client.py
Proof and records
- SQLite records
gateway/src/db/client.js - Audit chain
gateway/src/services/auditChain.js - Verification service
gateway/src/services/verifyService.js - EZKL proof pipeline
ml-worker/app/zk/rcajx_ezkl_pipeline.py
Other components
- Teacher
- Student
- Auditor
- Browser
- Gemini API
- SQLite store
Connections 38
- Teacher → Teacher view: uses
- Student → Student view: uses
- Auditor → Auditor view: uses
- Browser → Role views: loads
- Role views → Teacher view: selects
- Role views → Student view: selects
- Role views → Auditor view: selects
- Teacher view → API client: requests
- Student view → API client: requests
- Auditor view → API client: requests
- API client → Express app: REST
- Express app → Teacher routes: dispatches
- Express app → Student routes: dispatches
- Express app → Auditor routes: dispatches
- Teacher routes → Worker client: gets model identity
- Teacher routes → SQLite records: certifies rubric
- Teacher routes → Evaluation pipeline: starts evaluation
- Teacher routes → Worker client: transcribes scan
- Student routes → Evaluation pipeline: starts evaluation
- Evaluation pipeline → SQLite records: reads rubric; saves results
- Evaluation pipeline → Audit chain: appends submission and witness
- Evaluation pipeline → Worker client: requests embedding, proof, score
- Evaluation pipeline → Scorecard service: generates scorecard
- Scorecard service → SQLite records: stores scorecard metadata
- Teacher routes → Audit chain: records override
- Auditor routes → Verification service: requests verification
- Student routes → Verification service: checks scorecard
- Verification service → SQLite records: loads evaluation bundle
- Verification service → Audit chain: checks chain
- Verification service → Worker client: recomputes commitment; verifies proof
- Worker client → Worker endpoints: HTTP requests
- Worker endpoints → Stage 0 embeddings: embeds answer
- Worker endpoints → RCAJ-X scoring: scores inputs
- Worker endpoints → Evidence explanations: derives explanations
- Worker endpoints → EZKL proof pipeline: proves; verifies; recomputes commitment
- Worker endpoints → OCR transcription: transcribes image
- OCR transcription → Gemini API: sends image and prompt
- SQLite records → SQLite store: reads and writes