How tushar-agarwal7/shinolearn works
Project type and purpose
• ShinoLearn is a full-stack, Web3-powered language learning platform.
• Purpose: Allow users to connect a crypto wallet, stake USDC into language‐learning challenges, interact with AI tutors, track progress via Prisma/PostgreSQL, and earn blockchain‐based rewards via smart contracts.
File structure
• Top-level “app” directory: Next.js App Router pages + API routes (React server components, route.js files).
• “components/”: Reusable UI and feature components (auth, challenge, dashboard, learn, notifications, ui).
• “lib/”: Shared logic libraries:
• lib/auth (JWT generation and verification)
• lib/web3 (ethers.js hooks, providers, contract ABIs, staking logic)
• lib/learn (prompt helpers)
• lib/cron (daily progress job)
• “prisma/”: Schema + migration history for PostgreSQL.
• “shinobi-contracts/”: Hardhat project for Solidity smart contracts (staking, USDC mint, deployment scripts).
• Configs: next.config.mjs, tailwind.config.js, bun.lock, package.json, etc.
Key points from README
• Architecture overview already shows:
• User Devices → Frontend (Next.js, React, Tailwind, ethers.js)
• Backend (Next.js API Routes handling auth, AI, challenge management)
• Database (PostgreSQL + Prisma)
• Blockchain (Smart Contracts on Ethereum; Aave for yield)
• External AI service (bloomz, Deepseek)
Summary
• Distinct “shinobi-contracts” project as a separate deployment artifact.
• Connection is labeled (e.g., “POST /api/challenges/join”, “ethers.js → Stake()”).
• Detail any middleware (JWT verify, Web3 signature) between API and DB.