Mathmatika

An AI math and DSA learning platform. Streaming explanations with KaTeX-rendered formulas, on-demand Manim animation videos, RAG over uploaded PDFs, and a realtime voice mentor — all on a single LLM.

Client NameSynara product
ServiceAI tutoring & video
Mathmatika AI math tutoring platform — streaming explanations, KaTeX formulas, on-demand Manim animation videos, and a realtime voice mentor.

What it is

Mathmatika is an AI math and DSA learning platform built at Synara. Students upload PDFs, ask questions, and get back streaming explanations with KaTeX-rendered formulas, AI-generated Manim animation videos for the harder concepts, and a realtime voice mentor — all backed by Anthropic Claude with adaptive thinking.

What's interesting about it

The Manim video generator is the unusual part. We ask Claude to write Manim Python, validate it, render via subprocess, parse stderr on failure, ask Claude to fix it, retry up to two times, then fall back to a curated template. SHA-256 cache by concept + quality so a video only ever renders once. We also chose in-memory BM25Plus for RAG over PDFs instead of a vector database — keeps the entire stack on one Anthropic key, fits on a laptop, and the retrieval quality is already strong for textbook-style content.

Stack & infra

Next.js 15 frontend on Vercel; FastAPI backend on Python 3.12+ deployed via Docker to a GCP VM. Anthropic Claude is the only LLM provider. Exa powers live web research. LiveKit + Deepgram for the realtime voice mentor. The OpenAPI schema is generated from FastAPI and consumed by the frontend via openapi-typescript + TanStack Query — type-safe across the boundary, no hand-written client.

Status

Advanced prototype. Voice mentor, streaming chat, and PDF RAG are stable; the Manim render pipeline is the rough edge we're hardening next.

Mathmatika interface — streaming math explanation with formula rendering.
Mathmatika interface — generated Manim animation playing alongside the tutoring chat.