AI-Powered Manim Video Generation - Transform text prompts into stunning mathematical animations using LLM-powered code generation.
# Using Nix (Easiest)
nix develop --impure -f .idx/dev.nix
uv sync
cp .env.example .env # Add your API keys
# Start the backend
uv run uvicorn main:app --host 0.0.0.0 --port 8000
# Start the React UI (new terminal)
cd frontend && npm install && npm run dev # React UI at http://localhost:5173Using Google IDX? Just open the project - everything auto-starts!
✨ AI-Powered Generation - Natural language to Manim animations with iterative refinement
🎬 Modern React UI - Beautiful Tailwind CSS interface with real-time updates
🗣️ Audio Narration - Synchronized TTS narration with educational subtitles (Piper TTS)
🔄 Smart Workflow - LangGraph-powered automatic error detection and correction
📹 Multi-Format Export - MP4, WebM, GIF, MOV with quality presets (480p to 4K)
🤖 100+ LLM Models - OpenAI, Anthropic, Cerebras, Google, and more via LiteLLM
⚡ Real-time Streaming - Watch code generation and refinement live
🎨 Customizable - Background colors, frame rates, subtitle styles
📚 Comprehensive guides available in the docs/ directory:
- Installation Guide - Detailed setup instructions (Nix, manual, Google IDX)
- User Interface Guide - React UI and Gradio UI documentation
- API Documentation - Complete API reference and examples
- Configuration Guide - Customize settings, models, and rendering
- Troubleshooting Guide - Common issues and solutions
"Create an animation showing the Pythagorean theorem with a right triangle"
"Animate a sine wave transforming into a cosine wave"
"Visualize the area under a curve using Riemann sums"
"Show matrix multiplication step by step"
"Animate bubble sort with an array of numbers"
manim-gpt/
├── main.py # FastAPI application
├── frontend/ # React + Tailwind UI
│ ├── src/components/ # UI components
│ └── src/services/ # API client
├── api/ # API routes
│ ├── code_routes.py # Code generation
│ ├── video_routes.py # Video generation
│ └── session_routes.py # Session management
├── services/ # Core logic
│ ├── code_generation.py # LLM integration
│ ├── iterative_workflow.py # LangGraph workflow
│ └── video_rendering.py # Manim rendering
├── models/ # Pydantic schemas
└── docs/ # Documentation
This project leverages these amazing open-source technologies:
- Manim Community - Mathematical animation engine
- FastAPI - Modern Python web framework
- LiteLLM - Unified LLM API (100+ models)
- LangGraph - Iterative workflow orchestration
- React + Tailwind CSS - Modern UI framework
- Piper TTS - Fast, local text-to-speech
- FFmpeg - Video processing and encoding
- UV - Fast Python package manager
Contributions are welcome! Areas for improvement:
- New features and UI enhancements
- Better prompt engineering for code generation
- Additional quality presets and export formats
- Enhanced error handling and recovery
- Documentation improvements
MIT License - see LICENSE for details.