Inspiration

Every great teacher knows that a good animation beats a thousand words. But tools like Manim take weeks to learn, and most educators simply don't have that time. I wanted to remove that barrier entirely — so anyone could create a 3Blue1Brown-style video just by describing an idea in plain language.

What it does

EduMotion AI takes a text prompt (e.g. "explain bubble sort step by step") and returns a fully rendered MP4 animation with a natural voiceover — in under 2 minutes. It supports Arabic and English, with proper RTL layout for Arabic users.

How we built it

  • Google Gemini 2.0 Flash — generates valid Manim Python code from the prompt
  • Manim — the mathematical animation engine used by 3Blue1Brown
  • edge-tts — natural text-to-speech narration
  • FastAPI + Docker — production-ready backend deployed on Render
  • React + Vite — clean, responsive frontend deployed on Vercel

We also built a custom AI resilience engine with automatic API key rotation and model fallback — so if one Gemini model is overloaded, the system automatically switches to another without the user noticing.

A smart caching system using SHA-256 fingerprinting avoids re-rendering duplicate requests, saving time and compute.

Challenges we ran into

Getting Manim, LaTeX, Cairo, and FFmpeg to all work together inside a Docker container on a free server took many failed builds. We also hit async conflicts between FastAPI and the TTS engine, which we solved by switching to subprocess-based audio generation.

Accomplishments that we're proud of

  • Full end-to-end pipeline: text prompt → rendered MP4 in under 2 minutes
  • AI that generates valid, runnable Manim code — not just plausible code
  • Bilingual support (Arabic RTL + English LTR) with cookie-persisted settings
  • Resilient AI engine with automatic fallback across Gemini model variants
  • Production-deployed and fully accessible online

What we learned

The hardest part of an AI pipeline isn't the AI — it's everything around it. Containerization, environment isolation, caching, error recovery, and async handling are what separate a demo from a real product.

What's next for EduMotion AI

  • Community gallery to browse and remix generated videos
  • Export to PowerPoint slides alongside the video
  • Teacher dashboard for managing and sharing content with students
  • Support for longer videos and custom animation styles

Built With

Share this project:

Updates