Spaces:
Sleeping
Sleeping
Video Genesis Studio
A modern, beautiful frontend for automatic AI video generation with dual provider support (Kling AI & Replicate).
Features
- Dual Provider Support: Choose between Kling AI (Veo 3.1) and Replicate for video generation
- Automatic Script Segmentation: GPT-4o analyzes your script and creates optimal video segments
- Beautiful UI: Modern, distinctive design with ocean-dark theme
- Real-time Progress: Watch your videos generate with live status updates
- Download & Preview: Preview generated videos and download them individually or all at once
Getting Started
Prerequisites
- Node.js 18+
- Python backend running on port 4000
Installation
# Navigate to frontend directory
cd frontend
# Install dependencies
npm install
# Start development server
npm run dev
The frontend will be available at http://localhost:3000.
Environment Variables
Create a .env.local file in the frontend directory:
VITE_API_BASE_URL=http://localhost:4000
Architecture
frontend/
βββ src/
β βββ components/ # React components
β β βββ Icons.tsx # SVG icons
β β βββ ProviderSelect.tsx # Provider selection screen
β β βββ GenerationForm.tsx # Video generation form
β β βββ GenerationProgress.tsx # Progress display
β β βββ GenerationComplete.tsx # Results screen
β β βββ ErrorDisplay.tsx # Error handling
β βββ context/ # React context
β β βββ GenerationContext.tsx
β βββ types/ # TypeScript types
β βββ utils/ # Utilities & API client
β β βββ api.ts
β βββ App.tsx # Main application
β βββ main.tsx # Entry point
β βββ index.css # Tailwind styles
βββ public/ # Static assets
βββ package.json
βββ tailwind.config.js
βββ vite.config.ts
Provider Flows
Kling AI (Recommended)
- Upload character reference image
- Enter your full script
- Configure generation settings (voice, camera, style)
- GPT-4o analyzes and segments your script
- Videos are generated segment by segment
- Download all segments when complete
Replicate
- Enter your prompt
- Select from available models
- Configure aspect ratio and duration
- Video is generated via Replicate API
- Download when complete
Design System
The UI uses a custom design system with:
- Colors: Ocean-inspired dark theme with coral and electric accent colors
- Typography: Clash Display (headings) + Satoshi (body)
- Components: Glass morphism effects, smooth animations via Framer Motion
- Layout: Responsive grid with fluid animations
Development
# Development server with hot reload
npm run dev
# Build for production
npm run build
# Preview production build
npm run preview
Tech Stack
- React 19 - UI framework
- TypeScript - Type safety
- Vite - Build tool
- Tailwind CSS - Styling
- Framer Motion - Animations
API Integration
The frontend communicates with the Python backend at /api/*:
POST /api/generate-prompts- Generate video prompts with GPT-4oPOST /api/veo/generate- Start Kling video generationGET /api/veo/events/:taskId- SSE for generation progressPOST /api/replicate/generate- Start Replicate generationGET /api/replicate/status/:id- Check Replicate statusGET /health- Backend health check