By PawPatrol
PawFriend is a multi-language gamified learning app where you adopt a magical companion animal (fox, puppy) that grows and learns with you.
π― Available in 5 languages: English π¬π§, French π«π·, Spanish πͺπΈ, German π©πͺ, Arabic πΈπ¦ (with RTL support)
When you study, focus, and answer quizzes correctly, your companion gains XP, levels up (baby β adolescent β adult), and sends you encouraging messages. The goal is to be consistent xith your learning so your companion can stay nourished and hydrated.
- 5 languages: English π¬π§, French π«π·, Spanish πͺπΈ, German π©πͺ, Arabic πΈπ¦
- Language selector: Top-right dropdown with flag icons
- RTL support: Arabic automatically switches to right-to-left layout
- Real-time switching: Instant language changes across entire app
- Persistent choice: Language selection saved in localStorage
- Complete translation: Every button, message, and feature translated
- Context-aware content: Animal messages adapt to selected language
- Pomodoro Technique: 25-minute focus sessions + 5-minute breaks
- AI-Powered Study Plans: Upload documents (PDF/DOCX) and get personalized study schedules according to the uploaded material
- Cycle-by-Cycle Execution: Automated progression through multiple Pomodoro cycles
- Detailed Guidance: Each cycle includes:
- Focus task description
- Specific objectives
- Key points to remember
- Progress tracking with checkboxes
- Break Management: Automatic transitions between focus and rest periods
- XP Rewards: +25 XP per completed 25-minute session
- Topic-Based Generation: AI creates quizzes on any subject using Mistral AI
- Multiple Choice: 3 questions per quiz, 4 options each
- Instant Feedback: See if answers are correct immediately
- XP Rewards: +20 XP per correct answer (60 XP max per quiz)
-
Provide false answers or incorrect information
-
Omit correct answer options from the choices
-
Incorrectly evaluate answers as right or wrong
-
Generate misleading or inaccurate explanations
\
-
Wolfram Integration: Get detailed mathematical explanations for quiz questions
-
Themed Quizzes: Pre-made AI-generated quiz themes across subjects:
- Mathematics (Algebra, Geometry, Calculus)
- Sciences (Biology, Chemistry, Physics)
- History (Ancient civilizations, Medieval period, Modern era)
- Geography (Maps, Capitals, Demographics)
- Languages (Vocabulary, Grammar, Conjugation)
- Computer Science (Wolfram Language tutorials)
- Choose Your Companion: Fox or puppy, each with unique personality
- Customizable Appearance: 4 aura colors (Galaxy Blue, Magic Purple, Energy Orange, Focus Green)
- Level Progression:
- Baby (0-999 XP): Small, learning together
- Adolescent (1000-1999 XP): Growing stronger
- Adult (2000+ XP): Fully evolved companion
- Context-Aware Messages: Dynamic messages based on activity:
- Dashboard: Motivational messages
- Study sessions: Focus encouragement
- Breaks: Health reminders (stretch, hydrate)
- Quizzes: Calm, supportive messages
- Visual Evolution: Companion orb size and glow intensity increase with level
- Water-Themed Motivation: π§ symbols
- Streak Tracking: Study daily to keep your companion hydrated
- Personal Records: Track your max streak achievement
- Dynamic Messages:
- 1 day: "Your companion is refreshed!"
- 3-6 days: "Keep your companion hydrated!"
- 7+ days: "Your companion stays hydrated! π§"
- 14+ days: "Epic hydration!"
- 30+ days: "Legendary caregiver!"
- Study Sessions Counter: Total Pomodoro cycles completed (π)
- Average Quiz Score: Calculated from XP earned (π―)
- Total Study Time: Minutes spent in focus sessions (β±οΈ)
- Weekly Progress Chart: Visual bar chart of daily activity
- Performance Indicators:
- Excellent (85%+): Green
- Good (70-84%): Yellow
- Keep Practicing (55-69%): Orange
- Needs Improvement (<55%): Red
- Personalized Recommendations: Tips based on your performance
- Supabase Integration: Real user accounts with email/password
- Instant Signup: No email verification required for quick demos
- Profile Persistence: All data saved to database:
- User name and companion details
- XP and level
- Streaks (current and max)
- Study time and completed cycles
- Last study date
- Session Management: Automatic login restoration
- File Upload: Support for PDF, DOCX, and images
- AI Ingestion: Documents automatically chunked and processed
- Vector Storage: Content stored for intelligent retrieval
- Study Plan Generation: AI uses uploaded materials to create customized plans
- Food Shop: Buy food for your companion using earned XP
- Animal-Specific Food: Each companion type has unique foods:
- Puppy: Croquette (regular) and Muffin (special treat)
- Fox: Dango (regular) and Bao (special treat)
- XP Economy:
- Regular food: Costs 5 XP, gives back 2 XP
- Special food: Costs 10 XP, gives back 5 XP (unlocked at adolescent level)
- Feeding System: Interactive feeding with visual bowl states (empty/full)
- Level Requirements: Special treats unlock when companion reaches adolescent level
- Reward Mechanism: Feed your companion to receive bonus XP
- XP System: Earn points for every activity
- Level Progression: Visual and functional companion evolution
- Achievement Tracking: Personal records and milestones
- Progress Tracking: Completed cycles, total study time
- Motivational Feedback: Dynamic messages and encouragement
- XP Economy: Spend earned XP on companion food and rewards
- React + TypeScript: Modern component-based architecture
- React Router: Client-side navigation
- i18next: Internationalization framework
- Context API: Global state management (UserContext)
- Custom CSS: Themed styling with CSS variables
- Supabase Client: Database and authentication
- Node.js + Express: REST API server
- Mistral AI: Open-source LLM for quizzes and lesson plan generation (
open-mistral-7b) - Wolfram Alpha API: Mathematical explanations and themed quiz generations
- AI Agents:
DocumentIngestionAgent: PDF/DOCX parsing and chunkingQuizGenerationAgent: Intelligent quiz creationStudyCoachAgent: Personalized study plan generation
- Vector Storage: JSON-based document storage for retrieval
- Supabase (PostgreSQL): User profiles and progress tracking
- Row Level Security: Data isolation per user
- Real-time Sync: Automatic profile updates
pawfriend/
βββ backend/
β βββ agents/
β β βββ DocumentIngestionAgent.js
β β βββ QuizGenerationAgent.js
β β βββ StudyCoachAgent.js
β βββ data/
β β βββ vectorstore.json
β βββ routes/
β β βββ quiz.js # Quiz generation API
β β βββ study.js # Study plan generation
β β βββ upload.js # Document processing
β β βββ wolfram.js # Wolfram Alpha integration
β βββ index.js
β βββ package.json
βββ public/
β βββ completion.mp3 # Cycle completion sound
β βββ notification.mp3 # Notification sound
β βββ *.png # Companion sprites
β βββ index.html
βββ src/
β βββ components/
β β βββ Animal.tsx # Companion with messages
β β βββ LearningAnalytics.tsx # Stats dashboard
β β βββ LanguageSelector.tsx # Language switcher
β β βββ Modal.tsx # Reusable modal
β β βββ SoundConsentBanner.tsx # Audio permission
β β βββ StreaksWidget.tsx # Hydration streaks
β β βββ UserHeader.tsx # Top navigation
β βββ contexts/
β β βββ UserContext.tsx # Global state
β βββ i18n/
β β βββ config.ts
β β βββ locales/
β β βββ en.json
β β βββ fr.json
β β βββ es.json
β β βββ de.json
β β βββ ar.json
β βββ pages/
β β βββ AuthPage.tsx # Login/signup
β β βββ DashboardPage.tsx # Main hub
β β βββ LearningPage.tsx # Study sessions
β β βββ OnboardingPage.tsx # Companion creation
β β βββ QuizPage.tsx # Quiz interface
β β βββ QuizThemesPage.tsx # Themed quizzes
β β βββ WolframCompanionPage.tsx # Wolfram queries
β βββ utils/
β β βββ profileService.ts
β β βββ supabaseClient.ts
β βββ App.tsx
β βββ index.tsx
β βββ index.css
βββ supabase_schema.sql
βββ package.json
βββ README.md
- Node.js v18+
- npm v8+
- Mistral API key (get from https://mistral.ai)
- Supabase account (free tier at https://supabase.com)
- Wolfram API Key (get from )
git clone [email protected]:CSGIRLIES/hackathon-edugame-frontend.git
cd hackathon-edugame-frontend# Frontend
npm install
# Backend
cd backend
npm install
cd ..Backend .env (in backend/ folder):
PORT=4000
FRONTEND_ORIGIN=http://localhost:3000
MISTRAL_API_KEY=your_mistral_key_here
WOLFRAM_APP_ID=your_wolfram_id_hereFrontend .env (in project root):
REACT_APP_SUPABASE_URL=your_supabase_url
REACT_APP_SUPABASE_ANON_KEY=your_supabase_anon_key- Go to Supabase Dashboard β SQL Editor
- Copy contents of
supabase_schema.sql - Paste and run to create tables
- Disable email confirmation: Authentication β Providers β Email β Turn OFF "Confirm email"
Credentials: [email protected] / DemoPass123!
- Supabase β Authentication β Users β Add user
- Enter credentials above
- Copy the generated
user_id(UUID) - In SQL Editor, find commented INSERT in
supabase_schema.sql - Replace
'YOUR-USER-ID-HERE'with actual UUID - Uncomment and run the INSERT statement
Demo profile includes:
- 150 XP (Adolescent level)
- Purple fox named "Nova" π¦
- 5-day streak (max 7 days)
- 125 minutes study time
- 12 completed cycles
One command (recommended):
npm run devOr run separately:
# Terminal 1 - Backend
npm run dev:backend
# Terminal 2 - Frontend
npm run dev:frontend- Sign Up: Create account with email/password
- Onboarding:
- Enter your name
- Choose companion (fox or puppy)
- Select aura color
- Name your companion
- Dashboard: See companion, XP, and available activities
- Click "Start Learning Session"
- Enter what you're studying
- (Optional) Upload study materials (PDF/DOCX)
- (Optional) Generate AI study plan with available time
- Start session - timer begins 25-minute cycle
- Complete objectives during focus time
- Take 5-minute break when prompted
- Repeat for multiple cycles
- Earn +25 XP per cycle
- Click "Quick Quiz" or finish a study session
- Enter topic or choose themed quiz
- AI generates 3 questions
- Answer multiple choice questions
- Earn +20 XP per correct answer (60 XP max)
- Return to dashboard with updated XP
- Navigate to food shop (dashboard)
- View available food items for your companion type
- Purchase food with earned XP:
- Regular food: 5 XP (available anytime)
- Special treats: 10 XP (unlocked at adolescent level)
- Feed your companion and receive bonus XP
- Watch the feeding animation with visual feedback
- Navigate to "Quiz Themes"
- Select subject (Math, Science, History, etc.)
- Choose difficulty (Beginner, Intermediate, Advanced, Pro)
- Pick specific topic from available quizzes
- AI generates curriculum-aligned questions
- Study at least once per day
- Your companion stays "hydrated" π§
- Miss a day β streak resets to 0
- Track personal best streak record
- Click language selector (top-right)
- Choose from 5 languages
- Entire app switches instantly
- Selection persists across sessions
Use [email protected] / DemoPass123! to test with pre-populated data.
- Sign up new account
- Complete onboarding flow
- Start 25-minute Pomodoro session
- Take AI-generated quiz
- Upload study document
- Generate AI study plan
- Execute multi-cycle study plan
- Try themed quiz
- Check analytics dashboard
- Test streak system
- Switch languages
- Verify XP and level updates
- Hear sound effects
- Test on different browsers
AI-Powered Development: The application was primarily developed using Cline, powered by anthropic/claude-sonnet-3.5 and openai/gpt-4o, with extensive debugging and fine-tuning by the girlies at PawPatrol πΎβ€οΈ
- Mistral AI for open-source LLM
- Wolfram Alpha for mathematical computations
- CLINE for access credits to their premium models
- Supabase for backend infrastructure
- React team for excellent framework
- All open-source contributors!