# πŸ›  Step 1: Install Foundry & Anvil Foundry is a blazing-fast toolkit for Ethereum development written in Rust. It includes `forge` (for testing), `cast` (for scripting), and `anvil` (a local Ethereum node, like Hardhat or Ganache). --- ## βœ… Prerequisites - A Unix-based system (Linux/macOS/WSL) - `curl` installed - `zsh` or `bash` shell --- ## πŸ”½ Install Foundry Open your terminal and run: ```bash curl -L https://foundry.paradigm.xyz | bash ``` ## Then activate Foundry by either: ``` # If using zsh source ~/.zshrc # If using bash source ~/.bashrc ``` Now install the Foundry toolchain: ``` foundryup ``` ## Verify Installation ``` forge --version anvil --version cast --version ``` If all return versions, you’re good to go! ## Run Anvil Locally Start a local Ethereum testnet node: ``` anvil ``` Or to fork Ethereum mainnet (for testing with real contract data): ``` anvil --fork-url https://eth.merkle.io ``` ## Step 1 Completed:) # Step 2 Backend OpenLearnX Quick Start Commands ## Terminal 1: Start Anvil Blockchain ``` anvil --fork-url https://eth.merkle.io ``` Keep this terminal running ## Terminal 2: Deploy Smart Contract ``` cd backend source venv/bin/activate python3 scripts/deploy.py ``` Copy the contract address to your .env file, then you can close this terminal ## Terminal 3: Start Flask Application ``` cd backend source venv/bin/activate python3 main.py ``` Keep this terminal running ## Test Your Platform ``` # Test API health curl http://127.0.0.1:5000/ # Test authentication endpoint curl -X POST http://127.0.0.1:5000/api/auth/nonce \ -H "Content-Type: application/json" \ -d '{"wallet_address": "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266"}' ``` Your OpenLearnX Platform URLs ``` API: http://127.0.0.1:5000 Network Access: http://192.168.35.250:5000 ``` ## Step 2 Completed:) # Step 3 Frontend based on your backend setup and requirements for a comprehensive adaptive learning platform, here's how to build the frontend in your existing frontend directory. ## ``` cd frontend # Create React + TypeScript + Vite project npm create vite@latest . -- --template react-ts # Install dependencies npm install # Install additional packages for OpenLearnX features npm install web3 ethers @metamask/detect-provider npm install react-router-dom react-query npm install @headlessui/react @heroicons/react npm install chart.js react-chartjs-2 recharts npm install axios react-hook-form npm install framer-motion react-hot-toast npm install tailwindcss @tailwindcss/forms ``` ## Project Structure ``` frontend/ β”œβ”€β”€ src/ β”‚ β”œβ”€β”€ components/ β”‚ β”‚ β”œβ”€β”€ auth/ β”‚ β”‚ β”‚ β”œβ”€β”€ MetaMaskConnect.tsx β”‚ β”‚ β”‚ └── WalletAuth.tsx β”‚ β”‚ β”œβ”€β”€ testing/ β”‚ β”‚ β”‚ β”œβ”€β”€ AdaptiveTest.tsx β”‚ β”‚ β”‚ β”œβ”€β”€ QuestionCard.tsx β”‚ β”‚ β”‚ β”œβ”€β”€ InstantFeedback.tsx β”‚ β”‚ β”‚ └── ProgressTracker.tsx β”‚ β”‚ β”œβ”€β”€ assessment/ β”‚ β”‚ β”‚ β”œβ”€β”€ PeerReview.tsx β”‚ β”‚ β”‚ β”œβ”€β”€ BiasDetection.tsx β”‚ β”‚ β”‚ └── Portfolio.tsx β”‚ β”‚ β”œβ”€β”€ dashboard/ β”‚ β”‚ β”‚ β”œβ”€β”€ StudentDashboard.tsx β”‚ β”‚ β”‚ β”œβ”€β”€ InstructorDashboard.tsx β”‚ β”‚ β”‚ β”œβ”€β”€ CompetencyRadar.tsx β”‚ β”‚ β”‚ └── ProgressChart.tsx β”‚ β”‚ β”œβ”€β”€ certificates/ β”‚ β”‚ β”‚ β”œβ”€β”€ CertificateGallery.tsx β”‚ β”‚ β”‚ β”œβ”€β”€ NFTViewer.tsx β”‚ β”‚ β”‚ └── BlockchainVerify.tsx β”‚ β”‚ └── common/ β”‚ β”‚ β”œβ”€β”€ Layout.tsx β”‚ β”‚ β”œβ”€β”€ Navigation.tsx β”‚ β”‚ └── LoadingSpinner.tsx β”‚ β”œβ”€β”€ hooks/ β”‚ β”‚ β”œβ”€β”€ useMetaMask.ts β”‚ β”‚ β”œβ”€β”€ useAdaptiveTesting.ts β”‚ β”‚ β”œβ”€β”€ useInstantFeedback.ts β”‚ β”‚ └── useBlockchain.ts β”‚ β”œβ”€β”€ services/ β”‚ β”‚ β”œβ”€β”€ api.ts β”‚ β”‚ β”œβ”€β”€ web3.ts β”‚ β”‚ └── auth.ts β”‚ β”œβ”€β”€ types/ β”‚ β”‚ β”œβ”€β”€ auth.ts β”‚ β”‚ β”œβ”€β”€ testing.ts β”‚ β”‚ └── dashboard.ts β”‚ β”œβ”€β”€ utils/ β”‚ β”‚ β”œβ”€β”€ adaptiveAlgorithm.ts β”‚ β”‚ β”œβ”€β”€ biasDetection.ts β”‚ β”‚ └── competencyMapping.ts β”‚ └── pages/ β”‚ β”œβ”€β”€ HomePage.tsx β”‚ β”œβ”€β”€ TestingPage.tsx β”‚ β”œβ”€β”€ DashboardPage.tsx β”‚ └── CertificatesPage.tsx ```