Add Discovery Videos feature

Let users upload videos, tag them with one or more entries, and watch
them from a new Discovery Videos page.

Backend:
- Add Video and VideoEntry models and relations
- Add video controller and /video routes
- Add video thumbnail generation service (ffmpeg-static)
- Add video upload storage location and config

Frontend:
- Add DiscoveryVideosPage with sidebar link and route
- Add AddVideoDialog, VideoDropzone, EntryMultiSelect, VideoCard
  and VideoPlayerDialog components
- Add discoveryVideos API client and useDiscoveryVideos hook
- Add format helpers, video types and normalizers
- Add skeleton for the page

Docs:
- Document the feature in docs-vault
This commit is contained in:
X4Lo committed 2026-11-03 15:57:53 +00:00
1 parent 4d88747649
commit eb3a12f6cb
41 files changed
+2163 -15

No files matched your search

+36
View File
@@ -360,3 +360,39 @@ Join table: Entry ↔ Network. Composite PK: `(network_id, entry_id)`. Has `orde
| `user_rating` | FLOAT |
**No timestamps. Currently unused — reserved for future franchise grouping.**
---
## Video
> [!info] File: `backend/models/Video.js`
Personal video record for the [[Discovery Videos]] page.
| Field | Type | Notes |
|---|---|---|
| `id` | INTEGER PK AUTO | |
| `title` | STRING(500) | Derived from filename on upload, editable |
| `description` | TEXT | User description |
| `filename` | STRING(200) | UUID filename in `data/videos/` |
| `original_name` | STRING(500) | Original upload name |
| `mime_type` | STRING(100) | |
| `size` | BIGINT | Bytes |
| `duration` | INTEGER | Nullable — reserved for ffmpeg probing |
| `thumbnail_path` | STRING(200) | Nullable — reserved for thumbnails |
**Has:** Entries (M:N via [[#VideoEntry]])
---
## VideoEntry
> [!info] File: `backend/models/VideoEntry.js`
Join table: Video ↔ Entry (M:N). Table name `video_entries`. FK `ON DELETE CASCADE` on both sides.
| Field | Type | Notes |
|---|---|---|
| `id` | INTEGER PK AUTO | |
| `video_id` | INTEGER FK | → Video |
| `entry_id` | INTEGER FK | → Entry |