debate-videos
LEARN — the video library: search and filtering, video grids and cards, the persistent YouTube player (with picture-in-picture and a queue), lecture and dictionary pages, and the rankings leaderboards.
import {
LecturesPage,
PersistentVideoPlayer,
CategoryDockProvider,
useVideoPlayerStore,
} from "debate-videos"Video and ranking data comes from debate-data-sync, projected into the app's videos SQL
table and served a page at a time by /api/videos.
Package layout
Logic lives under src/, grouped by role; tests live under test/.
debate-videos/
├── src/
│ ├── components/ # cards, grids, search bar, player, stats modal
│ ├── context/ # category dock context
│ ├── data/ # category descriptions
│ ├── hooks/ # paginated video feed, infinite scroll, leaderboard data
│ ├── panels/ # lectures, dictionary, leaderboard, rankings pages
│ ├── state/ # persistent video player store
│ ├── types/ # video and topic types
│ └── index.ts # public entry point
└── test/ # Vitest suites for the card and leaderboard helpersTests
bun run test # or: npx vitest run
bun run coverage # writes ./coverage for this package alone