Project Summary
- Date: Late 2023 / Early 2024
- Description: CPAVID is a full-stack automated YouTube video creation and uploading system. It programmatically renders promotional videos using Remotion (React-based video engine), scrapes metadata from competitor YouTube videos via Puppeteer, and automates uploads to YouTube channels - all orchestrated through a Bull/Redis job queue pipeline. The frontend is a Next.js 14 + shadcn/ui dashboard wrapped as a Tauri desktop app.
Motivation
Automate CPA (Cost Per Action) video marketing on YouTube - eliminating manual video editing, metadata research, and uploading by creating an end-to-end pipeline that generates, optimizes, and publishes promotional content at scale across multiple channels and niches.
Links
Tech Stack
| Layer | Technology |
|---|---|
| Backend | TypeScript, NestJS v10, Prisma + MongoDB |
| Video Rendering | Remotion v4, Tailwind CSS |
| Browser Automation | Puppeteer (extra + stealth plugin) |
| Job Queue | Bull + Redis (4 queues: video, thumbnail, metadata, upload) |
| Frontend | Next.js 14 (App Router), React 18 |
| UI | shadcn/ui, Radix primitives, Tailwind CSS, framer-motion |
| Desktop Shell | Tauri 1.5 (Rust) |
| Validation | Zod, react-hook-form |
| Data Fetching | SWR, Axios |
Key Features
- Programmatic Video Generation - Remotion-based 90-second promo videos with animated intros, iPhone home screen simulations, browser sequences, hack-proof overlays, and background music (45 tracks)
- Automated YouTube Upload - Puppeteer logs into channels, uploads videos, injects custom thumbnails and metadata, sets visibility, and pins comments
- Metadata Scraping - Crawls competitor YouTube videos to extract relevant titles, tags, and descriptions
- Campaign System - Batch job distribution across channels and niches with configurable limits
- Scheduled Visibility Transitions - Videos uploaded as UNLISTED, then auto-switched to PUBLIC after a configurable delay
- Real-time Dashboard - Job progress tracking (video rendering - thumbnail - metadata - upload - public) with SWR polling
- Desktop App - Tauri-wrapped Next.js app for native OS experience
What I Learned
- Programmatic video rendering with Remotion (compositions, Series, animations, chroma-key overlays)
- Browser automation at scale with Puppeteer stealth plugin - YouTube login flows, captcha detection, feature-level scraping
- Job queue orchestration with Bull/Redis - multi-stage pipelines, retry logic (3 attempts), dead-letter handling, cross-queue dependencies
- NestJS modular architecture - dependency injection, module imports, Bull consumer patterns
- shadcn/ui + CSS variable theming - dark/light mode with next-themes, Radix UI accessibility primitives, CVA variant management
- Tauri desktop packaging - wrapping a Next.js static export in a Rust shell with native window management
- YouTube Studio automation - navigating the YouTube UI programmatically: upload flows, metadata injection, thumbnail upload, visibility toggling, comment pinning