MathVerse AI Tutor

Inspiration

Math learning can be frustrating for many students, especially when they get stuck on a problem without immediate help. Traditional tutoring is expensive, and existing learning apps often lack real-time interaction or personalized guidance.

We wanted to create an AI tutor that feels like a real teacher — one that can understand problems instantly through text, voice, or even the camera and guide students step-by-step to the solution.

Our goal was to build a real-time AI math tutor that combines multimodal input, contextual memory, and cloud scalability to support students anytime, anywhere.


What it does

MathVerse AI Tutor is a real-time multimodal math learning assistant powered by Gemini.

Students can solve math problems using multiple input methods:

• Ask questions through chat
• Speak using voice input
• Scan handwritten equations with the camera
• Upload homework images for automatic solving

The AI tutor then provides step-by-step explanations instead of just the answer, helping students understand the concept.

The system also remembers conversation context using Firestore, enabling more personalized tutoring sessions.

Key features

  • AI math tutor chat powered by Gemini
  • Live camera equation detection
  • Homework solver via image upload
  • Speech-to-text input
  • Text-to-speech responses
  • Session memory using Firestore
  • Real-time AI tutoring experience

How we built it

MathVerse is built using a modern cloud-native AI architecture.

Frontend

Flutter Web provides a responsive interface for:

  • Chat-based tutoring
  • Camera-based equation solving
  • Voice interaction
  • Homework image uploads

Backend

A FastAPI backend manages:

  • AI model communication
  • session memory
  • image processing
  • tutoring responses

AI

Google Gemini powers:

  • conversational tutoring
  • math reasoning
  • equation explanation
  • multimodal interaction

Vision

The camera solver uses Gemini Vision to:

  • detect handwritten equations
  • interpret math expressions
  • generate step-by-step solutions

Memory

Firestore stores conversation history so the tutor can maintain learning context across sessions.

Cloud Infrastructure

The entire system is deployed using modern DevOps practices:

  • Google Cloud Run for backend hosting
  • Firebase Hosting for the frontend
  • Terraform for Infrastructure as Code
  • Secret Manager for secure API keys
  • Artifact Registry for container images

This architecture ensures the platform is scalable, secure, and production-ready.


Architecture

High-level system flow:

User → Flutter Web App
↓
FastAPI Backend (Cloud Run)
↓
Gemini AI APIs
↓
Firestore Memory Storage

Infrastructure components:

  • Cloud Run (containerized backend)
  • Firebase Hosting (frontend delivery)
  • Secret Manager (API security)
  • Terraform (infrastructure automation)

This design enables fast scaling and low-latency AI responses.


Challenges we ran into

Building a multimodal AI tutor presented several technical challenges.

Camera equation detection

Handwritten equations captured by the camera sometimes appeared mirrored or rotated. We solved this by implementing image rotation and preprocessing before sending the image to the AI model.

AI response formatting

AI models sometimes return responses with markdown or inconsistent formatting. We created a formatting pipeline to ensure solutions appear as clean step-by-step math expressions.

Cloud deployment complexity

Deploying a containerized backend with secure API key management required configuring:

  • Terraform infrastructure
  • Secret Manager integration
  • Cloud Run environment variables

Flutter Web camera limitations

Mobile browsers restrict camera selection and switching. We implemented camera preference logic to prioritize the rear camera when available.


Accomplishments that we're proud of

We successfully built a fully working AI tutoring platform that combines:

  • conversational AI
  • computer vision
  • voice interaction
  • cloud infrastructure

Key accomplishments include:

  • Real-time multimodal AI tutoring
  • Live camera equation solving
  • Context-aware tutoring using Firestore memory
  • Full cloud deployment using Terraform
  • Production-ready architecture

Most importantly, we created a system that helps students learn concepts instead of just giving answers.


What we learned

Through this project we learned:

  • how to build multimodal AI applications
  • how to deploy scalable AI systems using Cloud Run
  • how to manage secrets and infrastructure using Terraform
  • how to integrate AI vision models for handwritten math recognition
  • how to combine frontend UX with powerful backend AI services

We also learned that designing AI prompts carefully is crucial for producing reliable educational explanations.


What's next for MathVerse

Our vision is to turn MathVerse into a complete AI-powered learning platform.

Future improvements include:

  • AI-generated personalized learning plans
  • adaptive difficulty tutoring
  • interactive step-by-step hints
  • multi-language support
  • support for advanced mathematics topics
  • mobile applications for Android and iOS
  • classroom integration for teachers

We also plan to improve equation recognition accuracy using advanced computer vision preprocessing.

Our long-term goal is to make AI tutoring accessible to every student globally.

Built With

Share this project:

Updates

Submission history