Skip to Content
System ReferenceArchitecture Overview

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

  1. Dashboard to Supabase — Direct reads and writes for all UI operations (channel settings, content browsing, review actions)
  2. Dashboard to Worker — HTTP calls proxied through /api/pipeline/trigger to start pipeline stages
  3. Worker to Supabase — Reads channel config and content queue, writes processing results, uploads media files to Storage
  4. Cron to Worker — Render cron jobs hit the Worker’s HTTP endpoints on a schedule to automate the daily pipeline

Storage Buckets

BucketContents
content-audioGenerated MP3 voiceover files
content-videoAssembled MP4 video files
content-thumbnailsGenerated JPEG thumbnail images
channel-assetsTemplate 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

ServicePurpose
SupabaseDatabase and file storage
OpenAIGPT-4o-mini (scripts), TTS (voice), Whisper (subtitles)
RenderWorker hosting and cron scheduling
VercelDashboard hosting
FFmpegVideo composition (installed in Worker Docker image)
Last updated on