Relive the 6-Second Era.
Create viral Vine-inspired videos in seconds with AI-powered generation. Turn yourself into classic Vine memes using cutting-edge AI technology.
- 23 Iconic Templates: From "What Are Those?" to "LeBROOOON JAAAAMES!" β all the classic Vines from 2013-2016
- 9 Voice Personas: Multiple voices across Angry Kid, Sassy Drama, and Sports Announcer personas powered by ElevenLabs
- Smart Image Upload: Drag-and-drop interface with instant preview
- AI-Powered Generation:
- Caption generation (OpenAI GPT-4o-mini)
- Text-to-speech (ElevenLabs)
- Video generation (Fal.ai)
- FFmpeg muxing for final output
- Download & Share: Export MP4 videos and copy captions
- Shareable Links: Every video gets a unique shareable link
- Privacy Controls: Toggle between private (link-only) and public (discoverable)
- Two URL Structures:
- Private:
/v/t/{token}- Unguessable 12-character token - Public:
/v/{slug}- SEO-friendly slug based on caption
- Private:
- Native Share: Share button with native mobile share API and clipboard fallback
- Standalone Pages: Full-screen video viewer pages with Open Graph metadata
- Anonymous Support: Create and share videos without signing in
- Welcome Modal: First-time visitors get a friendly introduction to the platform
- Guest Mode: Full access to all features without signing in
- User Authentication: Optional sign-in for enhanced features
- Favourites System:
- Save templates locally as a guest
- Sync favourites across devices when signed in
- Public Gallery: Browse videos created by the community
- Filter & Search: Find templates by year (2013-2016) or search by name
- Responsive Design: Works beautifully on mobile and desktop
- Node.js 18+
- npm, yarn, or pnpm
- API keys (optional for development β mock data available)
npm install
# or
yarn install
# or
pnpm installCreate a .env.local file in the root directory:
# AI Services (optional - app falls back to mock data)
OPENAI_API_KEY=sk-...
ELEVENLABS_API_KEY=...
FAL_API_KEY=...
# Supabase (optional - enables authentication & database features)
NEXT_PUBLIC_SUPABASE_URL=https://xxxxx.supabase.co
NEXT_PUBLIC_SUPABASE_ANON_KEY=eyJhbGc...
SUPABASE_SERVICE_ROLE_KEY=eyJhbGc...
# App URL (required for video sharing)
NEXT_PUBLIC_APP_URL=http://localhost:3000
# In production, set this to your actual domain:
# NEXT_PUBLIC_APP_URL=https://yourdomain.comNote: The app works without any API keys! It automatically falls back to mock data for development.
Environment Variables:
OPENAI_API_KEY- For caption generation (optional)ELEVENLABS_API_KEY- For text-to-speech with 9 voices (optional)FAL_API_KEY- For video generation using Fal.ai (optional)NEXT_PUBLIC_SUPABASE_URL- Supabase project URL (optional)NEXT_PUBLIC_SUPABASE_ANON_KEY- Supabase anonymous key (optional)SUPABASE_SERVICE_ROLE_KEY- Supabase service role key (optional)NEXT_PUBLIC_APP_URL- Base URL for shareable links (required for sharing features)
For full authentication, database features, and video sharing:
- Create a Supabase project at supabase.com
- Run the SQL migrations in
supabase/migrations/in order:001_initial_schema.sql- Creates tables, RLS policies, and storage buckets002_seed_templates.sql- Seeds 23 classic Vine templates003_add_video_sharing.sql- Adds video sharing and visibility features003_remix_functions.sql- Adds helper functions004_add_view_counter_rpc.sql- Adds view counter function005_allow_anonymous_videos.sql- Allows anonymous video creation006_fix_generate_slug.sql- Fixes slug generation for public videos
- Add your Supabase credentials to
.env.local
npm run devOpen http://localhost:3000 in your browser.
npm run build
npm startnpm run lintrevine/
βββ app/
β βββ page.tsx # Home page with template grid
β βββ layout.tsx # Root layout with header & auth provider
β βββ generate/
β β βββ page.tsx # Video generation page
β βββ favourites/
β β βββ page.tsx # User's saved templates
β βββ discover/
β β βββ page.tsx # Public gallery
β βββ remixes/
β β βββ public/
β β βββ page.tsx # Public remixes page
β βββ v/
β β βββ [slug]/
β β β βββ page.tsx # Public video viewer
β β βββ t/
β β βββ [token]/
β β βββ page.tsx # Private video viewer
β βββ auth/
β β βββ callback/
β β βββ page.tsx # OAuth/magic link callback handler
β βββ api/
β βββ caption/ # OpenAI caption generation
β βββ tts/ # ElevenLabs text-to-speech
β βββ video/ # Fal.ai video generation
β βββ mux/ # FFmpeg audio/video muxing
β βββ videos/ # Video CRUD & sharing
β βββ create/ # Create video record
β βββ [id]/ # Get video by ID
β βββ [id]/visibility/ # Update video visibility
βββ components/
β βββ welcome-modal.tsx # First-visit welcome dialog
β βββ auth-modal.tsx # Sign in/up modal
β βββ user-menu.tsx # User dropdown menu
β βββ template-card.tsx # Template card with hover effects
β βββ generate-panel.tsx # Main generation interface
β βββ result-player.tsx # Video player with share controls
β βββ video-viewer.tsx # Standalone video page component
β βββ upload-face.tsx # Image upload with drag-drop
β βββ voice-select.tsx # Voice picker dropdown
β βββ year-select.tsx # Year filter dropdown
β βββ search-templates.tsx # Template search input
β βββ ui/ # shadcn/ui components
βββ lib/
β βββ env.ts # Environment variable management
β βββ providers/ # API provider architecture
β β βββ caption.ts # OpenAI provider
β β βββ tts.ts # ElevenLabs provider
β β βββ video.ts # Fal.ai provider
β β βββ mux.ts # FFmpeg provider
β βββ services/
β β βββ templates.ts # Template CRUD & favourites
β βββ hooks/
β β βββ use-auth.tsx # Authentication context & hooks
β βββ supabase-client.ts # Browser Supabase client
β βββ supabase-server.ts # Server-side Supabase client
β βββ video-sharing.ts # Video sharing utilities
β βββ templates.ts # Template definitions (23 templates)
β βββ template-adapter.ts # DB/hardcoded compatibility layer
β βββ types.ts # TypeScript type definitions
βββ config/
β βββ voices.ts # Voice preset definitions (9 voices)
βββ types/
β βββ database.ts # Supabase database types
βββ supabase/
β βββ migrations/ # Database migration scripts
βββ public/
βββ icon_header.svg # ReVine logo for header
βββ mock/ # Mock audio/video for development
All API routes use a provider architecture with automatic mock fallbacks when API keys are missing.
Generates a witty Vine-style caption using OpenAI GPT-4o-mini.
Request:
{
"templateId": "what_are_those",
"imageUrl": "https://..."
}Response:
{
"caption": "Your AI-generated caption here"
}Generates text-to-speech audio using ElevenLabs.
Request:
{
"text": "WHAT ARE THOOOOOSE?!",
"voiceId": "2EiwWnXFnvU5JabPnv8n"
}Response:
{
"audioUrl": "https://supabase.co/.../audio.mp3"
}Generates video using Fal.ai VEO 3.1 with automatic polling until completion.
Request:
{
"templateId": "what_are_those",
"imageUrl": "https://...",
"referenceThumbnail": "https://...",
"mode": "strict"
}Response:
{
"videoUrl": "https://fal.ai/.../video.mp4"
}Muxes audio and video together using FFmpeg and uploads to Supabase.
Request:
{
"videoUrl": "https://...",
"audioUrl": "https://..."
}Response:
{
"videoUrl": "https://supabase.co/.../final.mp4"
}Creates a video record and generates shareable URL.
Request:
{
"templateId": "what_are_those",
"videoUrl": "https://...",
"caption": "WHAT ARE THOOOSE?!",
"visibility": "private"
}Response:
{
"video": { ... },
"shareUrl": "https://yourdomain.com/v/t/{token}"
}Updates video visibility (private β public).
Request:
{
"visibility": "public"
}Response:
{
"video": { ... },
"shareUrl": "https://yourdomain.com/v/{slug}"
}Fetches a single video by ID.
- Next.js 15.5.4 - React framework with App Router
- React 19.1.0 - UI library
- TypeScript 5 - Type safety
- Tailwind CSS 4.1.9 - Styling
- Radix UI - Accessible component primitives
- shadcn/ui - Beautiful UI components
- Lucide Icons - Icon library
- Supabase - Authentication, database, and storage
- OpenAI GPT-4o-mini - Caption generation
- ElevenLabs - Text-to-speech
- Fal.ai - AI video generation
- FFmpeg - Audio/video processing
- ESLint - Code linting
- PostCSS - CSS processing
- Sharp - Image optimization
- Primary: Vine Teal (
#00bf8f) - Background: Light Gray (
#f3f3f3) - Borders: Neutral Gray (
#e6e6e6) - Text: Dark Gray (
#333333) - Secondary Text: Medium Gray (
#8a8a8a)
- Font Family: Helvetica Neue, Helvetica, Arial, sans-serif (classic Vine aesthetic)
- Modern Components: Using system fonts via shadcn/ui
- Mobile-First: Responsive grid (1 column β 2 β 3)
- Clean & Minimal: White cards on gray background
- Vine-Inspired: Retro aesthetic with modern UX
- Hover Effects: Subtle scale and shadow on template cards
- Loading States: Smooth spinner overlays
- Transitions: Fast, snappy interactions
Edit lib/templates.ts:
{
id: "your_template_id",
name: "Your Template Name",
description: "Short description",
thumbnail: "/path/to/thumbnail.jpg",
year: 2015,
delivery: "full_line",
audioScript: "Your audio script here",
videoPrompt: "Detailed video generation prompt",
beatSheet: [0, 1.5, 3.2, 5, 6],
captionPrompt: "Instructions for caption AI",
}Beat Sheet: Array of timestamps (in seconds) for key moments in the 6-second video.
Edit config/voices.ts:
{
id: "elevenlabs_voice_id",
label: "Voice Name (Characteristic)"
}Voice IDs must be valid ElevenLabs voice IDs from your account. The app currently includes:
- Angry Kid: Clyde (Intense), Harry (Rough), Liam (Confident)
- Sassy Drama: Laura (Sassy), Matilda (Upbeat), Jessica (Cute)
- Sports Announcer: Charlie (Hyped), Liam (Confident), Lily (Confident)
All external APIs are abstracted behind provider modules (lib/providers/). Each provider:
- Checks for API keys
- Falls back to mock data if keys are missing
- Returns consistent response formats
- Handles errors gracefully
Guest β Browse/Generate (localStorage favourites)
β (Sign In)
User β Synced favourites + Profile + Future features
Video Generated β Auto-create record (private by default)
β
Toggle visibility?
β
ββββββββββββββ΄βββββββββββββ
β β
Private Link Public Link
/v/t/{token} /v/{slug}
(unguessable) (SEO-friendly)
When API keys are missing, the app:
- Uses mock captions ("What are those?!")
- Serves pre-recorded audio from
/public/mock/audio.wav - Serves sample video from
/public/mock/video.mp4 - Still provides full user experience for development
- Templates: Supabase Storage (
templatesbucket) or local/public/ - Generated Audio: Uploaded to Supabase (
rendersbucket) - Final Videos: Supabase or external CDN
- Favourites: localStorage (guests) or Supabase database (users)
All Supabase tables have RLS policies:
- Users can only view/edit their own profile
- Users can only manage their own favourites
- Users can only update their own videos (or anonymous videos)
- All users can view templates (public)
- All users can view public videos
- Private videos require share token or ownership
- API keys are server-side only
- Client-side code uses public Supabase anon key (safe)
- Service role key is never exposed to the client
- Share tokens are cryptographically random (9 bytes β 12 chars base64)
- RLS policies enforce ownership verification
- Anonymous users can create videos but not modify others'
- Public videos are intentionally discoverable
- profiles: User profiles (created automatically on signup)
- templates: 23 Vine templates with all metadata
- favourites: Many-to-many relationship (users β templates)
- remixes: User-generated videos with metadata and sharing info
- templates: Public bucket for template thumbnails
- renders: Public bucket for generated audio/video files
visibility: 'private' | 'public' (default: 'private')share_token: Unique 12-char token (auto-generated)slug: URL-friendly slug for public videos (auto-generated)user_id: Owner ID (nullable for anonymous)views_count: View counter
See supabase/migrations/ for complete schema definitions.
The app is designed to work fully without any API keys! Just run:
npm run devMock data will be used automatically.
- Set up Supabase (see Supabase Setup section)
- Sign up with a test email
- Check Supabase dashboard β Authentication β Users
- Check browser console for detailed logs
- Mock video plays immediately (no API delay)
- Real video generation takes 3-5 minutes (Fal.ai processing)
- Generate a video
- Click "Share This Vine" to test sharing
- Toggle visibility between Private and Public
- Visit the shareable URL in a new tab
- Test as guest (logged out) to verify access controls
- β 23 classic Vine templates
- β AI-powered video generation (Fal.ai VEO 3.1)
- β User authentication
- β Favourites system with sync
- β Welcome modal for new users
- β Year filtering and search
- β Download videos
- β Video sharing with privacy controls
- β Standalone video viewer pages
- β Native share API integration
- β Anonymous video creation
- β Public remixes gallery with discovery
- β Mobile-optimized navigation and spacing
- π User profile pages
- π Video history/library
- π Video deletion functionality
- π View counter display
- π More templates (2017+ memes)
- π Custom template creation
MIT
Vibe coded with:
Built with:
Made with π for Vine nostalgia. An undertaking of Singapore's biggest hackathon Cursor Hackathon 2025.