How ansh339412/marksure works
MarkSure publishes academic results as signed, Merkle-committed records, then supports student access, public QR verification, audit history, and dual-approval corrections. The main path runs from administrator publication through API validation and cryptographic commitment into Supabase; verification retrieves stored artifacts and checks them against the current record. The graph includes the role-based web workspaces and separate correction and audit branches. Some route and page implementations were not excerpted, so their capabilities and connections are included only where the README or source index supports them.
Main entry points: admin.ts Publication routes · index.ts Express API · api.ts HTTP client · verificationService.ts Verification service
Components 26
Web workspaces
- Admin workspace
client/src/pages/AdminDashboard.tsx - Student records
client/src/pages/StudentDashboard.tsx - Verification workspace
client/src/pages/VerifyPage.tsx - Correction workspace
client/src/pages/CorrectionsPage.tsx - Audit workspace
client/src/pages/AuditDashboardPage.tsx - Session context
client/src/context/AuthContext.tsx - HTTP client
client/src/lib/api.ts - Academic policy
client/src/lib/academicPolicy.ts
API workflows
- Express API
server/src/index.ts - Authentication routes
server/src/routes/authRoutes.ts - Publication routes
server/src/routes/admin.ts - Student routes
server/src/routes/student.ts - Verification routes
server/src/routes/verify.ts - Correction routes
server/src/routes/corrections.ts - Audit routes
server/src/routes/audit.ts - Role authorization
server/src/middleware/auth.ts
Integrity services
- Correction service
server/src/services/correctionService.ts - Verification service
server/src/services/verificationService.ts - Append-only ledger
server/src/services/ledger.ts - Canonical records
server/src/crypto/canonical.ts - SHA-256 hashing
server/src/crypto/hash.ts - Merkle proofs
server/src/crypto/merkle.ts - Ed25519 signatures
server/src/crypto/signatures.ts - Result verifier
server/src/crypto/verifyResult.ts
Persistence
- Supabase records
server/src/config/supabase.ts
Other components
- Institutional users
Connections 40
- Institutional users → Admin workspace: publishes batch
- Institutional users → Student records: views results
- Institutional users → Verification workspace: checks result
- Institutional users → Correction workspace: requests correction
- Institutional users → Audit workspace: reviews history
- Admin workspace → HTTP client: submits records
client/src/pages/AdminDashboard.tsx - Student records → HTTP client: requests records
- Verification workspace → HTTP client: requests verification
client/src/pages/VerifyPage.tsx - Correction workspace → HTTP client: submits approvals
client/src/pages/CorrectionsPage.tsx - Audit workspace → HTTP client: requests audit
client/src/pages/AuditDashboardPage.tsx - Session context → HTTP client: restores session
client/src/context/AuthContext.tsx - HTTP client → Express API: sends HTTP
- Express API → Authentication routes: mounts routes
server/src/index.ts - Express API → Publication routes: mounts routes
server/src/index.ts - Express API → Student routes: mounts routes
server/src/index.ts - Express API → Verification routes: mounts routes
server/src/index.ts - Express API → Correction routes: mounts routes
server/src/index.ts - Express API → Audit routes: mounts routes
server/src/index.ts - Authentication routes → Role authorization: checks identity
server/src/routes/authRoutes.ts - Publication routes → Role authorization: checks roles
server/src/routes/admin.ts - Publication routes → Append-only ledger: records publication
server/src/routes/admin.ts - Publication routes → Verification service: checks results
server/src/routes/admin.ts - Correction routes → Correction service: processes requests
server/src/routes/corrections.ts - Correction routes → Append-only ledger: records corrections
server/src/routes/corrections.ts - Verification routes → Verification service: verifies result
server/src/routes/verify.ts - Audit routes → Verification service: checks integrity
server/src/routes/audit.ts - Verification service → Supabase records: loads artifacts
server/src/services/verificationService.ts - Verification service → Result verifier: checks snapshot
server/src/services/verificationService.ts - Correction service → Append-only ledger: preserves history
server/src/services/correctionService.ts - Publication routes → Canonical records: normalizes records
server/src/routes/admin.ts - Publication routes → SHA-256 hashing: hashes records
server/src/routes/admin.ts - Publication routes → Merkle proofs: builds commitment
server/src/routes/admin.ts - Publication routes → Ed25519 signatures: signs publication
server/src/routes/admin.ts - Correction routes → Ed25519 signatures: checks approvals
server/src/routes/corrections.ts - Canonical records → SHA-256 hashing: serializes input
server/src/crypto/hash.ts - Ed25519 signatures → Canonical records: canonicalizes payload
server/src/crypto/signatures.ts - Ed25519 signatures → SHA-256 hashing: hashes payload
server/src/crypto/signatures.ts - Merkle proofs → SHA-256 hashing: hashes tree nodes
server/src/crypto/merkle.ts - Result verifier → Merkle proofs: validates proof
server/src/crypto/verifyResult.ts - Result verifier → Ed25519 signatures: validates signature
server/src/crypto/verifyResult.ts