“Privacy doesn’t have to come at the cost of trust—this ZKP authentication DApp proves it.”
A privacy-first full-stack solution where users generate and verify zero-knowledge proofs before unlocking secure IPFS uploads. Built with Circom, snarkjs, Solidity, Hardhat, and React + Vite + Ethers.js.
- Node.js v18+
- pnpm (or npm/yarn)
- Git
- Linux/macOS/WSL2 (for Circom) or Docker
- Hardhat v2.x (in
contractsfolder) - snarkjs v0.7.x & circom v2.x (in
circuitsfolder) - MetaMask extension
Clone and install dependencies:
git clone https://github.com/Shubham0699/Auth_ZKP.git
cd Auth_ZKP
# Root workspace install
pnpm install
# Or per subfolder:
# circuits/ ➔ pnpm install
# contracts/ ➔ pnpm install
# app/ ➔ pnpm installcd circuits
# Compile circuit
circom password.circom --r1cs --wasm --sym -o build
# Powers of Tau ceremony (demo)
snarkjs powersoftau new bn128 12 build/pot12_0000.ptau
snarkjs powersoftau contribute build/pot12_0000.ptau build/pot12_0001.ptau --name="contrib1"
snarkjs powersoftau prepare phase2 build/pot12_0001.ptau build/pot12_final.ptau
# Groth16 setup & zkey generation
snarkjs groth16 setup build/password.r1cs build/pot12_final.ptau build/password_0000.zkey
snarkjs zkey contribute build/password_0000.zkey build/password_final.zkey --name="key1"
# Export verification key + Solidity verifier
snarkjs zkey export verificationkey build/password_final.zkey build/verification_key.json
snarkjs zkey export solidityverifier build/password_final.zkey build/Verifier.solcd contracts
# Run local Hardhat node
pnpm hardhat node
# In new terminal, set env and deploy locally
export LOCAL_RPC_URL=http://127.0.0.1:8545
export PRIVATE_KEY=<YOUR_KEY>
pnpm hardhat run scripts/deploy.js --network localhostcd app
pnpm run devVisit http://localhost:5173, connect MetaMask, verify your ZK proof, and upload files to IPFS.
- Zero-knowledge proof generation (Circom + snarkjs)
- On-chain proof verification (Groth16)
- Access-gated IPFS uploader (conditional React UI)
- Full-stack modular architecture (circuits, contracts, frontend)
- Integrate PLONK or recursive proofs
- Persist auth state in localStorage or backend
- Add CI/CD for automated testing and deployment
License: MIT