A decentralized credential verification system built on Base blockchain, featuring Soulbound tokens for immutable credentials, IPFS storage for proofs, and seamless Farcaster integration.
- π Wallet Integration: Connect Base wallets using OnchainKit
- π Credential Minting: Mint NFT/Soulbound tokens for credentials
- π IPFS Storage: Store credential proofs on decentralized storage
- π± QR Verification: Generate QR codes for instant verification
- β Onchain Verification: Verify credentials directly on blockchain
- π Farcaster Sharing: Share verified credentials on Farcaster
- β‘ Real-time Updates: Live notifications for credential events
- Frontend: Next.js 14, React 18, TypeScript, TailwindCSS
- Blockchain: Base (Layer 2), Solidity, OnchainKit, Ethers.js
- Storage: IPFS (Web3.Storage, Pinata)
- Social: Farcaster, Neynar API
- Backend: Node.js, Express.js
- Database: Redis (caching), Optional MongoDB/PostgreSQL
- Development: Hardhat, TypeScript
- Node.js 18+ and npm
- Git
- Metamask or compatible wallet
- Base Sepolia ETH for testing
git clone <your-repo-url>
cd base-template-mini-appnpm installCopy the environment template:
cp .env.example .env.localFill in your configuration in .env.local:
# Base Network Configuration
NEXT_PUBLIC_CHAIN_ID=84532
NEXT_PUBLIC_RPC_URL=https://sepolia.base.org
# Smart Contract (Deploy first, then add address)
NEXT_PUBLIC_PROOFVAULT_CONTRACT_ADDRESS=your_contract_address
PRIVATE_KEY=your_deployer_private_key
# IPFS Configuration
WEB3_STORAGE_TOKEN=your_web3_storage_token
PINATA_API_KEY=your_pinata_key
# Farcaster/Neynar
NEYNAR_API_KEY=your_neynar_key
NEYNAR_CLIENT_ID=your_client_id
# Redis (for notifications)
KV_REST_API_TOKEN=your_upstash_token
KV_REST_API_URL=your_upstash_urlDeploy the ProofVault contract to Base Sepolia:
# Compile contracts
npx hardhat compile
# Deploy to Base Sepolia
npx hardhat run scripts/deploy.js --network baseSepolia
# Update .env.local with deployed contract addressnpm run devOpen http://localhost:3000 to see ProofVault in action!
POST /api/credentials- Mint new credentialGET /api/credentials- Get all credentials (admin)GET /api/credentials/[wallet]- Get user credentialsDELETE /api/credentials/[wallet]- Revoke credential
POST /api/verify- Verify credentialGET /api/verify?tokenId=123- Quick verification
POST /api/share- Generate share linkGET /api/share?tokenId=123- Get shareable info
POST /api/send-notification- Send notificationGET /api/send-notification?fid=123- Get user notifications
POST /api/webhook- Handle Farcaster webhooksGET /api/webhook- Webhook verificationACCOUNT_ASSOCIATION_HEADER ACCOUNT_ASSOCIATION_PAYLOAD ACCOUNT_ASSOCIATION_SIGNATURE
- Redeploy to update the build with new environment variables
- Import the auth utilities:
import { fetchWithAuth } from "~/lib/auth";- Use
fetchWithAuthfor API calls:
// Example API call
const response = await fetchWithAuth("/api/protected-route");
const data = await response.json();- Import the auth utilities:
import { verifyAuth } from "~/lib/auth";- Verify authentication in your route:
export async function GET(request: Request) {
const auth = await verifyAuth(request);
if (!auth) {
return new NextResponse("Unauthorized", { status: 401 });
}
// Your protected route logic here
return NextResponse.json({ fid: auth.fid });
}This is made using Neynar's StarterKit this Neynar docs page for a simple guide on how to create a Farcaster Mini App in less than 60 seconds!
To create a new mini app project, run:
Click on use this template.
To run the project:
cd <PROJECT_NAME>
npm run dev
To create a production build, run:
npm run build
The above command will generate a .env file based on the .env.local file and user input. Be sure to configure those environment variables on your hosting platform.
AI guide for FC Mini Apps SDK - https://miniapps.farcaster.xyz/docs/getting-started#building-with-ai
AI guide for Neynar - https://docs.neynar.com/docs/neynar-farcaster-with-cursor
Lets u open Apps inside social feed. Leverage and build on social Data so add social component to make your app viral. Send Notifications to retain the users.
Simple flow
- Build your simple App just like u bulid webapps
- Wrap it inside the NeynarProvider (FrameContext) to get the context of the user [username, fid, walletadd, pfp and with fid his entire social graph]
- Access the inbuilt Farcaster Wallet for any onchain activity
Status: FULLY FUNCTIONAL MINIAPP DEPLOYED π
Pages Structure (Next.js Pages Router):
- β
Landing Page (
/) - Hero section with features showcase - β
Dashboard (
/dashboard) - Credential management with wallet integration - β
Mint Page (
/mint) - Credential minting with file upload - β
Verify Page (
/verify) - QR code verification system - β
Profile Page (
/profile) - User profile with Farcaster sharing
API Endpoints:
- β
/api/mint- Credential minting with IPFS integration - β
/api/verify/[tokenId]- Credential verification - β
/api/share- Social sharing with QR generation - β
/api/credentials/[walletAddress]- User credential fetching
Components & Services:
- β
WalletConnect- Base network wallet integration - β
CredentialCard- Credential display with actions - β
useWalletHook - Wallet state management - β IPFS Service - Web3.Storage integration
- β OnchainKit Service - Base blockchain integration
- β Farcaster Service - Social sharing with Neynar API
Smart Contract:
- β ProofVault.sol - ERC721 Soulbound credential contract
The ProofVault miniapp is LIVE and FUNCTIONAL at:
- Local Development: http://localhost:3000
- Warpcast Testing: Use the Warpcast Developer Tools with localhost URL
- Wallet Connection - MetaMask integration with Base network switching
- Credential Minting - File upload, IPFS storage, blockchain minting
- Verification System - QR code generation, credential validation
- Social Sharing - Farcaster frames, Twitter integration
- Dashboard Management - View credentials, share, verify actions
npm run dev # Start development server
npm run build # Build for production
npm start # Start production server
npm run lint # Code linting- Local Testing: Visit http://localhost:3000
- Farcaster Testing:
- Go to https://warpcast.com/~/developers
- Use "Preview Mini App" tool
- Enter: http://localhost:3000
- Click "Preview" to test
- β Complete Pages Structure: 5 main pages implemented
- β Full API Integration: 4 API endpoints with error handling
- β Wallet Integration: Base network support with MetaMask
- β IPFS Storage: File upload and decentralized storage
- β Social Features: Farcaster frames and sharing
- β Responsive Design: Mobile-optimized interface
- β Error Handling: Comprehensive error management
- β Development Ready: Hot reload, linting, TypeScript support
ProofVault is production-ready for the Base ecosystem! π