- New notes: History, Artwork - Rewrite TMDB Integration: single detail request, entry mapper, rate limiter, refresh sync, stale-entry refresh, recommendations - Update pages, routing, API reference, models, database migrations, services, components, hooks, API clients, settings, media system, library, Electron (Tauri in progress) and known issues - Rewrite README for the current React/Express stack and setup
146 lines
6.9 KiB
Markdown
146 lines
6.9 KiB
Markdown
---
|
|
title: Pages
|
|
tags:
|
|
- frontend
|
|
- pages
|
|
- react
|
|
---
|
|
|
|
# Pages
|
|
|
|
All pages in `react_frontend/src/pages/`. Lazy-loaded via `React.lazy()`. See [[Routing]] for URL mapping.
|
|
|
|
---
|
|
|
|
## HomePage
|
|
|
|
Browse trending and popular movies/TV shows from TMDB. Uses infinite scrolling via `useTmdb` hooks.
|
|
|
|
## SearchPage
|
|
|
|
TMDB multi-search with debounced input. Results checked against [[Stores|library store]] — local entries displayed if already in library.
|
|
|
|
## DashboardPage
|
|
|
|
Statistics dashboard with 7 chart components. See [[Statistics]].
|
|
|
|
Charts: `WatchActivityChart`, `WatchTimeChart`, `CouchDayChart`, `LibraryGrowthChart`, `MediaTypeChart`, `TopGenresChart`, `RatingsChart`
|
|
|
|
## LibraryPage
|
|
|
|
Entry grid showing all non-watchlist, non-hidden entries from [[Stores|library store]]. See [[Library]].
|
|
|
|
- Type tabs: **All / Movies / TV**
|
|
- **Favorites** and **Hidden** are independent toggle buttons that combine with the type tab (e.g. TV + Favorites = favorite shows). Hidden mode shows only hidden entries (watchlist included).
|
|
- Filter state lives in `useLibraryFiltersStore` (`favoritesOnly`, `hiddenOnly`)
|
|
|
|
## DiscoverPage
|
|
|
|
TMDB browse by category: popular, trending, top-rated, upcoming. Uses `useTmdb` infinite queries.
|
|
|
|
Route: `/discover/:category` where category = `popular-movies`, `trending-movies`, `popular-tv`, etc.
|
|
|
|
## DiscoveryVideosPage
|
|
|
|
Personal video vault — upload, link, and watch saved videos. See [[Discovery Videos]].
|
|
|
|
Route: `/discovery-videos`.
|
|
|
|
- Infinite-scroll grid of video cards (24/page)
|
|
- "Add media" button → `AddVideoDialog` (drag & drop upload)
|
|
- Cards render `<video preload="none">` — lazy playback, zero bytes until Play
|
|
- Linked entry chips navigate to `/entry/:id`
|
|
|
|
## WatchlistPage
|
|
|
|
Grid of entries where `watchlist = true`. Similar to LibraryPage.
|
|
|
|
## CollectionsPage
|
|
|
|
Grid of all [[Collections]]. Both TMDB collections and user-created collections.
|
|
|
|
## CollectionDetailsPage
|
|
|
|
Single collection with entry list, metadata, poster/backdrop. Edit/delete/refresh actions.
|
|
|
|
## MediaPage
|
|
|
|
Browse and manage all media (images) across all entries.
|
|
|
|
## CalendarPage
|
|
|
|
Monthly [[Calendar]] view showing upcoming episode air dates. Uses `episodesApi.getByMonth()`.
|
|
|
|
## EntryDetailsPage
|
|
|
|
One page for both cases (`pages/EntryDetailsPage.tsx`):
|
|
|
|
- `/entry/:id` — a library entry, loaded from the local DB
|
|
- `/entry/tmdb/:type/:tmdbId` — not in the library; renders the TMDB preview (`GET /entries/tmdb/preview/:type/:tmdbId` returns an `entry` object in the same shape as a library entry). Library-only actions are hidden and **Add to Library** replaces them. If the title is already in the library, the page redirects to `/entry/:id`.
|
|
|
|
Layout (`max-w-6xl`):
|
|
|
|
- **Hero** — full-bleed backdrop fading into the page, large poster (click → full-size popup), type/certification/status chips, title (selectable), tagline, year · runtime/seasons · "Created by" (TV) · "Directed by"
|
|
- **Action bar** — Watch (streaming), Trailer (in-app player from stored TMDB videos, YouTube search fallback), mark watched, rate, favorite, add to collection, ⋯ menu (watch history / status, hide, refresh, manage media, settings, delete)
|
|
- **Main column** — Overview, Keywords, Cast ([[Components#Entry Components|CastList]]), Seasons ([[Components#Entry Components|SeasonsContainer]] with list/cards toggle), In Collections, More like this (live TMDB recommendations), [[Artwork]]
|
|
- **Sidebar** — IMDb / TMDB (+ vote count) / your rating tiles, Details card (release, runtime, episodes, last aired, next episode, network logos, type, language, budget, box office, studio, country, watched), external links (TMDB, IMDb, website, Wikidata, Instagram, X, Facebook), **Where to watch** card (per-country providers, defaults to the browser's region)
|
|
|
|
## EntryCastsPage
|
|
|
|
Full cast & crew grid for an entry. Route: `/entry/:id/cast`. Width: `max-w-4xl`.
|
|
|
|
- Breadcrumb: `Entry Title / Cast & Crew` (Title links back to EntryDetailsPage)
|
|
- Loads ALL credits (cast + crew) via `useEntryCredits` (`GET /entries/:id/credits`) — not limited to the 10-cast preview shown on EntryDetailsPage
|
|
- Filter: All / Cast / Crew
|
|
- Sort: Credit Order, Popularity, Name, Birthday, Gender, Episodes (TV only)
|
|
- Sort direction toggle (asc/desc)
|
|
- Shows role/job label and episode count for TV series
|
|
- **Lazy loading**: renders 24 credits per chunk; an `IntersectionObserver` sentinel auto-loads the next chunk on scroll
|
|
- Links to [[Pages#PersonDetailsPage|PersonDetailsPage]]
|
|
|
|
## SeasonPage
|
|
|
|
Season detail (`max-w-6xl`), same visual language as the entry page.
|
|
|
|
- **Hero** — show backdrop, season poster, "← Back to {show}" button, show and season chips, "Completed" badge, year · episodes · total runtime · air-date range
|
|
- Rating chip (opens SeasonRatingDialog), TMDB rating, progress bar
|
|
- **Start / Continue: E#** — plays the first aired, unwatched episode
|
|
- Mark season watched → [[Components#Dialogs|MarkSeasonWatchedDialog]] (single date or scatter mode), rate, ⋯ (refresh season)
|
|
- **Episodes** with a **List / Cards** toggle (remembered per browser): stills (click to play), air date, runtime, TMDB rating, seen dates, finale / mid-season / upcoming badges, mark-watched button
|
|
|
|
## EpisodePage
|
|
|
|
Episode detail (`max-w-6xl`).
|
|
|
|
- **Hero** — episode still as backdrop, show / season chips, `S##E##`, finale / upcoming / watched badges, title, air date · runtime · TMDB rating + votes
|
|
- Actions: **Watch episode**, **Mark as watched / Watch again**, previous / next episode
|
|
- Main column: overview with "Directed by" / "Written by" (stored episode crew), Guest Stars (stored, linked by TMDB id), watch history (edit / delete), previous / next cards
|
|
- Sidebar: details card (aired, runtime, TMDB, production code, watched) and the season's episode list with the current one highlighted
|
|
|
|
## PeoplePage
|
|
|
|
Browse and search people (actors, directors). Both local DB and TMDB search.
|
|
|
|
## PersonDetailsPage
|
|
|
|
One page for both cases (`pages/PersonDetailsPage.tsx`):
|
|
|
|
- `/people/:id` — person in the local DB (favorite toggle; filmography from TMDB via the local id)
|
|
- `/people/tmdb/:tmdbId` — not in the DB; everything from the TMDB preview, with **Add to Library**. If TMDB reports a local id, redirects to `/people/:id`.
|
|
|
|
Both render one header (photo, name, department, born / died with age tooltip, place of birth, TMDB link, biography) and one filmography split into **In your library** and **Not in library**.
|
|
|
|
## HistoryPage
|
|
|
|
Watch history at `/history`. See [[History]].
|
|
|
|
- Year picker (only years with watches) and All / Movies / TV filter; tab, year and filter live in the URL (`?tab=&year=&type=`)
|
|
- Tabs: **History** (by month and day), **Timeline** (latest → January, month dividers, stacked binge sessions), **Year in Review** (wrapped-style stats)
|
|
|
|
## SettingsPage
|
|
|
|
App configuration + maintenance. See [[Settings Page]].
|
|
|
|
- General settings (TMDB API key, backend port)
|
|
- Maintenance: **TMDB Refresh** (stale entries job), media cleanup, watch statuses, duplicate credits, missing directors, impossible seen dates
|