This is half of ClipFarm, the project we built at HackWithSeattle 2.0. ClipFarm takes a livestream or VOD, finds the moments worth clipping, and hands you back short clips ready to review and post. This repo holds the web app and the control plane; the actual video processing lives in the companion hws-clipper-container repo.
The frontend is a React app (Vite + Tailwind) where you paste a Twitch or YouTube link, watch clips come in, and edit or post them. It talks to the router, a small FastAPI service that acts as the control plane: when a job comes in, the router spins up a fresh EC2 instance just for that job, points it at the stream, and gets out of the way. The worker instance pulls the clip container from ECR, does the heavy lifting (capture, transcription, highlight detection, rendering), uploads its results to Supabase, and then terminates itself.
Supabase does double duty as our database (job and clip metadata in Postgres) and our storage (the rendered MP4s live in a bucket). It also handles auth — the browser only ever gets the anon key behind Row-Level Security, while the service-role key stays server-side, and the workers fetch their secrets from AWS Secrets Manager at boot rather than having them baked into launch scripts.
You need a router/.env (server config + secrets) and a frontend/.env (just the VITE_ vars) — both are gitignored, so grab them from a teammate.
The router runs at http://localhost:8000 with docs at /docs:
cd router
uv sync
uv run fastapi dev app/main.pyThe frontend runs at http://localhost:5173:
cd frontend
pnpm install
pnpm devTests: cd router && uv run pytest (AWS calls are mocked with moto).
React, TypeScript, Tailwind and Vite on the front; FastAPI, pydantic-settings and boto3 on the router; Supabase for Postgres, storage and auth; EC2 for the per-job workers, with images in ECR and secrets in Secrets Manager. Zernio handles the social-account OAuth flow for posting clips.