A Web3-powered educational platform where teachers create tasks and students solve them through a stake-based incentive system. Built for hackathon with focus on education in the era of technology.
- Task Creation: Post educational tasks with customizable difficulty, categories, and rewards
- Staking Mechanism: Stake tokens based on task quality and earn yield based on student success rates
- Quality Metrics: Build reputation through high-quality tasks and student satisfaction
- Dashboard: Track student progress, submissions, and task performance
- Task Discovery: Browse and filter tasks by difficulty, category, and rewards
- AI-Powered Recommendations: Get personalized task suggestions with transparent explanations
- Stake to Learn: Stake tokens to attempt tasks, earn rewards upon completion
- Collaborative Learning: Chat with teachers and AI assistant for guidance
- Algorithmic Transparency: All recommendations and evaluations come with clear explanations
- Data Privacy: Students can view, export, and delete their personal data anytime
- Fair Reputation: Reputation earned through participation, not wealth
- Students choose which tasks to attempt
- AI recommendations based on skill level and interests
- Flexible learning paths
- Built-in chat with AI assistance
- Teacher-student communication
- Peer learning support
- Next.js 16 - React framework with App Router
- TypeScript - Type-safe development
- Tailwind CSS - Utility-first styling
- shadcn/ui - Beautiful component library
- RainbowKit - Wallet connection
- Wagmi - Web3 React hooks
- Viem - Ethereum library
- Supabase - PostgreSQL database with real-time subscriptions
- Row Level Security (RLS) - Database-level access control
- Supabase Auth - User authentication
- Solidity - Smart contract development
- Foundry - Smart contract framework
- OpenZeppelin - Secure contract libraries
- ERC-20 Token (EDU) - Platform token for staking/rewards
smarthack/
βββ frontend/ # Next.js frontend application
β βββ app/ # App router pages
β β βββ dashboard/ # Dashboard pages
β β β βββ teacher/ # Teacher dashboard
β β β βββ student/ # Student dashboard
β β βββ settings/ # User settings & privacy
β β βββ tasks/ # Task pages
β βββ components/ # React components
β β βββ ui/ # UI components (shadcn)
β β βββ TaskCard.tsx
β β βββ ChatInterface.tsx
β β βββ DataPrivacyPanel.tsx
β βββ lib/ # Utilities & configs
β βββ types/ # TypeScript types
β βββ supabase/ # Supabase client & queries
β βββ wagmi.ts # Web3 configuration
βββ web3/ # Smart contracts
β βββ src/
β βββ EduToken.sol # ERC-20 token
β βββ TaskStaking.sol # Staking contract
βββ supabase/ # Database
βββ migrations/ # SQL migrations
- Node.js 18+
- npm or yarn
- Foundry (for smart contracts)
- Supabase account
git clone <your-repo-url>
cd smarthackcd frontend
npm installCreate .env.local:
NEXT_PUBLIC_SUPABASE_URL=your_supabase_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID=your_walletconnect_project_idRun development server:
npm run dev- Create a new Supabase project
- Run the migration file in SQL editor:
supabase/migrations/001_initial_schema.sqlcd web3
forge install OpenZeppelin/openzeppelin-contracts
forge buildDeploy contracts:
forge script script/Deploy.s.sol --rpc-url <your-rpc-url> --broadcast- profiles: User profiles with wallet addresses and reputation
- tasks: Educational tasks created by teachers
- task_submissions: Student submissions and grades
- staking_transactions: Token staking records
- task_ratings: Student ratings of tasks
- teacher_ratings: Student ratings of teachers
- chat_rooms: Collaboration spaces
- chat_messages: Messages with AI support
- recommendation_explanations: AI recommendation reasoning
- user_data_access_log: Privacy compliance tracking
- notifications: User notifications
- Platform token for staking and rewards
- Mintable by contract owner
- Burnable by token holders
- Teachers stake when creating tasks
- Students stake when attempting tasks
- Automatic reward distribution based on success
- Yield calculation based on task quality and success rate
- Emergency withdraw functionality
Displays task information with:
- Difficulty badge
- Reward and stake amounts
- Success rate
- Teacher reputation
- Category and tags
Real-time chat with:
- Teacher-student messaging
- AI assistant integration
- Message history
- Auto-responses to questions
GDPR-compliant features:
- View all personal data
- Export data as JSON
- Delete account and data
- Algorithmic transparency explanations
- Row Level Security (RLS): Database-level access control
- Smart Contract Auditing: Using OpenZeppelin standards
- ReentrancyGuard: Protection against reentrancy attacks
- Input Validation: Both frontend and database level
- Private Keys: Never exposed to frontend
Every task recommendation comes with an explanation showing:
- Why it was recommended
- Relevance score
- Contributing factors (skill match, success rate, etc.)
Reputation grows through:
- Creating quality tasks (+1 point)
- Completing tasks (+1 point)
- High ratings (+5 points)
- Success rate bonuses (+10 for >70%)
- Consistent activity (+2/week)
Important: Reputation cannot be bought or transferred!
Students have full control:
- View what data is collected and why
- Export complete data history
- Delete all personal data
- Track who accessed their data
Concept: Transform top achievements into verifiable credentials on the blockchain.
When a student completes a task and receives 5 stars from their teacher, they don't just earn tokens - they unlock the ability to mint a Proof-of-Learning Badge.
How It Works (Hackathon Implementation):
-
Achievement Trigger: Student gets 5-star review β System displays: "π Congratulations! You're eligible to mint your Python Expert Badge!"
-
Mint Experience:
- Big prominent button:
[β¨ MINT YOUR BADGE] - On click: Beautiful loading animation with blockchain-themed messaging:
- "βοΈ Anchoring proof to blockchain..."
- "π¨ Generating badge artwork..."
- "β Confirming transaction..."
- Big prominent button:
-
Badge Display: After "minting", the badge appears:
- In student's profile
- As a visual certificate (SVG/PNG)
- With metadata: task title, date, teacher signature, skill verified
The Pitch (Why This Matters):
- For Students: Portable proof of skills that can be displayed in Web3 profiles/portfolios
- For Employers: Verifiable credentials showing actual skill completion, not just claims
- For Education: Transforms grades into blockchain-backed credentials
- For Web3: Real-world utility of NFTs beyond speculation
Technical Implementation (Hackathon Version):
- Frontend-only with realistic UX/UI
- Pre-designed badge templates
- Simulated blockchain interaction (animations + messaging)
- Database stores badge records
- Uses Web3 terminology: "Mint", "NFT", "Soulbound Token (SBT)", "On-Chain Proof"
Future Enhancement (Post-Hackathon):
- Real smart contract integration (ERC-721 or ERC-1155)
- On-chain metadata storage (IPFS)
- True Soulbound Tokens (non-transferable)
- Cross-platform verification
π‘ Hackathon Strategy: This feature demonstrates understanding of Web3 utility while staying within time constraints. It's about the concept and UX, not full blockchain implementation.
- NFT certificates for completed tasks (Proof-of-Learning Badges - Hackathon Version β )
- Full blockchain NFT minting (real smart contracts)
- DAO governance for platform decisions
- Advanced AI tutoring integration
- Multi-chain support
- Mobile app (React Native)
- Peer review system
- Task marketplace
- Learning analytics dashboard
This is a hackathon project! Feel free to fork and improve.
MIT License - feel free to use for educational purposes
This platform addresses:
- β Personalized learning through AI
- β Active participation through gamification
- β Creativity through flexible task selection
- β Transparency in algorithmic decisions
- β Data privacy and ethical technology
- β Fair access (reputation β wealth)
- β Teacher-student collaboration
Built with β€οΈ for education and Web3