Skip to content

Premkumar1845/UniTrustID

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

59 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ” UniTrustID - Decentralized Identity for Campus Ecosystem

UniTrustID is a decentralized identity (DID) management system built on the Algorand blockchain. It enables universities to issue, manage, and verify tamper-proof digital credentials for students anchored on-chain with real transactions that can be verified on the Lora Block Explorer.

Built with AlgoKit, Pera Wallet, Defly Wallet, and the W3C DID specification.


✨ Features

Feature Description
πŸͺͺ DID Creation Generate W3C-compliant did:algo: identifiers anchored on Algorand Testnet via a real 1-ALGO transaction
πŸ“± Wallet Integration Connect using Pera Wallet or Defly Wallet via QR code scanning (mobile)
πŸŽ“ Verifiable Credentials Issue credentials β€” StudentID, Library Access, Hostel Resident, Event Attendee, Course Enrollment
πŸ” Selective Disclosure Share only specific claims from a credential (e.g., share department without revealing CGPA)
🏫 Campus Services Simulate credential verification for Library, Hostel, Events, and Exam Hall services
πŸ”— On-Chain Verification Every DID anchor is a real Algorand transaction viewable on Lora Explorer
πŸŒ— Dark / Light Theme Toggle between dark and light mode with persistent preference

πŸ—οΈ Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                    UniTrustID Frontend               β”‚
β”‚              (React + TypeScript + Vite)              β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  DID Module β”‚  Credentials  β”‚  Selective Disclosure  β”‚
β”‚  (W3C DID)  β”‚  (VC Issue)   β”‚  (ZK-style reveal)    β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚           @txnlab/use-wallet-react v4                β”‚
β”‚         (Pera Wallet + Defly Wallet SDKs)            β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚              algosdk v3 (Transaction Layer)           β”‚
β”‚         1-ALGO self-transfer with DID note           β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚            Algorand Testnet (AlgoNode API)            β”‚
β”‚          https://testnet-api.algonode.cloud           β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ“‚ Project Structure

UniTrustID/
β”œβ”€β”€ frontend/                          # React + TypeScript frontend
β”‚   β”œβ”€β”€ index.html                     # Entry HTML
β”‚   β”œβ”€β”€ package.json                   # Node dependencies
β”‚   β”œβ”€β”€ tsconfig.json                  # TypeScript config
β”‚   β”œβ”€β”€ vite.config.ts                 # Vite + polyfills config
β”‚   └── src/
β”‚       β”œβ”€β”€ main.tsx                   # Entry point + ErrorBoundary
β”‚       β”œβ”€β”€ App.tsx                    # Root component (routing, state)
β”‚       β”œβ”€β”€ components/
β”‚       β”‚   β”œβ”€β”€ WalletScreen.tsx       # Pera / Defly wallet connection
β”‚       β”‚   β”œβ”€β”€ OverviewTab.tsx        # DID dashboard + Lora link
β”‚       β”‚   β”œβ”€β”€ CredentialsTab.tsx     # Credential cards + issuance
β”‚       β”‚   β”œβ”€β”€ ServicesTab.tsx        # Campus service verification
β”‚       β”‚   β”œβ”€β”€ ProfileTab.tsx         # DID document viewer
β”‚       β”‚   β”œβ”€β”€ SelDiscModal.tsx       # Selective disclosure modal
β”‚       β”‚   β”œβ”€β”€ Console.tsx            # Blockchain log viewer
β”‚       β”‚   β”œβ”€β”€ CredCard.tsx           # Individual credential card
β”‚       β”‚   β”œβ”€β”€ WalletChip.tsx         # Connected wallet badge
β”‚       β”‚   └── Toast.tsx              # Toast notifications
β”‚       β”œβ”€β”€ lib/
β”‚       β”‚   β”œβ”€β”€ algoNode.ts            # Algorand Testnet txn helpers
β”‚       β”‚   β”œβ”€β”€ did.ts                 # W3C DID generation & documents
β”‚       β”‚   β”œβ”€β”€ credentials.ts         # Credential issuance & disclosure
β”‚       β”‚   β”œβ”€β”€ walletProvider.tsx      # WalletManager (Pera + Defly)
β”‚       β”‚   β”œβ”€β”€ types.ts               # Shared TypeScript interfaces
β”‚       β”‚   └── utils.ts               # Crypto & utility helpers
β”‚       └── styles/
β”‚           β”œβ”€β”€ globals.css            # Global styles + theme variables
β”‚           β”œβ”€β”€ header.css             # Header + logo + theme toggle
β”‚           β”œβ”€β”€ wallet.css             # Wallet connection screen
β”‚           β”œβ”€β”€ credentials.css        # Credential cards
β”‚           β”œβ”€β”€ services.css           # Services tab
β”‚           β”œβ”€β”€ profile.css            # Profile / DID doc viewer
β”‚           └── modal.css              # Selective disclosure modal
β”œβ”€β”€ smart_contracts/                   # Algorand smart contracts (AlgoKit)
β”‚   β”œβ”€β”€ __main__.py
β”‚   β”œβ”€β”€ __init__.py
β”‚   └── hello_world/
β”‚       β”œβ”€β”€ contract.py                # ARC4 HelloWorld contract
β”‚       └── deploy_config.py           # Deployment configuration
β”œβ”€β”€ pyproject.toml                     # Python / Poetry config
└── .algokit.toml                      # AlgoKit project config

