Personal Twitch clip bot/service for self-hosting.
This repo is public, but it is built for my own use: one hosted instance, broadcaster sign-in through Twitch, and per-channel clip settings stored in the app.
- FastAPI backend
- Vue frontend
- SQLModel + Alembic
- Twitch OAuth per broadcaster
uv sync --group dev
cp .env.example .env
uv run alembic upgrade headBackend:
uv run fastapi devFrontend:
cd frontend
pnpm install
pnpm devProduction-style frontend build:
cd frontend
pnpm buildThat writes the site into app/static/, which FastAPI serves at /. The API lives under /api.
TWITCH_CLIENT_IDTWITCH_CLIENT_SECRETAPP_BASE_URLSESSION_SECRETSECRET_ENCRYPTION_KEY(required, separate fromSESSION_SECRET)
The Twitch redirect URL should be:
{APP_BASE_URL}{TWITCH_REDIRECT_PATH}
Default callback:
/api/auth/twitch/callback
- Each broadcaster logs in with their own Twitch account.
- Clip creation happens with that broadcaster's own authorization.
- Commands, thresholds, permissions, denylist, and Discord webhook are per broadcaster.
- FastAPI docs/OpenAPI are disabled.