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.
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.mdClone the Repository
git clone https://github.com/tharunR-17/Certificate-Verification.git
cd Certificate-Verification/backendTry 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 .Each certificate is stored in MongoDB in the following format:
{
"studentName": "John Doe",
"courseName": "Blockchain 101",
"issuedDate": "2024-04-12",
"grade": "A+",
"certHash": "0xabc123..."
}- ✅ Add certificate revocation
- ☁️ Integrate IPFS for certificate storage
- 🔐 Admin authentication
- 🦊 MetaMask frontend integration
- Node.js (v18+ recommended)
- Ganache (for local Ethereum blockchain)
- MongoDB (Local or cloud e.g. MongoDB Atlas)
- Metamask (if using frontend wallet in future)
- 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.
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.