πŸš€ Getting Started

Prerequisites

  • Node.js β‰₯ 18
  • Python β‰₯ 3.12
  • AlgoKit CLI β‰₯ 2.x β€” pipx install algokit
  • Pera Wallet or Defly Wallet mobile app (for signing transactions)
  • Algorand Testnet account with β‰₯ 2 ALGO β€” get free testnet ALGO from the dispenser

1. Clone the Repository

git clone https://github.com/<your-username>/UniTrustID.git
cd UniTrustID/projects/CampusID

2. Install Frontend Dependencies

cd frontend
npm install

3. Start the Development Server

# Windows (use local Vite binary)
.\node_modules\.bin\vite.cmd --port 5173

# macOS / Linux
./node_modules/.bin/vite --port 5173

Open http://localhost:5173 in your browser.

4. Connect Your Wallet & Create DID

  1. Click Connect Pera Wallet (or Defly)
  2. Scan the QR code with your mobile wallet app
  3. Fill in your campus profile β€” Name, Student ID, Email, Department
  4. Click ANCHOR DID ON ALGORAND
  5. Approve the 1-ALGO transaction in your wallet app
  6. View the confirmed transaction on Lora Explorer

βš™οΈ Smart Contracts (Optional)

The project includes an AlgoKit-based smart contract scaffold:

# Activate Python virtual environment
# Windows
.venv/Scripts/Activate.ps1
# macOS / Linux
source .venv/bin/activate

# Build contracts
python -m smart_contracts build

πŸ”‘ How It Works

DID Creation Flow

User fills profile β†’ Generate did:algo:<address>
                   β†’ Build W3C DID Document
                   β†’ Create 1-ALGO self-transfer txn with DID note
                   β†’ Sign via Pera/Defly wallet (mobile approval)
                   β†’ Broadcast to Algorand Testnet
                   β†’ Confirm on-chain β†’ View on Lora Explorer

Credential Types

Credential Icon Issuer
Student ID πŸŽ“ Campus Registrar Office
Library Access πŸ“š University Library
Hostel Resident 🏠 Hostel Administration
Event Attendee πŸŽͺ Student Affairs
Course Enrollment πŸ“– Academic Office

Selective Disclosure

When a campus service requests verification, users choose exactly which claims to reveal:

  • βœ… Share: Student ID, Department
  • 🚫 Withhold: CGPA, Email, Phone

This follows privacy-by-design principles β€” only the minimum required information is disclosed.


πŸ› οΈ Tech Stack

Layer Technology
Blockchain Algorand Testnet (AlgoNode API)
SDK algosdk v3.5.2
Wallet @txnlab/use-wallet-react v4.6.0, Pera Wallet, Defly Wallet
Frontend React 18.2, TypeScript 5.3, Vite 5.4
Smart Contracts AlgoKit 2.x, Algorand Python (ARC4)
Identity Standard W3C DID Core v1.0, Verifiable Credentials
Explorer Lora Block Explorer

πŸ”’ Security & Privacy

  • Private keys never leave the wallet β€” all transactions are signed on the mobile device via Pera/Defly
  • No central database β€” DID anchors live on the Algorand blockchain
  • Selective disclosure β€” users control exactly which credential claims are revealed
  • Tamper-proof β€” credentials are cryptographically signed and can be independently verified
  • On-chain auditability β€” every DID anchor transaction is publicly verifiable on Lora

πŸ—ΊοΈ Roadmap

  • W3C DID generation (did:algo:)
  • On-chain DID anchoring (1-ALGO transaction)
  • Pera Wallet & Defly Wallet integration
  • Verifiable Credential issuance (5 types)
  • Selective disclosure for campus services
  • Lora Explorer transaction links
  • Dark / Light theme toggle
  • Mobile-native app (React Native)
  • DID resolution service (off-chain resolver)
  • Credential revocation list
  • Multi-university federation
  • ARC-19 / ARC-69 NFT-based credentials

πŸ‘¨β€πŸ’» Author

Prem Kumar Kuppili


πŸ“„ License

This project is built for academic/educational purposes as part of a campus decentralized identity initiative.


About

UniTrustID is a decentralized identity system built on Algorand that enables students to create, manage, and selectively share verified credentials across campus services. The platform eliminates identity duplication, strengthens privacy, and replaces traditional password-based authentication with wallet-based cryptographic verification.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors