Inspiration
Github: https://github.com/jv-code/TutorQuest
Math education often lacks personalized, patient tutoring for every student. We wanted to create an AI teaching assistant that:
- Adapts to each student's skill level
- Provides unlimited practice problems
- Generates custom video explanations on-demand
- Never gets frustrated, always encourages learning
Traditional tutoring is expensive and doesn't scale. With AI and automated video generation, we can provide every student with a personal math tutor.
What it does
MathingAI is an interactive long division practice platform that:
- Smart Difficulty Scaling: Questions auto-adjust from simple (48 ÷ 6) to complex (4-digit ÷ 2-digit) divisions
- Progressive Feedback Strategy:
- Attempts 1-2: Generic encouragement
- Attempt 3+: Detailed feedback + video offer button
- On-Demand Video Generation: Students choose when they need visual explanations
- Real-Time Chat: AI teaching assistant answers questions and provides hints
How we built it
Tech Stack
- Frontend: React 19 + Vite with Tailwind CSS and shadcn/ui components
- Backend: FastAPI (Python 3.13)
- AI: Claude Haiku 4.5 (questions/validation) + Sonnet 4.5 (video generation)
- Database: Supabase (PostgreSQL + Storage)
- Video Generation: Daytona sandboxes executing Manim Python code
Architecture
┌─────────────┐ ┌──────────────┐ ┌─────────────┐
│ React UI │────▶│ FastAPI │────▶│ Claude │
│ (Frontend) │ │ (Backend) │ │ API │
└─────────────┘ └──────────────┘ └─────────────┘
│
├────▶ Supabase (Database + Storage)
│
└────▶ Daytona (Video Generation)
Video Generation Pipeline
- Claude Sonnet 4.5 generates Manim Python code tailored to the specific problem
- Daytona sandbox is created and configured
- Manim renders the explanation video
- Video is uploaded to Supabase Storage
- Frontend polls status every 2 seconds until complete
- Student receives custom video explanation
Prompt Engineering
We use Jinja2 templates for all AI prompts:
generate_question.j2: Difficulty-scaled question generationvalidate_answer.j2: Smart answer validation with progressive feedbackgenerate_manim.j2: Manim code generation for educational videos
Challenges we ran into
Manim rendering took 20-40 seconds. Optimized by:
- Using
-ql(low quality) flag for faster rendering - Implementing polling mechanism instead of blocking requests
- Showing real-time status updates to keep students engaged
Accomplishments that we're proud of
- Seamless Daytona Integration: Successfully orchestrated Claude + Daytona to generate custom educational videos
- Smart Difficulty Progression: Algorithm that adapts to student performance in real-time
- Polished UX: Smooth polling, loading states, and error handling create a professional experience
- Cost-Effective AI Usage: Strategic use of Haiku (fast/cheap) vs Sonnet (powerful) models
- Production-Ready: Fully functional database schema, error handling, and video retention policies
What we learned
Technical Learnings
- Daytona Sandbox Architecture: How to programmatically create, execute code in, and manage ephemeral development environments
- AI Model Selection: When to use Haiku vs Sonnet based on task complexity and cost
- Video Processing: Base64 encoding, storage, and streaming for generated content
- Async Workflows: Building polling mechanisms for long-running tasks
Educational Insights
- Progressive feedback is more effective than immediate detailed explanations
- Students prefer choosing when to watch videos rather than forced viewing
- Visual explanations (Manim) combined with text create powerful learning experiences
What's next for MathingAI
Immediate Roadmap
- Multi-Topic Support: Expand beyond long division to fractions, decimals, algebra
- Voice Explanations: Add text-to-speech narration to Manim videos
- Progress Dashboard: Visualize student improvement over time
- Gamification: Badges, streaks, and achievements for motivation
Long-Term Vision
- Classroom Integration: Teacher dashboards to monitor multiple students
- Custom Problem Sets: Let teachers upload their own problems
- Peer Comparison: Anonymous benchmarking to encourage healthy competition
- Mobile App: Native iOS/Android apps for on-the-go practice
Daytona-Specific Features
- Multi-Language Support: Generate explanations in different programming languages
- Interactive Notebooks: Create Jupyter notebooks with step-by-step solutions
- 3D Visualizations: Use Daytona to render complex 3D math visualizations
Log in or sign up for Devpost to join the conversation.