Architecture Overview
Wintermute has three components sharing a Supabase backend. Each component has a distinct role, and they communicate through the database and HTTP calls.
What It Does
The system automates the entire lifecycle of short-form video content: discovering topics, writing scripts, generating voiceovers, assembling videos, reviewing them, and posting to YouTube. Three separate services divide this work.
How It Works
Worker (Python FastAPI) — The engine. Runs all AI processing: topic fetching, script generation, TTS voice synthesis, FFmpeg video assembly, and YouTube posting. Deployed on Render as a Docker web service. Stateless — pulls work from the database, uses /tmp for transient files, cleans up after each job.
Dashboard (Next.js 15 App Router) — The control panel. Manages channels, sources, prompt templates, review queue, content library, pipeline triggers, trend analysis, and analytics. Deployed on Vercel.
Supabase — The shared brain. PostgreSQL database holds all configuration, content state, analytics, and trend data. Supabase Storage hosts generated audio (MP3), video (MP4), thumbnails (JPEG), and channel template assets (PNG).
How They Connect
Dashboard reads and writes the database directly using the Supabase client. Dashboard proxies pipeline trigger calls to the Worker via internal API routes. Worker reads configuration from the database, processes content, writes results back, and uploads media to Supabase Storage.
Dashboard (Vercel) <--> Supabase (DB + Storage) <--> Worker (Render)
| |
+---- /api/pipeline/trigger ---- HTTP ---------------+Data Flow
- Dashboard to Supabase — Direct reads and writes for all UI operations (channel settings, content browsing, review actions)
- Dashboard to Worker — HTTP calls proxied through
/api/pipeline/triggerto start pipeline stages - Worker to Supabase — Reads channel config and content queue, writes processing results, uploads media files to Storage
- Cron to Worker — Render cron jobs hit the Worker’s HTTP endpoints on a schedule to automate the daily pipeline
Storage Buckets
| Bucket | Contents |
|---|---|
content-audio | Generated MP3 voiceover files |
content-video | Assembled MP4 video files |
content-thumbnails | Generated JPEG thumbnail images |
channel-assets | Template background PNGs and overlay images |
Where to Find It
- Worker source:
worker/directory — Python FastAPI application - Dashboard source:
dashboard/directory — Next.js 15 App Router application - Database schema:
supabase/migrations/directory — SQL migration files - Deployment config:
render.yaml— Render service and cron job definitions
Dependencies
| Service | Purpose |
|---|---|
| Supabase | Database and file storage |
| OpenAI | GPT-4o-mini (scripts), TTS (voice), Whisper (subtitles) |
| Render | Worker hosting and cron scheduling |
| Vercel | Dashboard hosting |
| FFmpeg | Video composition (installed in Worker Docker image) |