EduOS is a frontend-only learning dApp for the Four.meme AI Sprint. A student selects a class and subject, uploads syllabus text or a PDF, reviews extracted topics, opens each topic one at a time to generate a detailed study page, takes a five-question quiz, and claims 100 LEARN tokens on BNB Smart Chain Testnet after passing. The app is designed for hackathon demos: no backend, local persistence, visible AI provider badges, and a deterministic fallback path if any AI provider fails.
- AI workflow: yes, topic extraction, page generation, and quiz generation are all AI driven.
- DGrid bounty: yes, DGrid AI Gateway is the primary AI provider.
- Azure fallback: yes, Azure OpenAI is retained as the fallback provider.
- Four.meme relevance: yes, the results and mint screens include a Four.meme launch kit with token metadata aligned to the protocol integration docs.
- Web3 reward loop: yes, passing the quiz leads to MetaMask connect and minting on BSC Testnet.
- No backend: yes, all curriculum state is cached in browser localStorage.
- User selects class
6-12and a subject. - User uploads a PDF syllabus or pastes curriculum text.
- EduOS extracts the most important study topics.
- User reviews, edits, reorders, adds, or removes topics.
- Open each topic card to generate one detailed study page on demand.
- User reads the study material and takes a 5-question quiz.
- If the user scores
3/5or higher, they connect MetaMask. - The app mints
100 LEARNon BSC Testnet and shows the transaction hash.
- Frontend: React 18, Vite, Tailwind CSS
- AI: DGrid AI Gateway primary, Azure OpenAI fallback, local fallback last-resort
- Storage: browser localStorage
- Web3: ethers.js v6, MetaMask, BSC Smart Chain Testnet
- Contract: Solidity ERC-20 demo token
- PDF parsing: browser-side PDF extraction, then send text to the AI provider
src/React app sourcecontract/LearnToken.soldemo token contract.env.exampleenvironment templatepackage.jsonroot app manifest
- Install dependencies:
npm install
- Create your local env file:
cp .env.example .env
- Fill in the required values in
.env. - Start the app:
npm run dev
VITE_CONTRACT_ADDRESS: deployedLearnTokencontract addressVITE_BSC_EXPLORER_URL: BSC testnet explorer base URLVITE_DGRID_API_KEY: DGrid AI Gateway keyVITE_DGRID_MODEL: DGrid model, for exampleopenai/gpt-4o-miniVITE_AZURE_OPENAI_ENDPOINT: Azure OpenAI endpointVITE_AZURE_OPENAI_DEPLOYMENT: Azure deployment nameVITE_AZURE_OPENAI_API_VERSION: Azure API versionVITE_AZURE_OPENAI_KEY: Azure API key fallback
If you edit .env while the Vite dev server is already running, restart the dev server so the new values are loaded.
- Primary provider: DGrid AI Gateway
- Fallback provider: Azure OpenAI
- Final fallback: deterministic local generator
The UI shows the active provider on the upload, review, study, results, and wallet screens so judges can see exactly what is being used.
Deploy contract/LearnToken.sol to BSC Testnet with Remix or your preferred Solidity workflow.
- Chain ID:
97 - RPC:
https://data-seed-prebsc-1-s1.binance.org:8545/ - Explorer:
https://testnet.bscscan.com - Reward amount:
100 * 10^18per quiz pass
After deployment, set VITE_CONTRACT_ADDRESS in .env.
- Open the landing page.
- Select a class and subject.
- Upload syllabus text or a PDF.
- Review the extracted topics.
- Open topic cards to generate study pages one by one.
- Read the study material.
- Take the quiz.
- Pass, connect MetaMask, mint tokens, and open the BSC testnet tx hash.
The app does not depend on a private Four.meme API. Instead, it includes a launch-kit panel that formats token metadata fields surfaced in the protocol integration docs:
- token name
- ticker symbol
- description
- raised token
- logo
- socials
If Four.meme exposes a public token-creation endpoint you want to use during the sprint, that launch-kit card is the place to wire it in.
- Open-source license: MIT
- Demo video: required for the sponsor bounties
- Repo/docs link: required
- Token issuance: not required for judging, but included here for the onchain reward loop
EduOS turns a syllabus into a topic-by-topic AI study guide, then verifies learning with a five-question quiz and onchain rewards. It uses DGrid AI Gateway as the primary model provider, keeps Azure OpenAI as fallback, and persists curriculum locally so the demo runs without a backend. The result is a clean AI x Web3 learning loop that fits the Four.meme AI Sprint and the DGrid bounty requirements.