Welcome to our project: a decentralized blockchain-based identity and access management system for IIT Dharwad using NFTs. This DApp allows students and faculty to hold a unique NFT representing their identity, use it for academic course registration, fee payment, accessing amenities, and receiving verifiable course completion certificates.
This project demonstrates how NFTs and smart contracts can be applied to real-world institutional processes in an academic setting. Key functionalities include:
-
Digital Identity NFTs
Each student or professor mints a unique NFT containing their name, date of birth, role, and an IPFS-hosted metadata file. -
Academic Course Registration
Users can register for courses directly through the DApp using their Identity NFT. -
Certificate Issuance
Upon course completion, professors can issue course completion NFTs (certificates) to students. These are publicly verifiable via the blockchain. -
Semester Fee Payment
Students can pay their semester fees through a smart contract which records every payment securely. -
Amenity Access Management
Students and faculty can access services such as labs, events, or institute amenities using their NFTs.
- Frontend: React.js (
clientfolder) - Smart Contracts: Solidity + Hardhat (
contractsandscriptsfolders) - Blockchain: Local development via Ganache
- Storage: IPFS via Pinata (to store metadata for NFTs)
- Wallet Integration: MetaMask
- Optional Backend: Node.js + Express.js (
backendfolder)
Follow these steps to set up and run the full-stack application locally:
git clone https://github.com/gupta-rajan/NFT-IdentityDapp
cd project-folder
or download the zip file and extract it.
npm install # install root dependencies
cd client
npm install # install frontend dependencies
cd ..
Start Ganache (GUI or CLI) on port 7545. npx ganache --port 7545 Copy the private key of the first account — it will be used for contract deployment.
Create a .env file inside client/src/ and paste your Pinata keys as follows(an .env file is already provided with the codes that we used):
REACT_APP_PINATA_API_KEY=21767ebeecdecb816506
REACT_APP_PINATA_SECRET_API_KEY=f30c28168542a536ec5700de9869fe31b35ab0903ae63bc2b73ce2fdb637dfb0
REACT_APP_PINATA_JWT=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
Edit hardhat.config.js like this:
require("@nomicfoundation/hardhat-toolbox");
module.exports = {
solidity: "0.8.28",
networks: {
ganache: {
url: "http://127.0.0.1:7545",
accounts: [
"YOUR_GANACHE_PRIVATE_KEY"
]
}
} };
npx hardhat compile
node deployAll.js
This will deploy the following contracts: IdentityNFT, CourseRegistration, CertificateNFT, FeePayment, AmenityAccess
It will also generate ABI files in client/src/abi and store addresses in client/src/config.js
app uses an Express backend. Run the following commands from the root directory to start it:
npm install cd client
npm install
cd ../backend
npm install
npm run dev
This will run both client and backend/server.js which is used for Pinata IPFS cors.
Import Ganache accounts into MetaMask. Switch to the Localhost 7545 network. Refresh the DApp to connect your wallet.
Mint Identity NFT With the Admin account(the account that deployed the contracts), you can choose the role (Student/Professor), enter the details, and upload a photo or ID to IPFS as ID proof to mint a new NFT for some user.
Register for Courses As the Admin, you can create new courses. As a student, can use your Identity NFT to register for offered courses.
Issue Certificates As the Admin, you can issue certificates to Users. As a User, you can view the certificates that were issued to you as NFTs.
Pay Semester Fees The Admin can set the semester fee to be paid for that cycle(semester). Students can pay fees securely through the DApp.
Access Amenities As the Admin, you can create new Amenities for the Users to access. Users can access the Amenities created by the Admin.