{"id":25445631,"url":"https://github.com/thecoderadi/zk-online-hackathon","last_synced_at":"2025-07-31T22:33:46.844Z","repository":{"id":277476106,"uuid":"932189905","full_name":"TheCoderAdi/ZK-Online-Hackathon","owner":"TheCoderAdi","description":null,"archived":false,"fork":false,"pushed_at":"2025-02-14T04:49:56.000Z","size":135,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-16T05:09:15.323Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TheCoderAdi.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-02-13T14:15:58.000Z","updated_at":"2025-02-14T04:50:00.000Z","dependencies_parsed_at":"2025-02-14T05:28:07.428Z","dependency_job_id":"4caf8133-594b-4179-8db8-cc116906ecb2","html_url":"https://github.com/TheCoderAdi/ZK-Online-Hackathon","commit_stats":null,"previous_names":["thecoderadi/zk-online-hackathon"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/TheCoderAdi/ZK-Online-Hackathon","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheCoderAdi%2FZK-Online-Hackathon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheCoderAdi%2FZK-Online-Hackathon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheCoderAdi%2FZK-Online-Hackathon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheCoderAdi%2FZK-Online-Hackathon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TheCoderAdi","download_url":"https://codeload.github.com/TheCoderAdi/ZK-Online-Hackathon/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheCoderAdi%2FZK-Online-Hackathon/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268127692,"owners_count":24200420,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-31T02:00:08.723Z","response_time":66,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-02-17T16:32:04.472Z","updated_at":"2025-07-31T22:33:46.787Z","avatar_url":"https://github.com/TheCoderAdi.png","language":"JavaScript","readme":"## **(Full Setup Guide)**\r\n\r\n# **ZK-Powered DeFi Credit Score System**\r\n\r\n_A decentralized, privacy-preserving credit scoring system using zk-SNARKs, Arbitrum, and zkVerify._\r\n\r\n---\r\n\r\n## **📂 Project Structure**\r\n\r\n```\r\n📂 ZK-Online-Hackathon\r\n│── 📂 circuits       # zk-SNARK Circuits (Groth16)\r\n│── 📂 backend        # Express.js API with zkVerify integration\r\n│── 📂 frontend       # Next.js UI with Tailwind + Framer Motion\r\n│── 📂 contracts      # Solidity contract for on-chain credit score storage\r\n└── README.md         # Setup \u0026 instructions\r\n```\r\n\r\n---\r\n\r\n## **✅ Prerequisites**\r\n\r\nBefore starting, ensure you have:\r\n\r\n- **Node.js** (v18+)\r\n- **Yarn** or **npm**\r\n- **Circom** (for compiling circuits)\r\n- **SnarkJS** (for proof generation)\r\n- **Hardhat** (for smart contract deployment)\r\n- **Metamask** (for wallet connection)\r\n\r\n---\r\n\r\n## **🚀 Quick Setup**\r\n\r\n### **1️⃣ Clone the Repository**\r\n\r\n```sh\r\ngit clone https://github.com/TheCoderAdi/ZK-Online-Hackathon.git\r\ncd ZK-Online-Hackathon\r\n```\r\n\r\n---\r\n\r\n## **2️⃣ Generating Circuits (zk-SNARK Setup)**\r\n\r\n_Navigate to the **circuits/** directory:_\r\n\r\n```sh\r\ncd circuits\r\n```\r\n\r\n### **🔹Commands for Circuit Generation**\r\n\r\n```sh\r\n# 1. Compile the circuit\r\ncircom creditScore.circom --r1cs --wasm --sym --c\r\n\r\n# 2. Download or generate Powers of Tau file\r\nsnarkjs powersoftau new bn128 14 pot14_0000.ptau -v\r\n\r\n# 3. Contribute to phase 1 of trusted setup\r\nsnarkjs powersoftau contribute pot14_0000.ptau pot14_0001.ptau --name=\"First contribution\" -v\r\n\r\n# 4. Prepare for phase 2 of trusted setup\r\nsnarkjs powersoftau prepare phase2 pot14_0001.ptau pot14_final.ptau -v\r\n\r\n# 5. Generate proving and verification keys\r\nsnarkjs groth16 setup credit_score.r1cs pot14_final.ptau circuit_final.zkey\r\n\r\n# 6. Contribute to the zkey (phase 2 of trusted setup)\r\nsnarkjs zkey contribute circuit_final.zkey circuit_final2.zkey --name=\"Second contribution\" -v\r\n\r\n# 7. Export verification key\r\nsnarkjs zkey export verificationkey circuit_final2.zkey verification_key.json\r\n\r\n# 8. Generate proof (Example input)\r\nsnarkjs groth16 prove circuit_final2.zkey witness.wtns proof.json public.json\r\n\r\n# 9. Verify proof\r\nsnarkjs groth16 verify verification_key.json public.json proof.json\r\n\r\n# 10. Generate Solidity Verifier contract\r\nsnarkjs zkey export solidityverifier circuit_final2.zkey verifier.sol\r\n```\r\n\r\n---\r\n\r\n## **3️⃣ Smart Contract Deployment (Hardhat)**\r\n\r\n_Navigate to the **smart-contract/** directory:_\r\n\r\n```sh\r\ncd smart-contract\r\nnpm install\r\n```\r\n\r\n### **Compile \u0026 Deploy on Local Hardhat**\r\n\r\n```sh\r\nnpx hardhat compile\r\nnpx hardhat node\r\nnpx hardhat run scripts/deploy.js --network localhost\r\n```\r\n\r\n_For Arbitrum Testnet (Sepolia), replace `localhost` with `arbitrumSepolia`._\r\n\r\n---\r\n\r\n## **4️⃣ Backend Setup (Express.js)**\r\n\r\n_Navigate to the **backend/** directory:_\r\n\r\n```sh\r\ncd backend\r\nnpm install\r\n```\r\n\r\n### **Start Backend Server**\r\n\r\n```sh\r\nnode index.js\r\n```\r\n\r\n_Backend runs on **http://localhost:5000**_\r\n\r\n---\r\n\r\n## **5️⃣ Frontend Setup (Next.js)**\r\n\r\n_Navigate to the **frontend/** directory:_\r\n\r\n```sh\r\ncd frontend\r\nnpm install\r\n```\r\n\r\n### **Start Frontend**\r\n\r\n```sh\r\nnpm run dev\r\n```\r\n\r\n_Frontend available at **http://localhost:3000**_\r\n\r\n---\r\n\r\n## **6️⃣ Running the Full Application**\r\n\r\n1. **Start Hardhat local node**\r\n   ```sh\r\n   npx hardhat node\r\n   ```\r\n2. **Deploy smart contract**\r\n   ```sh\r\n   npx hardhat run scripts/deploy.js --network localhost\r\n   ```\r\n3. **Start backend API**\r\n   ```sh\r\n   cd backend \u0026\u0026 node index.js\r\n   ```\r\n4. **Start frontend UI**\r\n   ```sh\r\n   cd frontend \u0026\u0026 npm run dev\r\n   ```\r\n\r\n---\r\n\r\n## **📌 Features**\r\n\r\n- **🔒 Privacy-Preserving Credit Scoring** (zk-SNARKs)\r\n- **⏳ Instant Proof Verification** (zkVerify)\r\n- **💰 DeFi Credit System** with Secure On-Chain Storage\r\n- **💡 Beautiful UI** (Tailwind CSS + Framer Motion)\r\n\r\n---\r\n\r\n### **🌐 Useful Links**\r\n\r\n- **GitHub Repo:** [ZK-Online-Hackathon](https://github.com/TheCoderAdi/ZK-Online-Hackathon)\r\n- **zkVerify Docs:** [zkVerify](https://docs.zkverify.io)\r\n- **Arbitrum:** [Arbitrum Portal](https://portal.arbitrum.io/)\r\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthecoderadi%2Fzk-online-hackathon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthecoderadi%2Fzk-online-hackathon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthecoderadi%2Fzk-online-hackathon/lists"}