Manimatic is an app for creating animations with Manim (a popular engine for explanatory math videos). Instead of writing Python code manually, you can describe your animation in plain language, and the app generates the code for you, compiles it, and returns both the animation video and the code. An integrated editor lets you tweak the generated script and recompile with your changes. Try it out at: https://manimatic.adelh.dev/
- Natural Language Animation Creation: Generate Manim animations with ease.
- Integrated Code Editor: Edit and recompile generated Python scripts directly in the app.
- Video Delivery: Automatically compiles, uploads, and serves animations.
- Backend: Golang
- Frontend: React
- Infrastructure: AWS Cloud Development Kit (CDK) in TypeScript for Infrastructure-as-Code (IaC).
The app comprises:
- Prompt Handling API: Receives prompts and generates Python scripts using GPT-4.
- Task Queue: Scripts are pushed to an SQS queue for processing.
- Worker Instance: Compiles Python code into video, uploads to S3, and returns signed URLs.
- Client Updates: Uses Server-Sent Events (SSE) to push results (code + video) to the frontend.
There are two ways to run the application locally:
- Clone this repository:
git clone https://github.com/theadell/manimatic
- Save your OpenAI API key:
echo "your-api-key" > openai_api_key.secret
- Start with Docker Compose:
docker-compose up
- Run the frontend:
cd frontend npm install npm run dev
Access the app at http://localhost:5173
- Docker and Docker Compose
- LocalStack for mocking AWS services
- OpenAI API Key
Prerequisites:
- Task - Task runner for development workflows
- Docker - For running LocalStack
- Go 1.21 or later
- Node.js and npm
- OpenAI API Key
- AWS CLI
- Clone the repository as above and set up your OpenAI API key
- Start the local development environment:
This will set up LocalStack and required AWS resources
task dev
- Start the services (in separate terminals):
# Start the API server task dev:api # Start the worker task dev:worker # Start the frontend task dev:front
Access the app at http://localhost:5173