A full-stack web application for learning mathematics through interactive Manim-generated animations.
- Rich Math Animations: Visualize mathematical concepts with Manim
- Topic Library: Browse topics across calculus, algebra, geometry, and trigonometry
- Interactive Learning: Watch animations, adjust parameters, and explore concepts
- Modern UI: Built with Next.js, Tailwind CSS, and shadcn/ui
- Responsive Design: Works seamlessly on all devices
.
├── backend/ # FastAPI backend
│ ├── main.py # FastAPI application
│ ├── topics.json # Topic definitions
│ ├── manim_scenes/ # Manim scene files
│ └── static/ # Rendered animations
│
└── frontend/ # Next.js frontend
├── app/ # Next.js app directory
├── components/ # React components
└── lib/ # Utilities and API client
- Python 3.8+
- Node.js 18+
- LaTeX (MiKTeX or TeX Live)
- Manim installed
- Navigate to backend directory:
cd backend- Install Python dependencies:
pip install -r requirements.txt- Install Manim:
pip install manim-
Install LaTeX:
- Windows: Download and install MiKTeX
- Mac:
brew install mactexorbrew install basictex - Linux:
sudo apt-get install texlive-full
-
Run the backend server:
python main.pyThe API will be available at http://localhost:8000
- Navigate to frontend directory:
cd frontend- Install dependencies:
npm install- Create environment file:
Create
.env.local:
NEXT_PUBLIC_API_URL=http://localhost:8000
- Run the development server:
npm run devOpen http://localhost:3000 in your browser.
Health check endpoint.
Get all available topics.
Get a specific topic with animation status.
Query Parameters:
quality: "low", "medium", or "high" (default: "medium")
Render an animation.
Request Body:
{
"topic_id": "derivative-x-squared",
"quality": "medium",
"parameters": {}
}Serve the video file directly.
- Create a Manim scene in
backend/manim_scenes/:
from manim import *
class YourScene(Scene):
def construct(self):
# Your animation code
pass- Add topic to
backend/topics.json:
{
"id": "unique-id",
"name": "Topic Name",
"description": "Description",
"category": "calculus",
"scene_file": "your_scene.py",
"scene_class": "YourScene",
"parameters": {}
}- Restart the backend server
- FastAPI with automatic API documentation at
/docs - Hot reload with
uvicorn --reload - Manim scenes in
manim_scenes/directory
- Next.js with App Router
- TypeScript for type safety
- Tailwind CSS for styling
- shadcn/ui components
- Calculus: Derivatives, Integrals, Riemann Sums
- Algebra: Quadratic Formula
- Geometry: Pythagorean Theorem
- Trigonometry: Sine Waves
- Create a new Manim scene
- Add it to
topics.json - Test the rendering
- Submit a pull request
MIT License