Skip to content

purvacode-80/IntegriKey-Algorand

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

36 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

IntegriKey: Privacy-Preserving AI Proctoring on Algorand

๐ŸŽฏ Project Overview

IntegriKey is a revolutionary exam proctoring system that combines:

  • Local AI Processing - Face detection, gaze tracking, and phone detection run entirely in the browser
  • Blockchain Trust - Immutable cryptographic proofs stored on Algorand
  • Zero-Knowledge Privacy - Video never leaves the student's device

The Problem We Solve

Traditional AI proctoring systems violate student privacy by:

  • Recording and uploading webcam video
  • Storing sensitive biometric data on centralized servers
  • Creating data breach risks
  • Requiring blind trust in institutions

Our Solution

  • โœ… 100% Local Processing: AI runs in the student's browser using TensorFlow.js
  • โœ… No Video Upload: Only trust scores and cryptographic proofs are transmitted
  • โœ… Serverless Architecture: We use BroadcastChannel APIs for real-time dashboard alerts
  • โœ… Blockchain Verification: Immutable proofs on Algorand ensure transparency
  • โœ… Privacy-First: Student identities are hashed, no PII on blockchain
  • โœ… zkDApp Architecture: Mathematically verifiable ZK-SNARK payloads natively structured for AlgoPlonk constraints.

๐Ÿ“ฆ Project Structure

zkp_vault/
โ”œโ”€โ”€ projects/
โ”‚   โ”œโ”€โ”€ zkp_vault-contracts/              # Smart Contracts
โ”‚   โ”‚   โ”œโ”€โ”€ smart_contracts/
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ zkp_vault/
โ”‚   โ”‚   โ”‚       โ””โ”€โ”€ contract.py           # Main Algorand smart contract
โ”‚   โ”‚   โ””โ”€โ”€ tests/
โ”‚   โ”‚
โ”‚   โ””โ”€โ”€ zkp_vault-frontend/               # React Frontend
โ”‚       โ”œโ”€โ”€ src/
โ”‚       โ”‚   โ”œโ”€โ”€ components/
โ”‚       โ”‚   โ”‚   โ”œโ”€โ”€ StudentExam.tsx       # Student exam interface
โ”‚       โ”‚   โ”‚   โ”œโ”€โ”€ StudentExam.css
โ”‚       โ”‚   โ”‚   โ”œโ”€โ”€ AdminDashboard.tsx    # Admin dashboard
โ”‚       โ”‚   โ”‚   โ””โ”€โ”€ AdminDashboard.css
โ”‚       โ”‚   โ”œโ”€โ”€ services/
โ”‚       โ”‚   โ”‚   โ”œโ”€โ”€ ai-proctor-service.ts # AI detection logic
โ”‚       โ”‚   โ”‚   โ””โ”€โ”€ algorand-service.ts   # Blockchain integration
โ”‚       โ”‚   โ”œโ”€โ”€ App.tsx                   # Main application
โ”‚       โ”‚   โ””โ”€โ”€ App.css
โ”‚       โ””โ”€โ”€ package.json
โ”‚
โ””โ”€โ”€ docs/
    โ”œโ”€โ”€ SETUP_GUIDE.md                    # Deployment instructions
    โ””โ”€โ”€ ARCHITECTURE.md                   # Technical deep dive

๐Ÿš€ Quick Start

1. Install Dependencies

# Backend (Smart Contracts)
cd zkp_vault/projects/zkp_vault-contracts
algokit project bootstrap all

# Frontend
cd ../zkp_vault-frontend
npm install

2. Deploy Smart Contract

cd zkp_vault/projects/zkp_vault-contracts

# Deploy to TestNet
algokit project deploy testnet

# Save the App ID from output

3. Configure Frontend

# Update App.tsx with your App ID
# Line 7: const APP_ID = YOUR_APP_ID_HERE;

4. Run Development Server

cd zkp_vault/projects/zkp_vault-frontend
npm run dev

5. Open in Browser

http://localhost:5173

๐Ÿ”‘ Key Features

For Students

  • Privacy Guarantee: Video processing happens locally, nothing uploaded
  • Real-time Feedback: See AI detections with visual overlays
  • Trust Score: Live score based on behavior during exam
  • Blockchain Proof: Immutable certificate of exam integrity

For Instructors

  • No Video Access: Can't see student recordings (by design)
  • Dashboard Analytics: View aggregated trust scores
  • Real-time Live Alerts: Get "Critical Risk" pop-ups dynamically beamed to your screen when an exam incident is detected.
  • Blockchain Verification: Every proof is verifiable on Algorand Explorer via mathematical Box extraction.
  • Automated Monitoring: No manual proctoring required

Technical Highlights

  • AI Models:

    • BlazeFace for multi-person face detection
    • COCO-SSD for object detection (phones)
    • TensorFlow.js Speech Commands (Audio conversation detection)
    • DOM Event listeners (Tab blur, visibility loss)
  • Blockchain:

    • PyTeal smart contracts
    • Algorand Global Box storage for mapped exams
    • Simulated AlgoPlonk ZK-SNARK compiler mimicking BN254 Elliptic Curve mathematics
    • Highly optimized dynamic ABI typings (uint64[], arc4.DynamicBytes)

๐Ÿ› ๏ธ Technology Stack

Frontend

  • React 18.2 + TypeScript
  • TensorFlow.js 4.15 - Browser-based ML
  • BlazeFace - Face detection model
  • COCO-SSD - Object detection
  • AlgoSDK 2.7 - Algorand integration
  • Pera Wallet - Wallet connection

Backend (Smart Contracts)

  • Python 3.10+
  • AlgoPy (PyTeal) - Smart contract language
  • AlgoKit - Development framework

Blockchain

  • Algorand TestNet/MainNet
  • Box Storage - On-chain data storage
  • ASA - Asset creation for proofs

๐Ÿ“Š How It Works

Student Flow

1. Connect Pera Wallet
2. Enter Exam ID & Student ID
3. Grant camera and audio permission
4. AI monitors in real-time
   โ”œโ”€ Face count (strictly flags presence of 2+ people)
   โ”œโ”€ Audio detection (flags talking/whispering background noise)
   โ”œโ”€ Phone detection (flags mobile device usage)
   โ””โ”€ Tab Visibility (flags leaving the browser tab)
5. Complete exam
6. Synthesize Zero-knowledge Proof parameters (Simulating AlgoPlonk variables)
7. Build ZK-SNARK Array & transmit to Algorand TestNet
8. Receive Confirmation & App ID extraction map

Admin Flow

1. Connect Pera Wallet
2. Create exam with:
   โ”œโ”€ Exam ID
   โ”œโ”€ Duration
   โ””โ”€ Minimum trust score
3. Share exam link with students
4. Monitor submissions in dashboard
5. View proofs on Algorand Explorer
6. Export analytics report

๐Ÿ” Privacy Architecture

What Stays Local (Never Uploaded)

  • โŒ Video frames
  • โŒ Student face images
  • โŒ Webcam recordings
  • โŒ Personal identifiable information

What Goes to Blockchain

  • โœ… Hashed student ID (SHA-256)
  • โœ… Trust score (0-100)
  • โœ… Proof hash (cryptographic signature)
  • โœ… Timestamp
  • โœ… Exam ID

Identity Protection

// Student ID hashing example
const studentHash = SHA256(studentId + salt)
// Output: 0x4f2a1b8c3d9e7f...
// Irreversible and anonymous

๐Ÿงช Testing Guide

Local Testing

  1. Start AlgoKit LocalNet

    algokit localnet start
  2. Deploy contract locally

    algokit project deploy localnet
  3. Get test ALGO from faucet

    algokit goal clerk send -a 1000000 -f YOUR_ADDRESS -t YOUR_ADDRESS
  4. Test student exam flow

  5. Verify proof in admin dashboard

TestNet Testing

  1. Deploy to TestNet
  2. Get free TestNet ALGO: https://bank.testnet.algorand.network/
  3. Run full demo scenario
  4. Verify on Algorand Explorer

๐Ÿ“ˆ Demo Metrics (Expected)

Performance

  • AI Processing: ~30 FPS on modern laptops
  • Transaction Time: 4-5 seconds (Algorand)
  • Model Load Time: 3-5 seconds (first load)
  • Transaction Cost: 0.001 ALGO ($0.0003)

Scalability

  • Students per Exam: Unlimited
  • Concurrent Exams: Unlimited
  • Proof Storage: Persistent on-chain
  • Box Storage Cost: ~0.0025 ALGO per proof

๐Ÿ† Hackathon Advantages

Addresses All Theme Requirements

Theme Our Implementation
Trust Blockchain immutability, no central authority
Privacy Zero video upload, local-only processing
Automation AI replaces manual proctoring
Verifiable Records On-chain proofs, publicly auditable
No Centralization Smart contracts govern, not institutions

