Skip to content

Repository files navigation

🚀Blockchain Certificate Verification System

This project demonstrates a decentralized certificate issuing and verification system using Ethereum smart contracts, a Node.js backend, and MongoDB. The frontend is built with HTML/CSS/JS. It enables institutions to securely issue and verify student certificates on the blockchain.

🛠️ Project Structure

Certificate-Verification/
├── backend/             # Node.js + Express + MongoDB + Ethers
│   ├── models/          # Mongoose models
│   ├── index.js         # Main backend server
│   └── .env             # Environment variables (not pushed)
├── contracts/           # Solidity smart contract
├── artifacts/           # Compiled smart contract (from Hardhat)
├── frontend/            # HTML + CSS + JS static frontend
│   ├── index.html       # Homepage
│   ├── issue.html       # Certificate issuing
│   └── verify.html      # Certificate verification
├── .gitignore
└── README.md

📦 Backend Setup Instructions

Clone the Repository

git clone https://github.com/tharunR-17/Certificate-Verification.git
cd Certificate-Verification/backend

Try running some of the following tasks:

# 1. Install all project dependencies
npm install
# 2. Compile the smart contract
npx hardhat compile
# 3. Start a local blockchain
npx hardhat node
# 4. Deploy the contract to the local blockchain
npx hardhat run scripts/deploy.js --network localhost
# 5. Create a .env file inside the backend folder and add the following:
# (Replace values as needed)

MONGO_URI=mongodb://localhost:27017/certificates
GANACHE_URL=http://127.0.0.1:7545
PRIVATE_KEY=your_private_key
CONTRACT_ADDRESS=deployed_contract_address
# 6. Start the backend server
cd backend
npm install
node index.js
# 7. Open the frontend in a browser (index.html, issue.html, verify.html)
# Or serve using a local server:
cd frontend
npx serve .

MongoDB Certificate Schema

Each certificate is stored in MongoDB in the following format:

{
  "studentName": "John Doe",
  "courseName": "Blockchain 101",
  "issuedDate": "2024-04-12",
  "grade": "A+",
  "certHash": "0xabc123..."
}

Optional Enhancements

  • ✅ Add certificate revocation
  • ☁️ Integrate IPFS for certificate storage
  • 🔐 Admin authentication
  • 🦊 MetaMask frontend integration

✅ Prerequisites

  • Node.js (v18+ recommended)
  • Ganache (for local Ethereum blockchain)
  • MongoDB (Local or cloud e.g. MongoDB Atlas)
  • Metamask (if using frontend wallet in future)

🛡️ Security Notes

  • Certificate hashes are generated using keccak256 (same as Solidity's hashing).
  • All certificate data is stored on-chain for verification; metadata is stored in MongoDB.
  • Consider adding HTTPS + authentication + revocation logic for production.

🤝 Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.


About

The Blockchain Certificate Verification System is a secure and tamper-proof platform that enables educational institutions to issue and verify student certificates on the Ethereum blockchain. This system eliminates certificate forgery by leveraging the immutability and transparency of blockchain technology.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages