Target Product: ReelsAI.pro (Vertical Video Automation)
1. Complete Product Architecture
- Frontend: Next.js (React) for SEO and performance. Tailwind CSS for styling.
- Backend: Python (FastAPI) for AI orchestration. Node.js for user management.
- Storage: AWS S3 for video assets and final MP4s.
- Database: PostgreSQL (Supabase) for user data and project metadata.
- Queue System: Redis + Celery to handle video rendering tasks asynchronously.
2. Recommended Tech Stack (MVP)
- Frontend: React + Vite (Fastest setup).
- Backend: FastAPI (Python) - excellent for calling AI libraries.
- AI APIs: OpenAI (GPT-4) for Script, ElevenLabs for Voice, Stability AI for Images.
- Rendering: Remotion (Serverless FFmpeg wrapper) or custom FFmpeg worker.
3. Backend Workflow
- Script Generation: POST /generate-script -> GPT-4 Prompt: "Create a 30s hook, body, CTA script."
- Voice Generation: POST /generate-voice -> ElevenLabs API (Text to Speech). Returns audio URL.
- Caption Timing: Use ElevenLabs timestamps or Python `librosa` to detect phonemes. Map text to timecodes.
- Video Composition: Python script builds JSON for Remotion/FFmpeg. Layers: Background Image -> Audio -> Text Overlay.
4. FFmpeg / Remotion Rendering
- Remotion: Sends a JSON payload describing the video layers. Remotion spins up a container, runs FFmpeg, and returns the MP4 URL.
- Raw FFmpeg: `ffmpeg -i bg.jpg -i audio.mp3 -vf "drawtext=..." -c:v libx264 output.mp4`. Complex but free.
5. Database Schema
- Users: id, email, stripe_sub_status, credits.
- Projects: id, user_id, topic, script_text, voice_url, status (processing/done).
- Videos: id, project_id, s3_url, duration, resolution.
6. Scaling to 10,000 Users
- Concurrency: Use a distributed queue (Kafka or Redis) to manage rendering jobs.
- GPU Workers: Spin up GPU instances (AWS g4dn) only when jobs are in the queue. Scale down when idle.
- CDN: Serve generated videos via CloudFront to reduce latency.
7. Monetization Strategy
- Freemium: 3 free videos/month (watermarked).
- Pro ($29/mo): 50 videos, no watermark, HD export, custom branding.
- Agency ($99/mo): Unlimited, API access, team seats.
8. MVP Plan (2-4 Weeks)
- Week 1: Setup Next.js + Supabase Auth. Build basic form.
- Week 2: Integrate OpenAI & ElevenLabs APIs. Create "Script to Audio" pipeline.
- Week 3: Build FFmpeg composition logic (static image + audio + text overlay).
- Week 4: Deploy to Vercel + AWS. Launch landing page.