Generate high-quality 2D animations using AI. This application allows users to create animations by describing them in natural language, which are then generated using Manim and AI.
- 🤖 AI-powered animation generation using OpenAI
- 🎬 Manim-based 2D animation rendering
- �� Google OAuth authentication
- 💾 PostgreSQL database with Prisma ORM
- 🚀 Redis-based job queue for background processing
- 📦 MinIO/S3 storage for video assets
- 🐳 Docker-based development environment
- Frontend: Next.js 15, Tailwind, TypeScript
- Backend: Express.js, Node.js
- Database: PostgreSQL with Prisma ORM
- Authentication: NextAuth.js with Google OAuth
- Job Queue: Redis with BullMQ
- Storage: MinIO (local) / AWS S3 (production)
- Animation: Manim (Python)
- Docker and Docker Compose installed
- Google OAuth credentials (you'll need to get your own credentials)
-
Clone the repository
git clone <repository-url> cd cursor-for-2d-animations-video
-
Configure environment variables
cp .env.example .env # Edit .env with your actual values
-
Start the development environment
docker-compose -f docker-compose.dev.yml up --build -d
-
Initialize the database
docker-compose -f docker-compose.dev.yml exec web npx prisma db push
-
Access the application
- Web App: http://localhost:3000
- MinIO Console: http://localhost:9001 (admin/minioadmin123)
- Express API: http://localhost:8080
-
Create bucket inside minio
- Go to localhost:9001
- Use user/passowrd(admin/minioadmin123)
- Create a bucket name video-assets
See .env.example
for all required variables. Key ones include:
AUTH_GOOGLE_ID
&AUTH_GOOGLE_SECRET
- Google OAuth credentialsOPENAI_API_KEY
- OpenAI API key for AI generationAUTH_SECRET
- NextAuth secret (generate withopenssl rand -base64 32
)
- Web (Next.js): Port 3000
- HTTP (Express): Port 8080
- Worker (Manim): Background processing
- PostgreSQL: Port 5432
- Redis: Port 6379
- MinIO: Port 9000 (API), 9001 (Console)
Note: Currently, when you make changes to the code, you need to rebuild the containers to see the changes:
# After making code changes
docker-compose -f docker-compose.dev.yml up --build -d
# View logs
docker-compose -f docker-compose.dev.yml logs -f web
# Restart a service
docker-compose -f docker-compose.dev.yml restart web
# Stop all services
docker-compose -f docker-compose.dev.yml down
# Rebuild and restart
docker-compose -f docker-compose.dev.yml up --build -d
-
Port already in use
# Check what's using the port lsof -i :3000 # Kill the process or change the port in docker-compose.dev.yml
-
Database connection issues
# Check if postgres is running docker-compose -f docker-compose.dev.yml ps postgres # View postgres logs docker-compose -f docker-compose.dev.yml logs postgres
-
MinIO not accessible
- Check if MinIO is running:
docker-compose -f docker-compose.dev.yml ps minio
- Access console at http://localhost:9001
- Default credentials: admin/minioadmin123
- Check if MinIO is running:
-
Worker not processing jobs
# Check worker logs docker-compose -f docker-compose.dev.yml logs worker # Check Redis connection docker-compose -f docker-compose.dev.yml exec redis redis-cli ping
-
Authentication issues
- Ensure Google OAuth credentials are correctly set in
.env
- Check
NEXTAUTH_URL
matches your local setup - Verify
AUTH_SECRET
is properly set
- Ensure Google OAuth credentials are correctly set in
# Stop and remove all containers, volumes, and images
docker-compose -f docker-compose.dev.yml down -v --rmi all
# Start fresh
docker-compose -f docker-compose.dev.yml up --build -d
The application consists of:
- Next.js Frontend: User interface and authentication
- Express Backend: API endpoints and job creation
- Worker Service: Background animation generation using Manim
- PostgreSQL: User data, conversations, and job tracking
- Redis: Job queue management
- MinIO/S3: Video file storage
- Clone the repository
- Create a feature branch
- Make your changes
- Test with the Docker development environment
- Submit a pull request