How hrishi0102/edufi works
Main Components
• Frontend: Represent the client-facing application built with Vite/React. This part includes UI components such as pages for loan applications, course matching, and dashboard visualizations. It also integrates external wallet services (using Reown AppKit WalletConnect SDK) and communicates with backend APIs.
• Backend: A Node.js/Express server that contains controllers, routes, services, and configuration files. This component handles business logic, triggers ZK-proof processing, and intermediates between the frontend and blockchain.
• Blockchain/Smart Contracts: Represent the smart contract layer deployed on multiple networks (EduChain and Arbitrum Sepolia). This layer includes the EduFi smart contract (for loans, reputation, etc.) and the ZKVerify contract to confirm zero-knowledge income verifications.
• ZK Proof & Circuit Component: This contains the Circom circuit (incomeProof.circom) and supporting tooling (SnarkJS) to compile, generate, and verify ZK-proofs. It connects with the backend services that invoke proof generation routines.
• IPFS/Decentralized Storage: Although not a separate directory, the system relies on IPFS to store certification data and course completion proofs.
• AI Modules: Although parts of the AI agent and course-matching service are likely integrated within backend services (or may be called as external AI services), it is useful to show them as modules (or microservices) for recommendations and chatbot assistance. They reference external AI frameworks like Gemini 1.5, Coinbase AgentKit, GAIA, and Hyperbolic LLM nodes.
• Backend’s interaction with the blockchain smart contracts. For instance, once a user submits their application (with a generated ZK-proof), the backend communicates with the EduFi and ZKVerify contracts for on-chain verification and storing transaction data.
• Circuit’s role by showing the process flow: “Circuit Compilation → ZK Proof Generation (Circom + SnarkJS)” and then “Proof Submission” to the smart contracts.
• Integration with external wallet services from the frontend, which triggers blockchain interactions.
Architectural Patterns and Design Principles
• Separation of Concerns: Differentiate between the frontend, backend, smart contracts, and cryptographic/circuit proof components.
• Secure, Privacy-first Design: Emphasize the ZK-proofs module and blockchain-based storage (immutable verifications, decentralized reputation).
Relevant Technologies and Frameworks
• Frontend: Vite, React, Tailwind CSS (and wallet connection via Reown AppKit WalletConnect SDK)
• Backend: Node.js (with Express-style controllers, services, and routes)
• Blockchain: Hardhat for contract development & deployment, EduFi smart contracts (with ZK income verification contracts)
• Zero-Knowledge Tools: Circom, SnarkJS, Groth16 ZK-Proof protocols
• AI Tools: Gemini 1.5, Coinbase AgentKit, GAIA, Hyperbolic LLM
Putting It All Together
b. Frontend (React/Vite) interacting with the backend.
c. Backend’s services, controllers, and routes that process user requests.
d. Branch out to show how the backend integrates with:
– The circuit processing (Circom/SnarkJS) for generating ZK proofs.
– The blockchain layer (smart contracts for EduFi, ZKVerify) to manage loan validations and reputation scoring.
– External storage (IPFS) for certification proofs.
– AI services that provide career and course recommendations.