Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

ClipFarm — API & frontend

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.

How it works

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.

Running it

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.py

The frontend runs at http://localhost:5173:

cd frontend
pnpm install
pnpm dev

Tests: cd router && uv run pytest (AWS calls are mocked with moto).

Tech

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.

About

Web app and job router for a pipeline that watches and clips livestreams. 1st Place, HackWithSeattle 2.0.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages