Skip to content

Rajshah1302/ZkCertify_Raj

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

84 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ZKCertify

This repository contains a ZK-based verification system that enables the generation and validation of attestations across multiple chains (EDUCHAIN and Arbitrum). The system also demonstrates how user data (like CGPA, test score) can be verified and minted into an NFT on the chosen chain.

📑 Table of Contents
  1. Overview
  2. Core Idea
  3. Demo
  4. Architecture
  5. Getting Started
  6. Usage
  7. 🚀 Future Plans
  8. 📄 License

Overview

ZKCertify leverages zero-knowledge proofs to ensure the integrity of user data without exposing the underlying information. It allows recruiters or other parties to:

  1. Request verification of a user's credentials (CGPA, test scores).
  2. Generate and validate ZK proofs.
  3. Mint an NFT as proof of verification on the selected chain (Arbitrum or EDUCHAIN).

Architecture

image


Core Idea

The core idea behind ZKCertify is to create a transparent yet privacy-preserving platform for students and recruiters:

  1. Student Registration & Data Storage

    • Students register on the platform and provide their CGPA.
    • As they learn new skills, they can take various tests on the platform.
  2. Scoring & Verification

    • Each student’s CGPA and newly acquired test scores are combined to check if they exceed a certain threshold.
    • If the sum is greater than the threshold, the platform records a 1 (pass), otherwise a 0 (fail).
    • This pass/fail outcome is then verified on-chain using ZK proofs, ensuring that the underlying data (CGPA, test score) remains private.
  3. Recruiter Verification

    • When a student applies for a role, the recruiter can easily verify the student's performance by checking the on-chain proof.
    • The NFT minted from this verification process serves as a tamper-proof attestation of the student’s credentials.

Demo

Video Demo:
https://youtu.be/YG1DjKzlmFQ

Screenshots

Landing Page

Landing Page

Recruiter Dashboard

Recruiter Dashboard

Verification Page

Verification Page

Skill Assessment via AI

Skill Assessment via AI

AI-Generated Test

AI-Generated Test

Student Profile

Student Profile

Arbitrum Sepolia

Arbitrum Sepolia

EduChain

EduChain

Deployed Backend

Deployed Backend

Architecture

Below is a high-level architecture diagram illustrating the major components and data flow:

image image

  • User (Student) can:
    • Connect/disconnect wallet (e.g., MetaMask).
    • Add CGPA and take tests (which updates verification data).
    • Generate proofs of credentials.
  • Recruiter can:
    • Connect wallet.
    • Request verification of a student’s credentials.
    • Receive the final attestation (NFT) minted on the chain of choice (Arbitrum or EDUCHAIN).

Prerequisites

  • Node.js (>= 14.x recommended)
  • npm (>= 6.x)
  • Circom (for ZK circuit compilation)
  • MetaMask (browser extension) for testing the dApp

Installation

  1. Clone the Repository

    git clone https://github.com/bansalayush2407/ZKCertify.git
    cd ZKCertify
  2. Install Dependencies

    • Backend:
      cd backend
      npm install
    • Frontend:
      cd ../frontend
      npm install
  3. Compile ZK Circuit
    Return to the root folder (or wherever your circuit.circom file is located) and run:

    npm run complete-circuit

    This command will:

    • Compile your circuit.
    • Generate the necessary proving and verification keys.
    • Create the witness.
  4. Deploy the zkCertify Contract
    You need to deploy the zkCertify Contract on both EDUCHAIN and Arbitrum. Once deployed, update your environment variables with the addresses:

    EDU_ZKVERIFY_CONTRACT_ADDRESS="0x147AD899D1773f5De5e064C33088b58c7acb7acf"
    ARB_ZKVERIFY_CONTRACT_ADDRESS="0x82941a739E74eBFaC72D0d0f8E81B1Dac2f586D5"
    VK_HASH="0xa0e25c80bfa3f16a1f2a971730011a85066bc21027722662136a24fa59a59297"
    

    Note: VK_HASH is generated by the function in circuit/setup/hash.js.


Environment Variables

Create a .env file in the /backend directory and add the following entries:

ZKV_RPC_URL=
ETH_RPC_URL=

ETH_ZKVERIFY_CONTRACT_ADDRESS=
ARB_ZKCERTIFY_CONTRACT_ADDRESS=
EDU_ZKCERTIFY_CONTRACT_ADDRESS=

GROQ_API_KEY=
ZKV_SEED_PHRASE=
ETH_SECRET_KEY=

ARB_URL=
EDU_URL=
  • ZKV_RPC_URL: The RPC endpoint for ZKV.
  • ETH_RPC_URL: The RPC endpoint for Ethereum (or your desired testnet).
  • ETH_ZKVERIFY_CONTRACT_ADDRESS: Address of the ZKVerify contract on Ethereum (if applicable).
  • ARB_ZKCERTIFY_CONTRACT_ADDRESS: Address of the contract deployed on Arbitrum.
  • EDU_ZKCERTIFY_CONTRACT_ADDRESS: Address of the contract deployed on EDUCHAIN.
  • GROQ_API_KEY: (If you use any third-party or internal API key).
  • ZKV_SEED_PHRASE: Seed phrase for the account used in the ZK environment.
  • ETH_SECRET_KEY: Private key for Ethereum-based deployments.
  • ARB_URL: RPC endpoint for Arbitrum.
  • EDU_URL: RPC endpoint for EDUCHAIN.

Running Locally

  1. Backend

    cd backend
    npm install
    node app/src/index.js

    The backend should now be running on the specified port (default is usually http://localhost:3001 or whichever is set in your code).

  2. Frontend

    cd ../frontend
    npm install
    npm run dev

    By default, this starts on http://localhost:3000 (or the next available port).


Usage

  1. Connect Wallet (e.g., MetaMask) on the website.
  2. Register as Student to add your CGPA.
  3. Take Tests to generate or update your test scores.
  4. Generate Proof using the underlying ZK circuit, which checks if CGPA + test score ≥ threshold.
  5. Select a Chain (Arbitrum or EDUCHAIN) to mint the verification NFT.
  6. Recruiters can connect their wallets to verify your credentials on-chain and see proof of whether you passed the threshold.

Future Plans

  1. Additional Skill Tests
    • Incorporate new test types (e.g., Data Structures & Algorithms, Assignments, Interviews) that can be automatically graded by AI.
  2. Job Postings & Matching
    • Enable recruiters to post job openings with required skills.
    • Automatically match qualified students to open positions based on their CGPA + test scores.
  3. NFT-Based Resume
    • Allow students to generate a resume as an NFT, bundling their verified credentials in a single, on-chain artifact.

These enhancements will further streamline the student–recruiter interaction while maintaining privacy and trust via zero-knowledge proofs.


About

ZK online Educhain DeSci Track Winner | This repository contains a ZK-based verification system that enables the generation and validation of attestations across multiple chains EDUCHAIN and Arbitrum. The system demonstrates how user data (like CGPA, test score) can be verified and minted into an NFT on the chosen chain.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • TypeScript 78.0%
  • JavaScript 15.8%
  • Handlebars 1.6%
  • Circom 1.4%
  • CSS 1.2%
  • Solidity 1.1%
  • Makefile 0.9%