Submit your work privately. Verify it publicly.
A dApp where builders can submit their projects with full encryption using Zama's fhEVM on Ethereum Sepolia. Your submission data stays encrypted on-chain and only you (and reviewers you authorize) can access it.
Think of it like a secure dropbox for builders—except everything is encrypted before it even hits the blockchain. Your website links, GitHub repos, and demo videos are encrypted locally, stored on IPFS, and verified on-chain using fhEVM. No one can see your submission unless you explicitly grant them access.
- You encrypt locally - Your URLs get encrypted in your browser using TweetNaCl
- Upload to IPFS - Encrypted data goes to IPFS via Pinata
- Hash gets encrypted with fhEVM - A verification hash is encrypted using Zama's fhEVM
- Submit to blockchain - Only the encrypted hash and public metadata (your name, timestamp) go on-chain
- Grant access when ready - Use fhEVM's built-in ACL to let reviewers decrypt your submission
- Next.js + React + Tailwind CSS
- Zama fhEVM (for on-chain encrypted data)
- IPFS via Pinata (for encrypted file storage)
- Hardhat (smart contract development)
- RainbowKit + Wagmi (wallet connection)
- Sepolia testnet
1. Clone and install
git clone https://github.com/YOUR_USERNAME/Privabuild.git
cd Privabuild
npm install2. Set up your environment
Copy the example file and fill in your credentials:
cp .env.example .envYou'll need:
- An Alchemy API key (get one at alchemy.com)
- A wallet private key (for deploying the contract)
- A Pinata JWT token (sign up at pinata.cloud)
3. Compile the contract
npm run compile4. Deploy to Sepolia
Make sure your wallet has some Sepolia ETH, then:
npm run deployThis deploys the Privabuild contract and saves the address to lib/contract-config.json.
5. Run the app
npm run devOpen http://localhost:3000 and you're good to go.
Your data is encrypted before it leaves your browser. The blockchain only sees:
- Your builder name (public)
- IPFS hash (points to encrypted data)
- Encrypted verification hash (via fhEVM)
- Timestamp (public)
The actual URLs? Encrypted and stored on IPFS. Nobody can read them without your permission.
You control who sees what. Grant access to reviewers using fhEVM's native ACL system. Revoke it whenever you want. The contract deployer has zero access to your data—it's your submission, your rules.
See submissions in real-time. You'll see builder names and timestamps, but the actual project data stays locked with a 🔒 icon unless you have permission to decrypt it.
├── contracts/ # Solidity smart contracts
│ └── Privabuild.sol
├── scripts/ # Deployment scripts
├── lib/ # Core utilities
│ ├── fheUtils.ts # fhEVM encryption logic
│ ├── ipfsStorage.ts # IPFS upload/download
│ └── contractUtils.ts # Contract interactions
├── components/ # React components
│ ├── submission-form.tsx
│ ├── submissions-feed.tsx
│ └── grant-access.tsx
├── app/ # Next.js app directory
└── hardhat.config.js
The contract is straightforward. It stores:
- Builder address
- Builder name (public)
- IPFS CID (public, but points to encrypted data)
- Encrypted hash (
euint256via fhEVM) - Timestamp
Key functions:
submit()- Submit a new encrypted projectgrantAccess()- Give someone permission to decrypt your hashrevokeAccess()- Remove their accessgetSubmissionMeta()- Get public metadata
All the fhEVM logic lives in lib/fheUtils.ts. If you want to upgrade to a newer fhEVM version later, just update the imports there—everything else stays the same.
Client-side encryption uses TweetNaCl secretbox. The encryption key gets displayed once after submission (user needs to save it to decrypt their data later).
Builder programs and bounty submissions are usually public. This means everyone can see what you're building before you're ready to share. With Privabuild, you can submit early, prove you submitted on-chain, but keep the details private until you're ready to reveal.
It's also a practical demo of fhEVM—showing how to use encrypted types (euint256), ACL management (FHE.allow()), and client-side encryption in a real app.
MIT
Zama Builder Program - demonstrating practical fhEVM usage with IPFS integration.