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
- π 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
- Node.js v18+
- OpenAI API key
- Google Chrome / Chromium (required for Puppeteer)
# 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
OPENAI_API_KEY=your_openai_api_key
β οΈ Required for script generation via OpenAI
- Input: Paste a product page URL (Amazon/Shopify)
- Scrape: Puppeteer extracts product data
- Script: GPT-4 generates ad script
- Video: Remotion renders a 15β30 sec video
- Output: Preview & download final MP4
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 |
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/
- DTC brands testing product creatives
- Shopify owners generating quick ads
- Amazon affiliates making viral content
- Influencers creating reels for product links
- Stick to Amazon or Shopify for best results
- Long descriptions = better scripts
- Vertical videos are ideal for Instagram/TikTok
We welcome PRs and improvements!
- Fork this repo
- Create your branch:
git checkout -b feat/your-feature
- Make changes & commit:
git commit -m "feat: added cool thing"
- Push and open a Pull Request
Use Conventional Commits:
feat:
New featurefix:
Bug fixdocs:
Readme/docs updatesrefactor:
Cleanup/refactoringchore:
Setup or tool configs
- βοΈ URL scraping
- βοΈ GPT-4 ad copy
- βοΈ Remotion video render
- βοΈ Basic UI
- π Multiple script versions
- π£οΈ Text-to-speech (AI voiceover)
- π³ Multiple aspect ratios (9:16, 1:1)
- β¨ Advanced templates + animation
- User auth
- Deployments
- Payment + SaaS features
MIT Β© Rakshath U Shetty
Permission is hereby granted, free of charge, to any person obtaining a copy...
Letβs connect on LinkedIn
Star β this repo to support the project and help others find it. Open an issue, suggest features, or contribute a video template!