Transform Reddit posts, create split-screen videos, and generate AI-narrated content with one powerful tool
- Overview
- Features
- Tech Stack
- Getting Started
- Project Structure
- API Routes
- Environment Variables
- Database Schema
- Video Generation Pipeline
- Development
- Deployment
- Contributing
- License
VidSynth AI is a cutting-edge SaaS platform designed to revolutionize content creation for online creators. The platform automates and streamlines video creation through AI-powered features, enabling creators to produce engaging short-form content in minutes.
VidSynth AI helps you catch trends and create content that goes viral by providing three powerful video creation tools:
- Reddit Post Converter - Transform viral Reddit posts into engaging video content
- Split Screen Creator - Create dual-view videos with custom backgrounds
- ChatGPT Video Generator - Generate AI-narrated videos from AI-generated topics
- AI-Powered: Leverages Google Gemini, ElevenLabs, and Replicate for script generation, voice synthesis, and image creation
- Serverless Rendering: Uses Remotion Lambda for scalable, high-performance video generation
- Customizable: 20+ AI voices, 25+ caption styles, and multiple background options
- Production-Ready: Built with Next.js 15, TypeScript, and modern web technologies
- Credit System: Flexible pricing tiers with credit-based usage
Transform Reddit posts into engaging video content with:
- URL-based Reddit post fetching
- Custom script input option
- AI voice narration (20+ voice options)
- Customizable caption styles (25+ styles)
- Gameplay background footage
- Automated video composition
Workflow:
Reddit URL Input β Fetch Post β Voice Selection β Caption Style β
Background Selection β Preview β Generate Video
Create professional split-screen videos featuring:
- Side-by-side video composition
- Custom video upload support
- AI voice narration
- Stylized captions
- Background integration
- Real-time preview
Generate AI-powered topic videos with:
- Automated script generation using Google Gemini
- AI-generated images via Replicate (Flux Schnell)
- Voice synthesis with ElevenLabs
- Automated caption generation
- Multi-step workflow for customization
- 20+ AI Voices: Natural-sounding voices powered by ElevenLabs
- 25+ Caption Styles: Fully customizable with Tailwind CSS
- Multiple Backgrounds: Gameplay footage and custom options
- Real-time Preview: See your video before rendering
- Free Tier: Get started with limited credits
- Hobby Plan: Perfect for casual creators
- Clipper Plan: For regular content creators
- Pro Plan: Unlimited possibilities for professionals
| Technology | Version | Purpose |
|---|---|---|
| Next.js | 15.5.6 | React framework with App Router |
| React | 19.0.0 | UI library |
| TypeScript | 5 | Type safety |
| Tailwind CSS | 3.4.1 | Utility-first CSS framework |
| Framer Motion | 12.4.10 | Animation library |
| Shadcn/UI | Latest | Accessible component library |
| Radix UI | Latest | Unstyled UI primitives |
| Lucide React | 0.475.0 | Icon library |
| Technology | Version | Purpose |
|---|---|---|
| Drizzle ORM | 0.39.3 | Type-safe database toolkit |
| PostgreSQL | Latest | Primary database |
| Supabase | 2.48.1 | Backend-as-a-service |
| Clerk | 6.12.2 | Authentication & user management |
| Service | Purpose |
|---|---|
| Remotion | React-based video rendering (v4.0.267) |
| Remotion Lambda | Serverless video rendering on AWS |
| Google Gemini | AI script generation (Gemini 1.5 Flash) |
| ElevenLabs | Text-to-speech voice synthesis |
| Replicate | AI image generation (Flux Schnell) |
| AssemblyAI | Caption/transcription generation |
| AWS S3 | Video and asset storage |
- ESLint - Code linting
- Drizzle Kit - Database migrations
- Axios - HTTP client
- Canvas - Server-side canvas rendering
- Svix - Webhook management
- Node.js 18+ and npm/yarn/pnpm
- PostgreSQL database
- AWS account (for S3 and Remotion Lambda)
- API keys for:
- Clerk (authentication)
- Google Gemini (script generation)
- ElevenLabs (voice synthesis)
- Replicate (image generation)
- AssemblyAI (captions)
-
Clone the repository
git clone https://github.com/yourusername/vidsynth-ai.git cd vidsynth-ai -
Install dependencies
npm install # or yarn install # or pnpm install
-
Set up environment variables
Copy the example environment file:
cp env-example.txt .env.local
Fill in all required environment variables (see Environment Variables section)
-
Set up the database
Generate and run migrations:
npm run db:generate npm run db:push
-
Run the development server
npm run dev
-
Open your browser
Navigate to http://localhost:3000
vidsynth-ai/
βββ app/ # Next.js App Router
β βββ (auth)/ # Authentication routes (Clerk)
β β βββ sign-in/
β β βββ sign-up/
β βββ dashboard/ # Main application (protected)
β β βββ _components/ # Dashboard-specific components
β β β βββ VideoContext.tsx # Video state management
β β β βββ sidebar.tsx # Dashboard sidebar
β β βββ reddit/ # Reddit post converter
β β β βββ page.tsx # URL input & custom script
β β β βββ voice-selection/
β β β βββ caption-selection/
β β β βββ background-selection/
β β β βββ preview/
β β βββ split-screen/ # Split screen creator
β β βββ chatgpt-video/ # ChatGPT video generator
β β βββ settings/ # User settings
β βββ api/ # API routes
β β βββ get-reddit/ # Fetch Reddit posts
β β βββ generate-script/ # AI script generation
β β βββ generate-images/ # AI image generation
β β βββ get-audio/ # Voice synthesis
β β βββ get-captions/ # Caption generation
β β βββ generate-video/ # Video rendering
β β βββ upload-video/ # S3 upload
β β βββ store-video/ # Database storage
β β βββ user/ # User management
β βββ affiliates/ # Affiliate program
β βββ pricing/ # Pricing page
β βββ layout.tsx # Root layout
β βββ page.tsx # Landing page
βββ components/ # Reusable components
β βββ ui/ # Shadcn/Radix components
β βββ Hero.tsx # Landing page hero
β βββ Features.tsx # Features section
β βββ Navbar.tsx # Navigation bar
β βββ ScrollingVideos.tsx # Video showcase
β βββ ... # Other landing components
βββ config/ # Configuration
β βββ index.ts # App config (voices, captions, pricing)
β βββ schema.ts # Drizzle database schema
β βββ db.ts # Database connection
β βββ supabase.ts # Supabase client
βββ remotion/ # Remotion video components
β βββ Composition.tsx # Main video composition
β βββ Root.tsx # Root wrapper
β βββ index.ts # Exports
βββ lib/ # Utility functions
β βββ utils.ts # Helper functions
βββ public/ # Static assets
β βββ videos/ # Video files
β βββ images/ # Images
β βββ icons/ # Icons
βββ docs/ # Documentation assets
β βββ landing.png # Landing page screenshot
βββ middleware.ts # Clerk auth middleware
βββ next.config.ts # Next.js configuration
βββ tailwind.config.ts # Tailwind configuration
βββ drizzle.config.ts # Database configuration
βββ package.json # Dependencies
| Endpoint | Method | Description |
|---|---|---|
/api/get-reddit |
GET | Fetch Reddit post metadata |
/api/generate-script |
POST | Generate video scripts using Google Gemini |
/api/generate-images |
POST | Create images via Replicate AI (Flux Schnell) |
/api/get-audio |
POST | Generate audio using ElevenLabs TTS |
/api/get-captions |
POST | Generate captions with AssemblyAI |
/api/generate-poster |
POST | Create video poster/thumbnail |
/api/generate-video |
POST | Render final video on Remotion Lambda |
/api/upload-video |
POST | Upload video to AWS S3 |
/api/store-video |
POST | Store video metadata in database |
| Endpoint | Method | Description |
|---|---|---|
/api/user/register |
POST | Register new user |
/api/user/deduct-credit |
POST | Deduct credits for video generation |
/api/user/credits |
GET | Get user credit balance |
/api/clerk-webhook |
POST | Handle Clerk authentication events |
| Endpoint | Method | Description |
|---|---|---|
/api/get-signed-url |
POST | Generate S3 signed URLs |
/api/videos/[id] |
GET | Retrieve video metadata |
/api/videos/[id] |
DELETE | Delete video |
Create a .env.local file with the following variables:
# Application
NEXT_PUBLIC_APP_URL=http://localhost:3000
# Database
DATABASE_URL=postgresql://user:password@host:port/database
# Clerk Authentication
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_test_...
CLERK_SECRET_KEY=sk_test_...
NEXT_PUBLIC_CLERK_SIGN_IN_URL=/sign-in
NEXT_PUBLIC_CLERK_SIGN_UP_URL=/sign-up
# AWS S3 Configuration
AWS_ACCESS_KEY_ID=AKIA...
AWS_SECRET_ACCESS_KEY=...
AWS_REGION=us-east-1
S3_BUCKET_NAME=vidsynth-videos
S3_POSTER_BUCKET_NAME=vidsynth-posters
# Remotion Lambda
REMOTION_AWS_ACCESS_KEY_ID=AKIA...
REMOTION_AWS_SECRET_ACCESS_KEY=...
REMOTION_LAMBDA_REGION=us-east-1
REMOTION_S3_BUCKET_NAME=remotion-renders
# API Keys
ELEVENLABS_API_KEY=sk_...
ASSEMBLYAI_API_KEY=...
REPLICATE_API_TOKEN=r8_...
GOOGLE_GEMINI_API_KEY=AI...
# Supabase (Optional)
NEXT_PUBLIC_SUPABASE_URL=https://...supabase.co
NEXT_PUBLIC_SUPABASE_ANON_KEY=eyJ...See env-example.txt for a complete list of required variables.
{
id: string (primary key)
email: string
name: string
clerkId: string (unique)
credits: number (default: 100)
subscriptionStatus: 'FREE' | 'HOBBY' | 'CLIPPER' | 'PRO'
createdAt: timestamp
updatedAt: timestamp
}{
id: string (primary key)
userId: string (foreign key)
type: 'REDDIT' | 'SPLIT_SCREEN' | 'CHATGPT'
title: string
status: 'DRAFT' | 'PROCESSING' | 'COMPLETED' | 'FAILED'
redditUrl: string (nullable)
script: text
voiceId: string
captionStyle: json
backgroundType: string
videoUrl: string (nullable)
posterUrl: string (nullable)
duration: number (nullable)
createdAt: timestamp
updatedAt: timestamp
}# Generate migrations
npm run db:generate
# Apply migrations
npm run db:migrate
# Push schema changes
npm run db:push
# Open Drizzle Studio (GUI)
npm run db:studio- User inputs content (Reddit URL, custom script, or AI topic)
- Validate user subscription status
- Check and deduct credits
- Script: Fetch Reddit post or generate with Google Gemini
- Audio: Generate voiceover using ElevenLabs TTS
- Images: Create visuals with Replicate AI (for ChatGPT videos)
- Captions: Generate timestamped captions with AssemblyAI
- Remotion Lambda assembles video components:
- Background footage/gameplay
- Caption overlays with custom styling
- Audio synchronization
- Image sequences (for ChatGPT videos)
- Remotion Lambda renders video on AWS (2048MB memory)
- Upload to S3 bucket
- Generate signed URL for download
- Store metadata in PostgreSQL
- Update project status to COMPLETED
User Input
β
Validate & Check Credits
β
Generate Resources (Script/Audio/Images)
β
Assemble Remotion Composition
β
Render on Remotion Lambda
β
Upload to S3
β
Store Metadata in DB
β
Deliver to User
# Development
npm run dev # Start dev server
npm run build # Build for production
npm run start # Start production server
npm run lint # Run ESLint
# Database
npm run db:generate # Generate migrations
npm run db:migrate # Run migrations
npm run db:push # Push schema changes
npm run db:studio # Open Drizzle Studio- Use
VideoContextfor multi-step wizard flows - Implement proper loading states
- Handle error scenarios gracefully
- Maintain subscription status awareness
- Keep components modular and reusable
- Use Shadcn/UI for consistent design
- Implement proper TypeScript types
- Add comprehensive error handling
- Preload assets when possible
- Optimize state updates
- Implement proper cleanup
- Manage memory efficiently
- Validate all user inputs
- Check file types before upload
- Implement rate limiting
- Verify user authorization
- Validate credits before processing
-
Push to GitHub
git add . git commit -m "Initial commit" git push origin main
-
Deploy to Vercel
- Connect your GitHub repository to Vercel
- Add all environment variables
- Deploy
-
Set up Remotion Lambda
- Follow Remotion Lambda setup guide
- Configure AWS credentials
- Deploy Lambda functions
Ensure all environment variables are configured in your deployment platform:
- Database connection
- API keys
- AWS credentials
- Clerk authentication
- Run database migrations
- Test video generation pipeline
- Configure webhooks (Clerk, Stripe)
- Set up monitoring and logging
Contributions are welcome! Please follow these steps:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Follow TypeScript best practices
- Use functional components and hooks
- Implement proper error handling
- Add JSDoc comments for complex functions
- Keep code concise and maintainable
- Write meaningful variable names
This project is licensed under the MIT License - see the LICENSE file for details.
- Remotion - Video rendering framework
- Shadcn/UI - Component library
- ElevenLabs - Voice synthesis
- Vercel - Deployment platform
- Clerk - Authentication
Built with β€οΈ by the VidSynth AI team