A production-ready blockchain-based decentralized identity management system built with Ethereum, IPFS, and React.
- Decentralized Identifiers (DIDs): Create and manage self-sovereign identities
- Verifiable Credentials: Issue, hold, and verify digital credentials on-chain
- Credential Revocation: Issuers can revoke credentials with immediate status updates
- Audit Trail: Immutable verification logs on the blockchain
- Issuer Dashboard: Register DID, issue credentials using templates, view/revoke credentials
- Holder Dashboard: Register DID, view held credentials, export to PDF, view verification history
- Verifier Dashboard: Verify credentials, check IPFS integrity, log verifications
- Credential Templates (University Degree, Employment, Professional License, etc.)
- PDF Export for credentials
- Toast Notifications
- Loading Skeletons
- Error Boundary
- Search & Filter for credentials
| Category | Technology |
|---|---|
| Blockchain | Solidity 0.8.28, Hardhat 3.0.11 |
| Web3 | Ethers.js 6.15.0 |
| Frontend | React 18.3.1, Vite 7.2.4, TypeScript 5.6.2 |
| Styling | Tailwind CSS 3.4.17 |
| Storage | IPFS (Helia 6.0.11) |
| Wallet | MetaMask |
| jsPDF, html2canvas |
| Contract | Purpose |
|---|---|
DIDRegistry |
Manages decentralized identifiers |
CredentialRegistry |
Handles credential lifecycle (issue, revoke, query) |
EventLogger |
Records verification events and audit trail |
- Node.js v18 or higher
- npm v9 or higher
- MetaMask browser extension
- Git
# Clone repository
git clone https://github.com/Nisarg01-01/IDverse.git
cd IDverse
# Install root dependencies
npm install
# Install frontend dependencies
cd client
npm install
cd ..Open Terminal 1:
npx hardhat nodeKeep this terminal running. You'll see 20 test accounts with 10,000 ETH each.
Open Terminal 2:
npx hardhat run scripts/deploy-local.ts --network localhostExpected output:
DIDRegistry deployed to: 0x5FbDB2315678afecb367f032d93F642f64180aa3
CredentialRegistry deployed to: 0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512
EventLogger deployed to: 0x9fE46736679d2D9a65F0992F2272dE9f3c7fa6e0
Open Terminal 3:
cd client
npm run devOpen http://localhost:5173 in your browser.
Add Hardhat Network:
- MetaMask → Settings → Networks → Add Network
- Fill in:
- Network Name:
Hardhat Local - RPC URL:
http://127.0.0.1:8545 - Chain ID:
31337 - Currency Symbol:
ETH
- Network Name:
Import Test Account:
- Copy private key from Terminal 1:
0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 - MetaMask → Account → Import Account → Paste key
- Switch to Hardhat Local network
You now have 10,000 ETH for testing!
- Connect wallet on home page
- Click Issuer Dashboard tab
- Register DID tab → Enter DID identifier → Click "Register DID"
- Issue Credential tab → Select template → Fill details → Click "Issue Credential"
- Credentials tab → View all issued credentials
- Revoke tab → Enter credential ID → Click "Revoke"
- Click Holder Dashboard tab
- Register your DID in "My Decentralized Identity" section
- Click "View All" in "My Credentials" to see your credentials
- Click on a credential to view details
- Use "Export PDF" to download credential
- View verification history with the history icon
- Click Verifier Dashboard tab
- Enter Credential ID
- Click "Verify" to check validity
- View IPFS integrity check results
- A successful verification is automatically recorded on the blockchain.
To accurately test the separation of roles between an Issuer, a Holder, and a Verifier, you should use three distinct accounts. The application is now set up to automatically detect account changes in MetaMask.
1. Create Additional Accounts in MetaMask:
If you only have one account, create two more:
- Open MetaMask, click the account icon (top-right), and select "Create account".
- Name one "Holder" and the other "Verifier" for clarity.
2. Import Hardhat Test Accounts:
For a clean testing environment, import the pre-funded accounts from your local Hardhat node into MetaMask:
- In the terminal running
npx hardhat node, copy the private keys for Account #1, Account #2, and Account #3. - In MetaMask, click the account icon → "Add account or hardware wallet" → "Import account".
- Paste a private key and click "Import".
- Repeat for all three accounts. Rename them to "Issuer", "Holder", and "Verifier" respectively.
3. Execute the Test Flow:
-
Act as the Issuer:
- Select the "Issuer" account in MetaMask.
- Connect your wallet in the IDverse app.
- Navigate to the "Issuer Dashboard" and first register a DID for this account.
- Now, issue a new credential. For the Holder Address, paste the address of your "Holder" account.
- Approve the transaction.
-
Act as the Holder:
- Switch your active account in MetaMask to "Holder".
- The IDverse app will automatically refresh with the new account's context.
- Navigate to the "Holder Dashboard". The credential you just issued should be visible. Note its ID.
-
Act as the Verifier:
- Switch your active account in MetaMask to "Verifier".
- The app will refresh again.
- Navigate to the "Verifier Dashboard".
- Enter the Credential ID from the previous step and click "Verify". The credential details should be displayed.
This process confirms that the entire lifecycle—from issuance to verification with distinct parties—is working correctly.
# Run all smart contract tests (107 tests)
npx hardhat testIDverse/
├── contracts/ # Solidity smart contracts
│ ├── DIDRegistry.sol
│ ├── CredentialRegistry.sol
│ └── EventLogger.sol
├── scripts/ # Deployment scripts
│ └── deploy-local.ts
├── test/ # Smart contract tests
│ ├── DIDRegistry.test.ts
│ ├── CredentialRegistry.test.ts
│ ├── EventLogger.test.ts
│ └── Integration.test.ts
├── client/ # React frontend
│ ├── src/
│ │ ├── components/ # Reusable components
│ │ │ ├── Toast.tsx
│ │ │ ├── Skeleton.tsx
│ │ │ ├── ErrorBoundary.tsx
│ │ │ └── WalletConnect.tsx
│ │ ├── pages/ # Page components
│ │ │ ├── IssuerPage.tsx
│ │ │ ├── HolderPage.tsx
│ │ │ └── VerifierPage.tsx
│ │ ├── services/ # Web3 & IPFS services
│ │ │ ├── web3.ts
│ │ │ └── ipfs.ts
│ │ ├── data/ # Static data
│ │ │ └── credentialTemplates.ts
│ │ └── App.tsx
│ └── package.json
├── hardhat.config.ts
└── package.json
| Issue | Solution |
|---|---|
| MetaMask "Wrong Network" warning | Switch to Hardhat Local network (Chain ID 31337) |
| "Nonce too high" error | Reset MetaMask account: Settings → Advanced → Clear activity |
| Port 5173 in use | Frontend will auto-switch to 5174 |
| IPFS not ready | Wait a few seconds for Helia to initialize |
| Contract call fails | Ensure Hardhat node is running and contracts are deployed |
MIT License
https://github.com/Nisarg01-01/IDverse
Built with Ethereum, IPFS, React, and TypeScript