Skip to content

πŸš€ Turn any product URL into a professional AI-generated video ad using GPT-4, Remotion, and Puppeteer β€” a full-stack project that automates ad creation in minutes.

License

Notifications You must be signed in to change notification settings

Rakshath66/AdGen

Repository files navigation

πŸŽ₯ AdGen β€” AI Video Ad Generator from Any Product URL (For Businesses)

A full-stack application that turns product URLs into scroll-stopping video ads using GPT-4 for scriptwriting and Remotion for video generation. Just paste a link from Amazon or Shopify β€” we’ll do the rest.

βœ… Built with: Next.js, TypeScript, Remotion, Puppeteer, OpenAI GPT-4, TailwindCSS, ShadcnUI

GitHub Repo stars GitHub forks MIT License


πŸ“Έ Preview

Preview


✨ Features

  • πŸ”— Paste a product URL (Amazon or Shopify)
  • πŸ€– AI extracts images, title, features & benefits
  • ✍️ GPT-4 writes catchy ad scripts
  • 🎞️ Remotion generates video ad with overlays
  • 🎯 15–30 sec MP4 video output (vertical or horizontal)
  • πŸ–₯️ Modern UI with real-time status and preview
  • πŸ“₯ One-click video download

πŸš€ Getting Started

πŸ”§ Prerequisites

  • Node.js v18+
  • OpenAI API key
  • Google Chrome / Chromium (required for Puppeteer)

πŸ–₯️ Local Setup

# 1. Clone this repo
git clone https://github.com/Rakshath66/adgen.git
cd adgen

# 2. Install dependencies
npm install

# 3. Create env file
cp .env.example .env.local

# 4. Add your OpenAI key to .env.local
OPENAI_API_KEY=your_openai_api_key

# 5. Run the app
npm run dev

πŸ” Environment Variables

OPENAI_API_KEY=your_openai_api_key

⚠️ Required for script generation via OpenAI


🎬 How It Works

  1. Input: Paste a product page URL (Amazon/Shopify)
  2. Scrape: Puppeteer extracts product data
  3. Script: GPT-4 generates ad script
  4. Video: Remotion renders a 15–30 sec video
  5. Output: Preview & download final MP4

🧠 Tech Stack

Layer Tech
Frontend Next.js 14, TypeScript, TailwindCSS, ShadcnUI
State Mgmt Zustand, React Query
Backend API Routes in Next.js
Scraping Puppeteer
AI Generation OpenAI GPT-4
Video Remotion + Node.js FS

πŸ“ Project Structure

adgen/
β”œβ”€β”€ .env.local             # API Keys
β”œβ”€β”€ app/
β”‚   β”œβ”€β”€ page.tsx           # Main Page
β”‚   └── api/
β”‚       β”œβ”€β”€ scrape/        # Scrape logic
β”‚       β”œβ”€β”€ generate-script/ # GPT-4 ad copy
β”‚       β”œβ”€β”€ generate-video/  # Remotion output
β”‚       └── save-video/    # Video download
β”œβ”€β”€ components/
β”‚   β”œβ”€β”€ UrlInputForm.tsx
β”‚   β”œβ”€β”€ ProductPreview.tsx
β”‚   β”œβ”€β”€ ScriptPreview.tsx
β”‚   β”œβ”€β”€ VideoPlayer.tsx
β”‚   └── Stepper.tsx
β”œβ”€β”€ public/videos/
└── downloads/

πŸ’¬ Example Use Cases

  • DTC brands testing product creatives
  • Shopify owners generating quick ads
  • Amazon affiliates making viral content
  • Influencers creating reels for product links

πŸ› οΈ Quick Tips

  • Stick to Amazon or Shopify for best results
  • Long descriptions = better scripts
  • Vertical videos are ideal for Instagram/TikTok

🀝 Contributing

We welcome PRs and improvements!

βœ… Steps:

  1. Fork this repo
  2. Create your branch:
git checkout -b feat/your-feature
  1. Make changes & commit:
git commit -m "feat: added cool thing"
  1. Push and open a Pull Request

πŸ§ͺ Code Commit Style

Use Conventional Commits:

  • feat: New feature
  • fix: Bug fix
  • docs: Readme/docs updates
  • refactor: Cleanup/refactoring
  • chore: Setup or tool configs

πŸ›£οΈ Roadmap

βœ… Phase 1: MVP (URL β†’ Ad Video)

  • βœ”οΈ URL scraping
  • βœ”οΈ GPT-4 ad copy
  • βœ”οΈ Remotion video render
  • βœ”οΈ Basic UI

πŸ”œ Phase 2: Upgrades

  • πŸ” Multiple script versions
  • πŸ—£οΈ Text-to-speech (AI voiceover)
  • πŸ”³ Multiple aspect ratios (9:16, 1:1)
  • ✨ Advanced templates + animation

πŸ”’ Phase 3: (Out of Scope Now)

  • User auth
  • Deployments
  • Payment + SaaS features

πŸ“„ License

MIT Β© Rakshath U Shetty

Permission is hereby granted, free of charge, to any person obtaining a copy...

Let’s connect on LinkedIn


⭐ If You Like It

Star ⭐ this repo to support the project and help others find it. Open an issue, suggest features, or contribute a video template!

Releases

No releases published

Packages

No packages published