Gabriel Kaszewski 8f42164bce feat: add local files provider with indexing and rescan functionality
- Implemented LocalFilesProvider to manage local video files.
- Added LocalIndex for in-memory and SQLite-backed indexing of video files.
- Introduced scanning functionality to detect video files and extract metadata.
- Added API endpoints for listing collections, genres, and series based on provider capabilities.
- Enhanced existing routes to check for provider capabilities before processing requests.
- Updated frontend to utilize provider capabilities for conditional rendering of UI elements.
- Implemented rescan functionality to refresh the local files index.
- Added database migration for local files index schema.
2026-03-14 03:44:32 +01:00

k-tv

Self-hosted linear TV channel orchestration. Turns a personal media library into broadcast-style channels.

Stack

  • Backend — Rust (Axum), SQLite/PostgreSQL, Jellyfin
  • Frontend — Next.js 16, React 19, TanStack Query, Tailwind v4, shadcn/ui

Docker

Registry: registry.gabrielkaszewski.dev

Build

NEXT_PUBLIC_API_URL is baked into the frontend bundle at build time — always pass it explicitly.

# Backend
docker build -t registry.gabrielkaszewski.dev/k-tv-backend:latest ./k-tv-backend

# Frontend — NEXT_PUBLIC_API_URL required
docker build \
  --build-arg NEXT_PUBLIC_API_URL=https://tv-api.gabrielkaszewski.dev/api/v1 \
  -t registry.gabrielkaszewski.dev/k-tv-frontend:latest \
  ./k-tv-frontend

Push

docker push registry.gabrielkaszewski.dev/k-tv-backend:latest
docker push registry.gabrielkaszewski.dev/k-tv-frontend:latest

Build + push (one-liner)

docker build -t registry.gabrielkaszewski.dev/k-tv-backend:latest ./k-tv-backend && \
docker push registry.gabrielkaszewski.dev/k-tv-backend:latest && \
docker build \
  --build-arg NEXT_PUBLIC_API_URL=https://tv-api.gabrielkaszewski.dev/api/v1 \
  -t registry.gabrielkaszewski.dev/k-tv-frontend:latest \
  ./k-tv-frontend && \
docker push registry.gabrielkaszewski.dev/k-tv-frontend:latest

Deploy (on server)

docker compose -f compose.yml -f compose.traefik.yml pull
docker compose -f compose.yml -f compose.traefik.yml up -d

Ports

Service Port
Backend 3000
Frontend 3001

Env vars

Var Where Note
NEXT_PUBLIC_API_URL frontend build arg Baked in at build time — must point to the public backend URL
API_URL frontend runtime env Server-side only (Next.js API routes). Set in compose.
DATABASE_URL backend sqlite:///app/data/k-tv.db or postgres DSN
SESSION_SECRET backend Change in production
Description
Self hosted TV broadcast that uses existing media libary
Readme 2.2 MiB
Languages
TypeScript 55.4%
Rust 43.9%
CSS 0.4%
Dockerfile 0.2%