Overview
This guide walks you through setting up a complete development environment for contributing to the AI Video Presentation Generator project. This setup is more detailed than the basic installation guide and includes development tools, testing setup, and best practices.This project currently supports Windows only for development. Linux/Mac support is in progress.
Prerequisites
Before starting, ensure you have:- Python 3.8+ installed
- Node.js 16+ and npm
- Git for version control
- A code editor (VS Code recommended)
- At least 4GB of free disk space
Initial Setup
Backend Environment Setup
Navigate to the backend directory and create a Python virtual environment:Activate the virtual environment:Windows:You should see
(venv) in your terminal prompt.Install Backend Dependencies
With the virtual environment activated, install all Python dependencies:This installs FastAPI, Manim, MoviePy, and other required packages.
Install FFmpeg
FFmpeg is required for video processing:
- Download FFmpeg from https://ffmpeg.org/download.html
- Extract the archive to a location (e.g.,
C:\ffmpeg) - Add the
bindirectory to your System PATH:- Open System Properties → Environment Variables
- Edit the
Pathvariable - Add
C:\ffmpeg\bin(or your installation path)
Install Manim
Manim should already be installed via requirements.txt, but verify:If not installed, run:
Configure Environment Variables
Create a Edit
.env file in the backend/ directory:.env with your API keys:Running in Development Mode
Backend Server
In thebackend/ directory with virtual environment activated:
- API:
http://localhost:8000 - API Docs:
http://localhost:8000/docs(Swagger UI) - Alternative Docs:
http://localhost:8000/redoc
Frontend Development Server
In thefrontend/ directory:
- Frontend:
http://localhost:5173
Hot Reloading
- Backend: FastAPI auto-reloads on file changes when using
uvicornwith--reloadflag - Frontend: Vite provides instant hot module replacement (HMR)
Git Workflow
Branch Strategy
-
Create a feature branch:
-
Make your changes and commit regularly:
-
Push to your fork:
- Create a Pull Request on GitHub
Commit Message Guidelines
Follow conventional commits:feat: add new animation type supportfix: resolve CORS issue in APIdocs: update setup instructionsrefactor: improve video composition logictest: add unit tests for content generator
Testing Locally
Manual Testing
- Start both backend and frontend servers
- Open
http://localhost:5173in your browser - Test the complete flow:
- Enter a topic (e.g., “Quantum Computing”)
- Set number of slides (3-10)
- Choose language and tone
- Click “Generate” and monitor progress
- Preview the generated video
- Download the final MP4
Testing API Endpoints
Use the Swagger UI athttp://localhost:8000/docs to test:
/api/generate- Generate presentation/api/progress/{generation_id}- SSE progress stream/api/video/{filename}- Video streaming/health- Health check
Checking Output Files
Generated files are stored inbackend/outputs/:
Development Tips
Enable Debug Logging
Enable Debug Logging
Add debug prints in the code or configure Python logging:
Clear Output Cache
Clear Output Cache
During development, you may want to clear cached outputs:
Monitor API Performance
Monitor API Performance
Check terminal output for timing information:
- Content generation time
- Audio generation per slide
- Animation rendering duration
- Final video composition time
Frontend Development
Frontend Development
Vite proxy is configured to forward API requests to
http://localhost:8000. Check vite.config.js if you change the backend port.Next Steps
Dependencies
Learn about all project dependencies and their purposes
Troubleshooting
Common issues and how to resolve them