Skip to content

Latest commit

 

History

History
159 lines (141 loc) · 8.48 KB

File metadata and controls

159 lines (141 loc) · 8.48 KB

MathFuel - TODO

Phase 1: Core Student Experience

  • New database schema: skills, subskills, problems, practice sessions, student progress, mastery tracking
  • Seed Grade 1-2 math content (addition, subtraction, number sense, place value, comparisons, word problems, counting)
  • Student dashboard (streaks, recommended session, recent performance, mastery progress)
  • Practice session engine with adaptive difficulty
  • Answer validation (deterministic, not AI-dependent)
  • Immediate feedback UI (correct/incorrect with explanation)
  • Scaffolded hint system (progressive hints, not just answers)
  • Mastery model (not started / practicing / close / mastered per skill)
  • Rewards: streaks, badges, session completion celebration
  • Child-friendly practice UI (bright, simple, calm, low reading burden, button-forward)

Phase 2: Parent Experience

  • Parent dashboard (child progress, strengths, struggle areas, time spent, accuracy)
  • Session summary (what was practiced, where child got stuck, suggested next step)
  • Mastery reporting with visual skill map

Phase 3: AI Enhancement

  • AI-generated explanations in age-appropriate language
  • AI-generated scaffolded hints
  • Error pattern identification
  • Adaptive sequencing recommendations

Phase 4: Homepage & Branding

  • Redesign homepage as MathFuel landing page
  • Update branding from MathMastery to MathFuel
  • Pricing page update for family subscription model

Testing

  • Vitest tests for answer checking (number, boolean, text, choice)
  • Vitest tests for mastery level calculation
  • Vitest tests for adaptive difficulty engine
  • Vitest tests for streak logic
  • Vitest tests for badge award logic
  • All 137 tests passing

Infrastructure (Existing - Keep)

  • Admin settings panel
  • Payment notification system with Stripe webhooks
  • RBAC with admin/user roles
  • Stripe integration
  • CDN asset infrastructure

Phase 5: AI-Powered Dynamic Hints & Explanations

  • Server-side tRPC procedure for AI hint generation (invokeLLM)
  • Server-side tRPC procedure for AI explanation generation after wrong answer
  • Age-appropriate prompt engineering (Grade 1-2 language, scaffolded, conceptual)
  • Update PracticeSession UI to call AI hints instead of static hints
  • Update PracticeSession UI to show AI explanation after incorrect answer
  • Loading states and error handling for AI responses
  • Vitest tests for AI hint/explanation procedures

Phase 6: AI Feedback Rating System

  • Database table for AI response feedback (thumbs up/down, response type, problem context)
  • tRPC procedure to submit feedback rating
  • tRPC procedure to query feedback stats (admin/parent view)
  • Thumbs up/down UI on AI hints in PracticeSession
  • Thumbs up/down UI on AI explanations in PracticeSession
  • Child-friendly feedback interaction (simple, non-disruptive)
  • Admin view of AI feedback quality metrics (getFeedbackStats procedure available)
  • Vitest tests for feedback procedures (15 tests passing)

Phase 7: Rebrand to MathFuel

  • Rename all "Wisconsin Food Explorer" references to "MathFuel"
  • Rename all "wisconsin-food-explorer" references to "mathfuel"
  • Update package.json name
  • Update HTML title and meta tags
  • Update VITE_APP_TITLE (user needs to update in Settings > General)
  • Generate MathFuel logo (math + jet fuel concept)
  • Integrate logo into app header, favicon, and landing page
  • Verify all pages render correctly after rename

Phase 8: Brand-Quality Mobile Polish

  • Home page: hero text sizing, nav hamburger, feature cards stacking, CTA spacing, footer layout
  • StudentDashboard: stat cards grid, badge overflow, session history cards, nav spacing
  • PracticeSession: question text sizing, answer input sizing, hint panel width, feedback cards, progress bar
  • SkillMap: domain cards stacking, skill list overflow, mastery badges sizing
  • ParentDashboard: child selector, progress charts, session table to cards on mobile
  • Global CSS: base font scaling, container padding, touch target minimums, safe-area insets
  • Test all pages at 375px and 390px widths

