Inspiration

Asking an AI tutor a question and getting a lecture assuming I was working on something else. General AI chatbots don't know where a student actually is — a real tutor does. That gap is the whole project.

What it does

An adaptive math tutor built on three things: a placement test that locates the student on a real curriculum, a mastery map that tracks progress per topic (not stateless chat), and a Claude-powered tutor that teaches — escalating hints, explaining mistakes, always answering what was actually asked.

It also renders real math instead of plain text — a fraction shows up as an actual fraction, not a/b:

$$\frac{a}{b} + \frac{c}{d} = \frac{ad + bc}{bd}$$

Students can edit their profile (grade, level, favorite topic), and it actually changes how the tutor teaches — it separately tracks enrolled course vs. assessed level and teaches to the real level.

How we built it

Next.js 16 + TypeScript + Tailwind, Zustand state synced to Postgres (Neon) across devices, NextAuth (Google + email/password), Claude API for tutoring, Resend for email, deployed on Vercel.

Challenges we ran into

  • A race condition where logging back in sometimes sent returning users through onboarding again — local state was stale before the real profile loaded from the server.
  • An early AI tutor endpoint was reachable without login — anyone could run up API costs. Had to run a real security pass, not just build features.
  • Getting the tutor to just answer the question instead of gatekeeping on topic relevance took real prompt iteration.

Accomplishments that we're proud of

Every security issue found got fixed and verified live, not just flagged. Sync logic survives closed tabs and multi-device use without losing progress. The tutor visibly adapts per student, not just per question.

What we learned

Adaptive tutoring is mostly a state-management problem, not a prompting problem — the hard part is knowing the truth about the student, not phrasing the answer \((s, \text{not} f(s))\). Trust costs almost nothing to build (a one-line AI-limitations note) and matters a lot.

What's next for MathTutor AI

Verified email domain so password reset works for all users, real study-plan persistence, fixing the last sync edge case (two devices at once), and legal review before any use beyond family.

Built With

  • ai
  • anthropic
  • bcrypt
  • claude
  • edtech
  • education
  • framer-motion
  • google-oaut
  • katex
  • lucide-react
  • neon
  • next-auth
  • next.js
  • node.js
  • postgresql
  • react
  • react-markdown
  • recharts
  • resend
  • tailwindcss
  • typescript
  • vercel
  • zustand
Share this project:

Updates

posted an update —

MathTutor AI is built around math anxiety specifically — a well-documented mental health issue where fear of being wrong shuts kids down before they even try. It never exposes a student to material above their real level, even if their class does. When they get something wrong, the tutor explains why the mistake happened instead of just marking it incorrect, and hints escalate gradually instead of dumping the answer — so a student can be wrong privately and safely, with none of the shame of messing up in front of a class. It also reads confidence level and adjusts tone accordingly, and keeps daily goals short (20–25 min) instead of pushing burnout. That's not a side feature — reducing that fear response is the actual design principle behind how the tutor teaches, not an afterthought bolted onto a math app.

Log in or sign up for Devpost to join the conversation.

Submission history