Innovation Points

  1. First True Privacy-Preserving Proctor: No competitor offers local-only AI
  2. Real-World Campus Use Case: Immediately deployable for universities
  3. Deep Algorand Integration: Smart contracts, box storage, ASA, AlgoPlonk-ready
  4. Beginner-Friendly: Simple UI, clear documentation
  5. Production-Ready MVP: Not just a concept, fully functional

๐Ÿ”ฎ Roadmap

Phase 1: MVP (Hackathon) โœ…

  • Local AI detection (face, audio, phone, tab)
  • Algorand smart contract with Box state evaluation
  • Serverless real-time alerts via BroadcastChannel UI
  • Student exam interface & Admin Dashboard builder
  • Simulated ZK-SNARK AlgoPlonk Verifier Architecture
  • Proof submission using mapped arc4 bytes over Pera Wallet

Phase 2: Enhancement

  • Compiling exact circuit.wasm payload with Circom/Noir
  • Multi-exam management
  • Email notifications
  • PDF report generation
  • Mobile app (React Native)

Phase 3: Production

  • Security audit
  • MainNet deployment
  • University partnerships
  • LMS integration (Canvas, Moodle)
  • Federated learning for AI improvement

๐Ÿ“š Documentation

For Developers

  • SETUP_GUIDE.md - Complete setup and deployment instructions
  • Smart contract code comments
  • Frontend service documentation

For Users

  • Student quick start guide (in app)
  • Admin user manual (in app)
  • Privacy policy explanation

For Judges

  • Architecture deep dive
  • Technical decision rationale
  • Innovation highlights
  • Demo script

๐ŸŽฌ Demo Preparation

Pre-Demo Checklist

  • Smart contract deployed to TestNet
  • Frontend deployed to Vercel
  • Wallet funded with TestNet ALGO
  • Camera/webcam tested
  • Test exam created
  • Mock proof submitted successfully
  • Algorand Explorer link working
  • Slides prepared
  • Backup video recorded

3-Minute Demo Script

0:00-0:30 - Problem statement + our solution 0:30-2:00 - Live student exam demo 2:00-2:30 - Admin dashboard + blockchain verification 2:30-3:00 - Technical highlights + Q&A


๐Ÿค Contributing

This is a hackathon project, but contributions are welcome!

How to Contribute

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Submit a pull request

Areas for Contribution

  • Improved AI models
  • UI/UX enhancements
  • Additional language support
  • Bug fixes
  • Documentation improvements

๐Ÿ“„ License

MIT License - Open source for educational purposes


๐Ÿ‘ฅ Team

Built for the AI and Automation in Blockchain Hackathon

  • Privacy-focused design
  • Campus-first approach
  • Algorand ecosystem integration

๐Ÿ™ Acknowledgments

  • Algorand Foundation - For the incredible blockchain platform
  • TensorFlow.js Team - For enabling browser-based ML
  • AlgoKit Team - For the amazing developer tools
  • Pera Wallet - For seamless wallet integration

๐Ÿ“ž Support

For questions, issues, or feedback:

  • Open an issue in the repository
  • Check SETUP_GUIDE.md for troubleshooting
  • Review code comments for implementation details

๐ŸŒŸ Why IntegriKey Will Win

  1. Solves a Real Problem: Privacy violation in current proctoring systems
  2. Perfect Theme Fit: AI + Blockchain + Privacy + Campus use case
  3. Technical Excellence: Clean code, modern stack, production-ready
  4. Innovation: First local-only AI proctor with blockchain verification
  5. Impact: Immediately deployable for universities worldwide
  6. Algorand Depth: Smart contracts, box storage, ASA, AlgoPlonk-ready
  7. User Experience: Beautiful UI, intuitive flow, clear privacy messaging
  8. Completeness: Full stack solution, not just a concept

IntegriKey: Where Privacy Meets Trust ๐Ÿ”’โ›“๏ธ


๐Ÿš€ Get Started Now!

# Clone and setup
git clone <your-repo>
cd zkp_vault

# Follow SETUP_GUIDE.md
cat docs/SETUP_GUIDE.md

# Start building the future of privacy-preserving proctoring!

About

Privacy-preserving AI proctoring system on Algorand that uses local behavioral analysis and zero-knowledge inspired proofs to verify exam integrity without compromising student privacy.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors