A decentralized, tamper-proof certificate verification system built on Ethereum. Institutions can issue certificates on-chain, and anyone can verify their authenticity instantly β no central authority required.
https://github.com/user/CertificateVerifier/assets/123456789/abc123-def456-ghi789
β¨ Features:
- π Tamper-proof certificate issuance & verification
- π Professional PDF certificate generation
- βοΈ IPFS storage via Pinata for decentralized file hosting
- π± QR codes for mobile verification
- π Works on Ethereum (local testnet or Sepolia)
- π» Responsive React.js frontend
- π§ͺ Tested with Ganache & Truffle
While this is a local dApp, you can run it on your machine in <5 minutes!
(Future: Deployed version coming soon on Sepolia + Vercel)
- Smart Contract: Solidity 0.8.18 (Truffle)
- Frontend: React.js + Web3.js
- Backend: Express.js + Puppeteer (PDF generation)
- Storage: IPFS via Pinata API
- Blockchain: Ethereum (Ganache for local testing)
- Tools: Truffle, Ganache, MetaMask
- Node.js (v16βv20 recommended)
- MetaMask browser extension
- Pinata Account (free tier works)
- Git
git clone https://github.com/your-username/CertificateVerifier.git
cd CertificateVerifier# Install Truffle globally (if not already)
npm install -g truffle
# Install project dependencies
npm install
# Install React frontend dependencies
cd client
npm install
cd ..-
Go to Pinata and create a free account
-
Navigate to API Keys section
-
Click New Key and create an API key with pinning permissions
-
Copy your API Key and Secret
-
Create a
.envfile in the project root:
# Copy the example file
copy .env.example .env # Windows
cp .env.example .env # macOS/Linux- Edit
.envand add your Pinata credentials:
PINATA_API_KEY=your_actual_api_key_here
PINATA_SECRET=your_actual_secret_key_here
PORT=3001
FRONTEND_URL=http://localhost:5173.env file to version control!
npx ganacheπ Note: This starts a local blockchain on http://127.0.0.1:8545 (Chain ID: 1337)
truffle migrate --reset --network development# Windows (PowerShell)
Copy-Item build/contracts/CertificateVerifier.json client/src/contracts/
# macOS/Linux
cp build/contracts/CertificateVerifier.json client/src/contracts/Terminal 1 - Start Backend Server:
node server.jsYou should see:
π Backend server running on http://localhost:3001
β
Pinata API Key loaded: xxxxx...
β
Pinata Secret loaded
Terminal 2 - Start Frontend:
cd client
npm run dev-
Add Custom Network
Network Name: Ganache CLI
RPC URL: http://127.0.0.1:8545
Chain ID: 1337
-
Import account using the first private key from Ganache CLI output
π Go to http://localhost:5173
Issue a Certificate
- Fill in Student Name, Course, and Email
- Click "Issue Certificate"
- Wait for PDF generation (takes ~5-10 seconds)
- Confirm transaction in MetaMask
- Download the PDF certificate from IPFS link
Verify a Certificate
- Enter the same Email and Course
- Click "Verify"
- See certificate details with IPFS link
- Scan QR code to verify on mobile
β All certificates are:
- Stored immutably on the blockchain
- Backed by PDF files on IPFS
- Verifiable via QR codes
Error: "PINATA_API_KEY is missing"
- Make sure you created a
.envfile in the project root - Verify your Pinata credentials are correct
- Restart the server after adding credentials
Error: "ECONNREFUSED"
- Ensure the backend server is running on port 3001
- Check if another process is using port 3001
Error: "PDF generation failed"
- Puppeteer requires Chrome/Chromium to be installed
- On Windows, it should install automatically with
npm install - On Linux, you may need to install dependencies:
sudo apt-get install -y chromium-browser
Error: "Authentication failed"
- Double-check your Pinata API credentials
- Ensure there are no extra spaces in your
.envfile - Try regenerating your API key on Pinata
Error: "Rate limit exceeded"
- Free Pinata accounts have rate limits
- Wait a few minutes before trying again
- Consider upgrading your Pinata plan for production use
Transaction Fails
- Ensure you have enough ETH in your Ganache account
- Check that you're connected to the correct network (Ganache)
- Try resetting your MetaMask account (Settings β Advanced β Reset Account)
CertificateVerifier/
βββ contracts/ # Solidity smart contracts
β βββ CertificateVerifier.sol
βββ migrations/ # Truffle deployment scripts
βββ client/ # React frontend
β βββ src/
β βββ App.jsx # Main application component
β βββ contracts/ # Contract ABIs
βββ server.js # Express backend (PDF + IPFS)
βββ .env # Environment variables (not in git)
βββ .env.example # Example environment file
βββ package.json # Backend dependencies
βββ truffle-config.js # Truffle configuration
- Deploy to Sepolia testnet
- Batch certificate issuance
- Email notifications with certificate links
- Certificate revocation system
- Multiple certificate templates
- Admin dashboard for institutions
- Certificate analytics
MIT License - feel free to use this project for learning or production!!