Phase 9: Animated Incremental Hint System

  • Animated "Need a Hint?" button with pulse/glow effect when idle
  • Incremental hint reveal (one clue at a time, not all at once)
  • Smooth slide-in/fade-in animation for each new hint
  • Visual hint counter (e.g., "Hint 1 of 3")
  • Progressive hint styling (each hint visually distinct)
  • Gentle encouragement copy between hints
  • Disable hint button briefly after reveal to prevent spam-clicking
  • Mobile-optimized hint panel with proper touch targets

Phase 10: Custom In-App Authentication (Replace Manus OAuth)

  • Add password field to users table (hashed with bcrypt)
  • Server-side register endpoint (email, password, name, role)
  • Server-side login endpoint (email + password → JWT cookie)
  • Server-side logout endpoint (clear JWT cookie)
  • Password hashing with bcrypt
  • JWT session creation and verification (no external OAuth)
  • Login page with MathFuel branding (email + password)
  • Signup page with role selection (Student / Parent / Teacher)
  • Update useAuth hook to work with custom auth
  • Remove all Manus OAuth redirects (getLoginUrl, OAuth portal)
  • Protected route guards using custom JWT
  • Update main.tsx to redirect to /login instead of OAuth
  • Test registration, login, logout, protected routes (19 tests)

Phase 11: Database Fix + Forgot Password + Parent-Child Linking

  • Fix missing columns in users table (avatarUrl added, userType enum fixed to include 'parent')
  • Build Forgot Password flow (email-based password reset with token)
  • Forgot Password UI page
  • Build parent-child account linking system
  • Parent-child linking UI in Parent Dashboard
  • Vitest tests for forgot password and parent-child linking (25 tests)

Phase 12: Final Cleanup + Login Fix + GitHub Push

  • Deep audit: find and remove ALL remaining Wisconsin Food Explorer / NutritionFun references
  • Delete stale files (old user manuals, docs, etc.)
  • Fix login for duncankfurrh@gmail.com (OAuth accounts can now set password via register or forgot password)
  • Verify clean build with 0 errors (137 tests passing, 0 TS errors)
  • Push clean code to GitHub (DF791021/mathfuel) - pushed successfully

Phase 13: Stripe Subscription Integration

  • Create Stripe payment router (createCheckout, createBillingPortal, getSubscription)
  • Build Pricing page with Free/Family plan tiers
  • Integrate Stripe Checkout for subscription creation
  • Integrate Stripe Customer Portal for subscription management
  • Enhance webhook handler to update subscriptions table on events
  • Add subscription status check to protected routes (premium gating)
  • Build Account/Billing page for managing subscription
  • Write vitest tests for payment procedures (18 tests passing)
  • Wire pricing page into navigation and Home page

Phase 14: Payment Success Confirmation Page

  • Create PaymentSuccess page with confetti animation
  • Add clear CTA to start practicing immediately
  • Wire route in App.tsx and update Stripe checkout success_url
  • Remove success toast from Account page (replaced by dedicated page)
  • Write vitest tests for the new page (156 tests passing)

Phase 15: Referral Program

  • Add referrals table to database schema (referrer, referee, code, status, reward)
  • Push database migration
  • Build referral tRPC router (generate code, track referrals, claim rewards)
  • Integrate referral code into signup flow (accept ?ref= query param)
  • Build Referrals page with share link, stats, and referral history
  • Add referral link to Account page and Student Dashboard nav
  • Apply Stripe coupon/credit when referral converts to paid subscriber
  • Write vitest tests for referral procedures (17 tests passing, 173 total)

Phase 16: Leaderboard Feature

  • Design leaderboard data model (XP-based scoring from practice sessions)
  • Create tRPC router for leaderboard queries (weekly/monthly/all-time, by grade)
  • Build Leaderboard page with animated rankings, filters, and podium display
  • Implement anonymous display names (e.g., "MathWizard #42") for privacy
  • Add current user highlight and rank indicator
  • Wire leaderboard into Student Dashboard nav and Home page
  • Write vitest tests for leaderboard procedures (23 tests passing, 196 total)