A production-ready Web3 application for creating and verifying NFT-based professional achievements. Build your decentralized resume with verifiable on-chain credentials.
- π MetaMask Integration - Secure wallet connection
- π¨ Mint Achievement NFTs - Create verifiable credentials on-chain
- π Dashboard - View all your achievements with stats
- π Dark Mode - Modern UI with dark mode support
- π± Responsive Design - Works on all devices
- β Verify Achievements - Mark achievements as verified
- π Admin Panel - Manage all achievements in the system
- π― Role-Based Access - Only contract owner can verify
- π Filter & Search - Filter by verification status
- βοΈ ERC-721 NFT Standard - Industry standard implementation
- π Access Control - Ownable pattern for admin functions
- π‘ Event Emission - Track all actions on-chain
- π IPFS Ready - Metadata storage support
- β‘ Gas Optimized - Efficient smart contract design
- Solidity ^0.8.20
- OpenZeppelin Contracts - ERC-721, Ownable
- Hardhat - Development framework
- React 18.2.0
- TypeScript 5.3.0
- Tailwind CSS 3.3.6
- ethers.js 6.9.0
- Ethereum Sepolia Testnet (default)
- Hardhat Local Network (for development)
on-chain-resume-verifier/
βββ contracts/ # Smart contracts
β βββ AchievementNFT.sol # Main ERC-721 contract
βββ scripts/ # Deployment scripts
β βββ deploy.js # Contract deployment
βββ frontend/ # React frontend
β βββ public/
β β βββ index.html
β βββ src/
β βββ components/ # React components
β β βββ Header.tsx
β β βββ AchievementForm.tsx
β β βββ AchievementCard.tsx
β β βββ AchievementList.tsx
β β βββ AdminPanel.tsx
β β βββ Toast.tsx
β βββ hooks/ # Custom React hooks
β β βββ useWallet.ts
β β βββ useContract.ts
β βββ utils/ # Utility functions
β β βββ helpers.ts
β βββ types/ # TypeScript types
β β βββ index.ts
β βββ contracts/ # Contract ABIs (generated)
β βββ App.tsx # Main app component
β βββ index.tsx # Entry point
β βββ index.css # Styles
βββ hardhat.config.js # Hardhat configuration
βββ package.json # Dependencies
βββ .env.example # Environment variables template
βββ README.md # This file
- Node.js >= 16.0.0
- npm or yarn
- MetaMask browser extension
- (Optional) Alchemy or Infura account for testnet deployment
- Clone the repository
git clone <repository-url>
cd on-chain-resume-verifier- Install root dependencies
npm install- Install frontend dependencies
cd frontend
npm install
cd ..- Set up environment variables
cp .env.example .envEdit .env and add your configuration:
# Your MetaMask private key (NEVER commit this!)
PRIVATE_KEY=your_private_key_here
# Get free RPC from Alchemy: https://www.alchemy.com/
SEPOLIA_RPC_URL=https://eth-sepolia.g.alchemy.com/v2/YOUR_API_KEY
# Optional: For contract verification
ETHERSCAN_API_KEY=your_etherscan_api_keynpm run compileThis will:
- Compile the Solidity contract
- Generate TypeScript types
- Create ABI files in
artifacts/
- Start local blockchain:
npm run node- In a new terminal, deploy:
npm run deploy:local-
Get testnet ETH from Sepolia Faucet
-
Deploy to Sepolia:
npm run deploy:sepoliaAfter deployment, you'll see:
β
AchievementNFT deployed to: 0x123...abc
Contract owner: 0x456...def
The deployment script automatically:
- Saves contract address to
frontend/src/contracts/contract-address.json - Copies ABI to
frontend/src/contracts/AchievementNFT.json
cd frontend
npm startThe app will open at http://localhost:3000
-
Add Sepolia Network (if using testnet)
- Network Name: Sepolia
- RPC URL: https://rpc.sepolia.org
- Chain ID: 11155111
- Currency: ETH
-
Import Account (if using local network)
- Use one of the private keys from Hardhat's local accounts
-
Connect Wallet in the app
-
Connect Wallet
- Click "Connect Wallet" button
- Approve MetaMask connection
-
Mint Achievement
- Fill in the form:
- Title: e.g., "Full Stack Developer Certificate"
- Description: Details about your achievement
- Issue Date: When you earned it
- Click "Mint Achievement NFT"
- Confirm transaction in MetaMask
- Fill in the form:
-
View Achievements
- See all your minted achievements
- Check verification status
- View statistics
-
Access Admin Panel
- Connect with the contract owner account
- Click "Manage All Achievements"
-
Verify Achievements
- Browse all achievements in the system
- Click "Verify Achievement" on pending items
- Confirm transaction in MetaMask
-
Filter Achievements
- All: View all achievements
- Verified: Only verified achievements
- Pending: Only unverified achievements
npm test- Start local node:
npm run node - Deploy locally:
npm run deploy:local - Run frontend:
cd frontend && npm start - Use MetaMask with local network
Edit hardhat.config.js to add more networks:
networks: {
polygon: {
url: process.env.POLYGON_RPC_URL,
accounts: [process.env.PRIVATE_KEY],
chainId: 137,
},
}After deployment, the contract address is stored in:
frontend/src/contracts/contract-address.json
mintAchievement(title, description, issueDate, tokenURI)- Mint new achievement NFTgetTokensByOwner(address)- Get all token IDs owned by addressgetAchievement(tokenId)- Get achievement detailsisVerified(tokenId)- Check if achievement is verified
verifyAchievement(tokenId)- Mark achievement as verifiedunverifyAchievement(tokenId)- Remove verification
AchievementMinted(tokenId, owner, title, issueDate)AchievementVerified(tokenId, verifier, verifiedDate)AchievementUnverified(tokenId, verifier)
- Wallet connection status
- Dark mode toggle
- Admin badge for owner
- Title input with validation
- Description textarea
- Date picker
- Loading states
- Achievement details
- Verification badge
- Admin actions
- Copy token ID
- Filter tabs
- Statistics cards
- All achievements view
- Never commit
.envfile - Contains private keys - Use test networks first - Before mainnet deployment
- Verify contracts - On Etherscan after deployment
- Test thoroughly - All functionality before production
- Keep dependencies updated - Regular security updates
"Contract not deployed"
- Run deployment script:
npm run deploy:local - Check contract address in
frontend/src/contracts/contract-address.json
"Please install MetaMask"
- Install MetaMask extension
- Refresh the page
"Transaction failed"
- Check you have enough ETH for gas
- Ensure you're on the correct network
- Try increasing gas limit
"Cannot connect to network"
- Verify RPC URL in
.env - Check network is running (for local)
- Ensure MetaMask is on correct network
- IPFS integration for metadata storage
- ENS domain resolution
- Achievement categories/tags
- Public profile pages
- Achievement sharing on social media
- Multi-chain support
- Batch minting
- Achievement templates
- Reputation scoring system
- Integration with LinkedIn
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License.
- Hardhat Documentation
- OpenZeppelin Contracts
- ethers.js Documentation
- React Documentation
- Tailwind CSS
- MetaMask Documentation
For issues and questions:
- Open an issue on GitHub
- Check existing documentation
- Review Hardhat/ethers.js docs
Built with β€οΈ using:
- OpenZeppelin for secure smart contract libraries
- Hardhat for development framework
- React and TypeScript for modern frontend
- Tailwind CSS for beautiful UI
- ethers.js for blockchain interaction
Happy Building! π