Skip to content

jinishgupta/ChainCred

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

10 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

ChainCred - Blockchain Credential Verification

ChainCred Banner Solidity React License

πŸ† Product Track Submission

ChainCred is a decentralized platform that eliminates credential fraud in the world by issuing tamper-proof digital credentials as NFTs on the Polkadot Paseo Testnet.


🎯 The Problem

  • 30-40% credential fraud rate
  • 2-4 weeks average verification time
  • $1M+ annual cost to employers
  • No standardized cross-border verification system

πŸ’‘ The Solution

ChainCred provides:

  • βœ… Instant Verification - Verify credentials in under 5 seconds
  • βœ… Tamper-Proof - Blockchain-backed authenticity
  • βœ… Cross-Border - Works seamlessly across institutions
  • βœ… Transparent - Immutable verification trail

πŸ“¦ What's Included

βœ… Required Deliverables

  1. Live Application - Fully functional web app
  2. Smart Contract - Deployed on Paseo Testnet
  3. /test Page - Interactive testing interface for judges
  4. Video Demo - 3-minute product showcase
  5. GitHub Repository - Complete source code with documentation

🎨 Features

  • University Portal - Issue and manage credentials
  • Student Portal - View and share credentials
  • Employer Verification - Instant credential verification
  • Admin Dashboard - Manage university permissions
  • Mobile Responsive - Works on all devices
  • πŸ“± Mobile Wallet Support - Connect via MetaMask mobile app using WalletConnect
  • πŸ”— IPFS Integration - Decentralized credential metadata storage

πŸš€ Quick Start

Prerequisites

- Node.js v18+ 
- npm or yarn
- MetaMask wallet (browser extension or mobile app)
- Paseo testnet tokens

Installation

# Clone the repository
git clone https://github.com/yourusername/chaincred.git
cd chaincred

# Install contract dependencies
cd contracts
npm install

# Install frontend dependencies  
cd ../frontend
npm install

Environment Setup

1. Contracts (.env)

Create contracts/.env:

PRIVATE_KEY=your_private_key_here

2. Frontend (.env)

Create frontend/.env:

VITE_CONTRACT_ADDRESS=0xYourContractAddress
VITE_ADMIN_ADDRESS=0xYourAdminAddress
VITE_CHAIN_ID=42161
VITE_RPC_URL=https://rpc.ibp.network/paseo
VITE_APP_URL=http://localhost:5173

VITE_WALLETCONNECT_PROJECT_ID=your_project_id_here

πŸ“ Smart Contract Deployment

Step 1: Compile Contract

cd contracts
npm run compile

Step 2: Deploy to Paseo

npm run deploy

Expected Output:

ChainCred deployed to: 0x...
Contract Address: 0x...
Deployer (Admin): 0x...

Step 3: Save Contract Details

Copy the contract address and admin address to frontend/.env:

VITE_CONTRACT_ADDRESS=0xYourContractAddressHere
VITE_ADMIN_ADDRESS=0xYourAdminAddressHere

πŸ’» Running the Application

cd frontend
npm run dev

Application will be available at: http://localhost:5173


πŸ§ͺ Testing the Application

For Judges: /test Page

  1. Navigate to http://localhost:5173/test
  2. Connect your MetaMask wallet
  3. Test the following functions:

Test Flow:

Step 1: Add University (Admin Only)

- Go to "Admin Functions" tab
- Enter a wallet address
- Click "Add University"
- Confirm transaction in MetaMask

Step 2: Issue Credential (University Only)

- Switch to the university wallet
- Go to "Issue Credential" tab
- Fill in student details:
  - Student Address: 0x...
  - Student Name: Juan PΓ©rez
  - Student ID: 20231234
  - Degree: Bachelor of Science
  - Major: Computer Science
- Click "Issue Credential"

Step 3: Verify Credential (Anyone)

- Go to "Verify Credential" tab
- Enter credential ID (e.g., 0)
- Click "Verify Credential"
- View verification results

Step 4: Revoke Credential (Issuer Only)

- Go to "Revoke Credential" tab
- Enter credential ID
- Click "Revoke Credential"

πŸ“– Contract Information

Network Details

Contract Functions

Admin Functions

  • addUniversity(address) - Grant university role

University Functions

  • issueCredential(...) - Issue new credential
  • revokeCredential(uint256) - Revoke existing credential
  • getUniversityCredentials(address) - View issued credentials

Public Functions

  • verifyCredential(uint256) - Verify any credential
  • getStudentCredentials(address) - View student's credentials
  • getTotalCredentials() - Get total count
  • isUniversity(address) - Check university status

πŸ—οΈ Architecture

Smart Contract (contracts/ChainCred.sol)

- ERC-721 NFT standard for credentials
- Role-based access control (Admin, University)
- Credential struct with complete details
- Revocation mechanism
- Query functions for verification

Frontend (frontend/src)

β”œβ”€β”€ components/
β”‚   β”œβ”€β”€ Navbar.jsx - Navigation with wallet connection
β”‚   └── LoadingSpinner.jsx - Loading states
β”œβ”€β”€ pages/
β”‚   β”œβ”€β”€ HomePage.jsx - Landing page
β”‚   β”œβ”€β”€ UniversityPage.jsx - Issue credentials
β”‚   β”œβ”€β”€ StudentPage.jsx - View credentials
β”‚   β”œβ”€β”€ VerifyPage.jsx - Verify credentials
β”‚   └── TestPage.jsx - Testing interface
β”œβ”€β”€ config/
β”‚   β”œβ”€β”€ wagmi.js - Web3 configuration
β”‚   └── abi.js - Contract ABI
└── utils/
    └── helpers.js - Utility functions

πŸ”’ Security Features

  • βœ… Role-based access control
  • βœ… Only issuer can revoke credentials
  • βœ… Immutable on-chain storage
  • βœ… Cryptographic proof of authenticity
  • βœ… No centralized database vulnerability

πŸ“Š Use Cases

1. Universities

  • Issue digital diplomas
  • Manage alumni credentials
  • Reduce administrative overhead

2. Students

  • Portable digital credentials
  • Instant sharing with employers
  • Lifetime access

3. Employers

  • Instant verification
  • No manual processing
  • Fraud prevention

4. Government Agencies

  • Cross-border verification
  • Standardized credentialing
  • Immigration processing

πŸ›£οΈ Future Roadmap

  • Multi-language support (Spanish, Portuguese)
  • PDF certificate generation
  • Integration with university systems
  • Mobile app (iOS/Android)
  • QR code verification
  • Credential templates
  • Batch issuance
  • Analytics dashboard

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.


πŸ“ž Support

For questions or support:


πŸ™ Acknowledgments

  • Polkadot/Paseo for the blockchain infrastructure
  • OpenZeppelin for secure smart contract libraries
  • Wagmi for seamless Web3 integration

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published