A free, local-first platform for learning mathematics through beautiful Manim animations. Powered by local AI models (via Ollama) - no API costs.
- 📚 Structured Courses - Integration and Differentiation courses with 9 lessons
- 🎬 Manim Video Rendering - Pre-built scenes for every lesson
- 🤖 AI Visualization Generator - Type any concept, get a custom Manim animation
- 📈 Interactive Function Plotter - Real-time plotting with derivative/integral overlays
- 🎯 Interactive Tools - Riemann sums explorer, tangent line explorer
┌─────────────────────────────────────────────┐
│ Frontend (React + Vite) │
│ Courses │ AI Visualizer │ Function Plotter │
└──────────────────┬──────────────────────────┘
│ HTTP
┌──────────────────▼──────────────────────────┐
│ Backend (FastAPI) │
│ Manim Renderer │ LLM Service │ Course API │
└──────────────────┬──────────────────────────┘
│
┌────────▼────────┐
│ Ollama (Local) │
│ Local Models │
└─────────────────┘
- Python 3.10+ with Manim installed
- Node.js 18+ for the frontend
- Ollama with local models (e.g.,
qwen2.5-coder:7b)
cd backend
pip install -r requirements.txt
python main.pyThe backend will run at http://localhost:8000.
cd frontend
npm install
npm run devThe frontend will run at http://localhost:3000.
The AI Tutor page needs its own WebSocket server (separate from the API above):
python backend/tutor_server.pyIt listens on ws://localhost:8765 (override with HOST/PORT env vars).
Without it, the Tutor page shows "Tutor server not reachable" and lessons can't start.
Make sure Ollama is running with your models:
ollama pull qwen2.5-coder:7b
ollama pull gemma4:4b
ollama pull gemma4:31b- Browse Courses - Go to the home page and pick Integration or Differentiation
- Watch Lessons - Each lesson has text content + a "Render Video" button that generates the Manim animation
- AI Visualizer - Type any concept (e.g., "show me the chain rule") and the local AI will write and render Manim code
- Function Plotter - Enter any function like
x^2orsin(x), see it plotted in real-time, toggle derivative/integral overlays, or render it as a Manim video
| Method | Endpoint | Description |
|---|---|---|
| GET | /health |
Health check |
| GET | /courses |
List all courses |
| GET | /courses/{course_id} |
Get course with lessons |
| GET | /courses/{course_id}/lessons/{lesson_id} |
Get specific lesson |
| POST | /generate |
Generate Manim code from prompt + render |
| POST | /render |
Render provided Manim code |
| GET | /render-scene/{scene_name} |
Render pre-built scene |
| GET | /models |
List available Ollama models |
manimviz/
├── backend/
│ ├── main.py # FastAPI server
│ ├── llm_service.py # Ollama integration
│ ├── courses.py # Course/lesson data
│ ├── scenes/ # Pre-built Manim scenes
│ └── rendered_videos/ # Rendered MP4 output
├── frontend/
│ ├── src/
│ │ ├── components/ # React components
│ │ ├── pages/ # Page components
│ │ └── App.jsx # Main app with routing
│ └── package.json
└── README.md
- Add a Manim scene in
backend/scenes/ - Add the lesson data in
backend/courses.py - The lesson will automatically appear in the course
Add a new course object to the COURSES list in backend/courses.py.
Edit backend/llm_service.py and change the default_model attribute.
- "Failed to connect to Ollama" - Make sure Ollama is running:
ollama serve - "Manim render failed" - Check that Manim is installed:
manim --version - Videos not loading - Make sure the backend is running on port 8000