A decentralized credential management system built on Solana blockchain that enables secure issuance, storage, and verification of digital certificates.
- Overview
- Architecture
- Tech Stack
- Project Structure
- Getting Started
- Features
- API Documentation
- Solana Program
- Demo
AICerts is a hybrid on-chain/off-chain credential issuance platform that leverages Solana's blockchain for immutable proof storage while maintaining cost efficiency by storing detailed metadata off-chain in MongoDB.
Live Website: https://frontend-aicerts-solana-project.vercel.app/
Smart Contract Address: EtcxZLVKnZBwHsMgFt8kuAZ3eenMgcZi5YWSNGmJYxDA
On-Chain Storage (Solana PDA)
- Credential hash (32 bytes)
- Owner public key
- Credential ID (PDA public key)
Off-Chain Storage (MongoDB)
- Complete metadata JSON
- Template ID
- Logo & signature (base64/URL)
- Transaction signature
- Issuer public key
- Issue date & expiry
- Shareable link
- β Cost-effective (on-chain storage is expensive)
- β Immutable proof on blockchain
- β Flexible metadata management
- β Efficient verification via hash comparison
βββββββββββββββββββββββββ
β Issuer Dashboard β
β (Create Templates) β
βββββββββββββ¬ββββββββββββ
β
β POST Template
βΌ
βββββββββββββββββββββββββββββ
β Backend (Express + Mongo) β
β Store Templates/Metadata β
βββββββββββββ¬ββββββββββββββββ
β
β Issue Credential
βΌ
βββββββββββββββββββββββββββββ
β Backend Solana Service β
β β’ Hash metadata β
β β’ Derive PDA β
β β’ Submit transaction β
ββββββββββββ¬βββββββββββββββββ
β
βΌ
ββββββββββββββββββββββββ
β Solana Blockchain β
β Store hash + owner β
ββββββββββββ¬ββββββββββββ
β
β Verification
βΌ
ββββββββββββββββββββββββ
β Recipient View UI β
β Verify credentials β
ββββββββββββββββββββββββ
| Layer | Technology |
|---|---|
| Frontend | React + Vite + TypeScript |
| Backend | Node.js + Express.js |
| Database | MongoDB (Mongoose) |
| Blockchain | Solana + Anchor Framework |
| Hashing | SHA-256 (js-sha256) |
| Wallet Integration | Phantom / Solana Web3.js |
| Smart Contract Deployment | Solana Devnet |
| Application Deployment | Vercel |
-
Init :: npm create vite@latest frontend
-
Live website :: https://frontend-aicerts-solana-project.vercel.app/
-
To run locally ::
cd frontend
npm install
npm run dev
- Pages
- Issuer Dashboard - http://localhost:5173/createTemplate :: reference
- Issue Credential Screen - http://localhost:5173/issueCredential :: reference
- Recipient View Page - http://localhost:5173/recipientView :: reference
- Verification Page - http://localhost:5173/verification :: reference
-
Init :: anchor init solana
-
To Build :: anchor build
-
IDL (Interface Description Language) - target/idl/solana.json
-
INIT :: npx express-generator-typescript backend
-
TO run Locally ::
cd backend
npm install
npm run dev:hot
-
APIS
- /api/templates - POST call to create a template
- /api/templates - GET call to get all the available templates
- /api/credentials - POST call to store metadata
- /api/credentials - GET call to fetch all the credentials issued
- /api/credentials/by-name - POST call to fetch credentials based on Recipient Name
- /api/credentials/verify/:credentialId - GET call to verify the certificateId/credentialId issued on solana
aicerts-solana-project/
β
βββ backend/
β βββ src/
β β βββ controllers/ # Request handlers
β β βββ models/ # MongoDB schemas
β β βββ routes/ # API routes
β β βββ services/ # Business logic
β βββ .env
β βββ package.json
β
βββ frontend/
β βββ src/
β β βββ components/ # Reusable UI components
β β βββ pages/ # Application pages
β β βββ idl/solana.json # Program interface
β β βββ utils/ # Helper functions
β βββ package.json
β
βββ programs/
βββ solana/
βββ src/lib.rs # Solana program code
βββ Cargo.toml
βββ Anchor.toml
- Node.js (v16 or higher)
- Solana CLI
- Anchor Framework
- MongoDB
- Phantom Wallet
cd frontend
npm install
npm run devThe application will be available at http://localhost:5173
cd backend
npm install
npm run dev:hotThe API server will start on the configured port.
cd programs/solana
anchor buildThe compiled IDL will be available at target/idl/solana.json
Route: /createTemplate
Create custom certificate templates with:
- Dynamic field management (add/edit/delete)
- Logo and signature upload
- Real-time certificate preview
- Template persistence to MongoDB
Route: /issueCredential
Issue credentials with the following workflow:
- Select from existing templates
- Fill credential-specific fields
- Connect issuer wallet
- Backend generates metadata hash
- PDA derived using:
[metadata_hash + issuer_pubkey] - Hash and owner stored on-chain
- Complete metadata stored off-chain
Route: /recipientView
Recipients can:
- View all issued credentials
- Display certificates in styled format
- Generate shareable credential links
Route: /verification
Verify credentials through:
- Enter credential ID
- Fetch PDA account from blockchain
- Retrieve stored metadata from backend
- Compare hashes
- Display result: VALID or INVALID
Create Template
POST /api/templates
Content-Type: application/json
{
"name": "Template Name",
"fields": [...],
"logo": "base64_string",
"signature": "base64_string"
}Get All Templates
GET /api/templatesStore Credential Metadata
POST /api/credentials
Content-Type: application/json
{
"templateId": "...",
"metadata": {...},
"issuerPublicKey": "...",
"txSignature": "..."
}Get All Credentials
GET /api/credentialsGet Credentials by Recipient Name
POST /api/credentials/by-name
Content-Type: application/json
{
"recipientName": "John Doe"
}Verify Credential
GET /api/credentials/verify/:credentialIdProgram ID: EtcxZLVKnZBwHsMgFt8kuAZ3eenMgcZi5YWSNGmJYxDA
Instruction: createCredential
Purpose: Store credential hash and owner in a Program Derived Address (PDA)
Seeds: ["credential", owner_pubkey, credential_hash]
Stored Fields:
pub struct Credential {
pub credential_hash: [u8; 32],
pub owner: Pubkey,
}Returned Value: PDA public key serves as the credentialId
- Receive metadata JSON
- Generate hash:
sha256(JSON.stringify(metadata)) - Derive PDA using seeds
- Call
createCredentialinstruction - Store metadata in MongoDB
- Return
credentialIdto frontend
- Fetch metadata from backend API
- Fetch PDA account from Solana
- Hash the retrieved metadata
- Compare with
account.credentialHash - Result: VALID (if equal) or INVALID (if different)
Watch the full platform demonstration: Demo Video
Contributions are welcome! Please feel free to submit a Pull Request.
This project is open source and available under the MIT License.
Built with β€οΈ using Solana, React, and Node.js



