docs(react_frontend): add comprehensive documentation & AGENTS.md
- docs/README.md: overview and table of contents - docs/tech_stack.md: full dependency inventory and design decisions - docs/project_structure.md: directory tree with conventions - docs/architecture.md: data flow, layer responsibilities, key patterns - docs/routing.md: route table, code splitting, discover categories - docs/state_management.md: Zustand stores and React Query conventions - docs/api_layer.md: all API modules with endpoint mappings - docs/components.md: layout, entries, collections, charts, dialogs, UI primitives - docs/pages.md: all 16 pages with features and routes - docs/styling.md: theming, CSS tokens, responsive breakpoints, animations - AGENTS.md: architecture summary, code conventions, data flow, key files
This commit is contained in:
1 parent
6bff2055b4
commit
d28b4caa7e
14 files changed
+1266
-78
No files matched your search
@@ -0,0 +1,141 @@
|
||||
# API Layer
|
||||
|
||||
> **HTTP Client:** Axios · **Base URL:** `/api/v1` (proxied to backend via Vite dev server)
|
||||
|
||||
---
|
||||
|
||||
## Configuration
|
||||
|
||||
**File:** `src/lib/api.ts`
|
||||
|
||||
Creates a shared Axios instance with:
|
||||
- `baseURL` derived from `VITE_API_URL` environment variable (defaults to `/api/v1`)
|
||||
- Image URL helpers for constructing media paths
|
||||
|
||||
---
|
||||
|
||||
## API Modules
|
||||
|
||||
Each file in `src/api/` provides functions for one backend domain. All functions return the Axios response `.data` directly and run normalisation where applicable.
|
||||
|
||||
### `entries.ts`
|
||||
|
||||
| Function | Method | Endpoint |
|
||||
| ------------------------------------ | -------- | ---------------------------------- |
|
||||
| `getAll()` | `GET` | `/entries` |
|
||||
| `getById(id)` | `GET` | `/entries/:id` |
|
||||
| `create(tmdb_id, is_tvserie)` | `POST` | `/entries` |
|
||||
| `update(id, data)` | `PUT` | `/entries/:id` |
|
||||
| `updateRatings(id, ratings)` | `PUT` | `/entries/:id/ratings` |
|
||||
| `updateIds(id, ids)` | `PUT` | `/entries/:id/ids` |
|
||||
| `delete(id)` | `DELETE` | `/entries/:id` |
|
||||
| `refresh(id)` | `PUT` | `/entries/:id/refresh` |
|
||||
| `fetchCollection(id)` | `PUT` | `/entries/:id/fetch-collection` |
|
||||
| `getSeasons(id)` | `GET` | `/entries/:id/seasons` |
|
||||
| `uploadMedia(id, formData)` | `POST` | `/entries/:id/media` |
|
||||
| `setMediaSelected(entryId, mediaId)` | `PUT` | `/entries/:entryId/media/:mediaId` |
|
||||
| `deleteMedia(entryId, mediaId)` | `DELETE` | `/entries/:entryId/media/:mediaId` |
|
||||
|
||||
### `collections.ts`
|
||||
|
||||
| Function | Method | Endpoint |
|
||||
| ------------------------------------ | -------- | --------------------------------------------- |
|
||||
| `getAll()` | `GET` | `/collections` |
|
||||
| `getById(id)` | `GET` | `/collections/:id` |
|
||||
| `create(data)` | `POST` | `/collections` |
|
||||
| `update(id, data)` | `PUT` | `/collections/:id` |
|
||||
| `updateWithMedia(id, formData)` | `PUT` | `/collections/:id` (multipart) |
|
||||
| `delete(id)` | `DELETE` | `/collections/:id` |
|
||||
| `addEntry(collectionId, entryId)` | `POST` | `/collections/:collectionId/entries/:entryId` |
|
||||
| `removeEntry(collectionId, entryId)` | `DELETE` | `/collections/:collectionId/entries/:entryId` |
|
||||
|
||||
### `entry-seen.ts`
|
||||
|
||||
| Function | Method | Endpoint |
|
||||
| --------------------- | -------- | ------------------------------- |
|
||||
| `getAll()` | `GET` | `/entry-seen` |
|
||||
| `getByEntry(entryId)` | `GET` | `/entry-seen/by-entry/:entryId` |
|
||||
| `create(data)` | `POST` | `/entry-seen` |
|
||||
| `update(id, data)` | `PUT` | `/entry-seen/:id` |
|
||||
| `delete(id)` | `DELETE` | `/entry-seen/:id` |
|
||||
|
||||
### `episode-seen.ts`
|
||||
|
||||
| Function | Method | Endpoint |
|
||||
| ------------------------- | -------- | ------------------------------------- |
|
||||
| `getAll()` | `GET` | `/episode-seen` |
|
||||
| `getById(id)` | `GET` | `/episode-seen/:id` |
|
||||
| `getByEpisode(episodeId)` | `GET` | `/episode-seen/by-episode/:episodeId` |
|
||||
| `create(data)` | `POST` | `/episode-seen` |
|
||||
| `update(id, data)` | `PUT` | `/episode-seen/:id` |
|
||||
| `delete(id)` | `DELETE` | `/episode-seen/:id` |
|
||||
|
||||
### `episodes.ts`
|
||||
|
||||
| Function | Method | Endpoint |
|
||||
| -------------------------------- | ------ | ------------------------------------- |
|
||||
| `getByMonth(startDate, endDate)` | `GET` | `/episodes/month/:startDate/:endDate` |
|
||||
|
||||
### `seasons.ts`
|
||||
|
||||
| Function | Method | Endpoint |
|
||||
| ------------------ | -------- | ----------------------- |
|
||||
| `getAll()` | `GET` | `/seasons` |
|
||||
| `getById(id)` | `GET` | `/seasons/:id` |
|
||||
| `getEpisodes(id)` | `GET` | `/seasons/:id/episodes` |
|
||||
| `create(data)` | `POST` | `/seasons` |
|
||||
| `update(id, data)` | `PUT` | `/seasons/:id` |
|
||||
| `delete(id)` | `DELETE` | `/seasons/:id` |
|
||||
|
||||
### `people.ts`
|
||||
|
||||
| Function | Method | Endpoint |
|
||||
| ------------------------ | ------ | ------------------------------ |
|
||||
| `getAll()` | `GET` | `/people` |
|
||||
| `getById(id)` | `GET` | `/people/:id` |
|
||||
| `getCredits(id)` | `GET` | `/people/:id/credits` |
|
||||
| `getTmdbFilmography(id)` | `GET` | `/people/:id/tmdb-filmography` |
|
||||
| `fetchByTmdbId(tmdb_id)` | `POST` | `/people/fetch` |
|
||||
|
||||
### `tmdb.ts`
|
||||
|
||||
| Function | Method | Endpoint |
|
||||
| --------------------------- | ------ | ------------------------------- |
|
||||
| `getTrendingMovies(page)` | `GET` | `/entries/tmdb/trending/movie` |
|
||||
| `getTrendingTv(page)` | `GET` | `/entries/tmdb/trending/tv` |
|
||||
| `getPopularMovies(page)` | `GET` | `/entries/tmdb/popular/movie` |
|
||||
| `getPopularTv(page)` | `GET` | `/entries/tmdb/popular/tv` |
|
||||
| `getTopRatedMovies(page)` | `GET` | `/entries/tmdb/top-rated/movie` |
|
||||
| `getTopRatedTv(page)` | `GET` | `/entries/tmdb/top-rated/tv` |
|
||||
| `getUpcomingMovies(page)` | `GET` | `/entries/tmdb/upcoming/movie` |
|
||||
| `search(query, page)` | `GET` | `/entries/tmdb/search` |
|
||||
| `getPopularPeople(page)` | `GET` | `/people/tmdb/popular` |
|
||||
| `searchPeople(query, page)` | `GET` | `/people/tmdb/search` |
|
||||
|
||||
### `statistics.ts`
|
||||
|
||||
| Function | Method | Endpoint |
|
||||
| --------------------------- | ------ | ------------------------------------ |
|
||||
| `getAllTimeWatchTime()` | `GET` | `/statistics/watch-time` |
|
||||
| `getYearlyWatchTime(year)` | `GET` | `/statistics/watch-time/year/:year` |
|
||||
| `getYearlyWatchCount(year)` | `GET` | `/statistics/watch-count/year/:year` |
|
||||
| `getWatchdayDistribution()` | `GET` | `/statistics/watch-weekday` |
|
||||
|
||||
### `settings.ts`
|
||||
|
||||
| Function | Method | Endpoint |
|
||||
| -------------- | ------ | ----------- |
|
||||
| `get()` | `GET` | `/settings` |
|
||||
| `update(data)` | `PUT` | `/settings` |
|
||||
|
||||
---
|
||||
|
||||
## Normalisation
|
||||
|
||||
**File:** `src/lib/normalizers.ts`
|
||||
|
||||
Transforms backend responses into the frontend type contract:
|
||||
|
||||
- Handles singular ↔ plural aliases (`entryRating` → `entryRatings`)
|
||||
- Maps nested includes to flat arrays
|
||||
- Marks entries loaded from the library as `isInLibrary: true`
|
||||
@@ -0,0 +1,70 @@
|
||||
# Architecture
|
||||
|
||||
## Data Flow
|
||||
|
||||
```
|
||||
┌──────────────┐ ┌───────────────┐ ┌──────────────────┐ ┌──────────────┐
|
||||
│ Pages / │────▶│ React Query │────▶│ API modules │────▶│ Backend │
|
||||
│ Components │ │ Hooks │ │ (src/api/*.ts) │ │ REST API │
|
||||
│ │◀────│ (src/hooks/) │◀────│ │◀────│ │
|
||||
└──────┬───────┘ └───────────────┘ └──────────────────┘ └──────────────┘
|
||||
│ │
|
||||
│ reads / writes │ normalizeEntry()
|
||||
▼ │ normalizeCollection()
|
||||
┌──────────────┐ │
|
||||
│ Zustand │◀──────────────────────────────────┘
|
||||
│ Stores │ (library store updated on fetch & mutation)
|
||||
└──────────────┘
|
||||
```
|
||||
|
||||
1. **Pages** call React Query hooks (e.g. `useLibrary()`, `useEntry(id)`).
|
||||
2. **Hooks** invoke API module functions which make Axios HTTP requests to the backend.
|
||||
3. **Responses** are run through normaliser functions (`normalizeEntry`, `normalizeCollection`) to transform snake_case backend data and alias inconsistencies into a consistent frontend shape.
|
||||
4. On library-level fetches and mutations, the **Zustand library store** is also updated so that all components reflect changes instantly without waiting for cache invalidation.
|
||||
|
||||
---
|
||||
|
||||
## Layer Responsibilities
|
||||
|
||||
| Layer | Directory | Responsibility |
|
||||
| -------------- | ---------------- | ---------------------------------------------------------------------------------------------------- |
|
||||
| **Pages** | `pages/` | Route entry-points. Compose components, call hooks, manage local UI state (search, filters, dialogs) |
|
||||
| **Components** | `components/` | Reusable UI building blocks. Receive data via props. Emit events via callbacks |
|
||||
| **Hooks** | `hooks/` | Encapsulate React Query queries & mutations. Define cache keys, stale times, invalidation |
|
||||
| **API** | `api/` | Thin Axios wrappers. One function per endpoint. Run normalisation on responses |
|
||||
| **Stores** | `stores/` | Zustand global state. Library entry cache (Map), theme preference |
|
||||
| **Lib** | `lib/` | Pure utility functions — class merging, media URL building, data normalisation |
|
||||
| **Types** | `types/` | All TypeScript interfaces and type aliases |
|
||||
| **UI** | `components/ui/` | shadcn/ui primitives — buttons, dialogs, inputs, etc. |
|
||||
|
||||
---
|
||||
|
||||
## Key Patterns
|
||||
|
||||
### Normalisation
|
||||
|
||||
Backend responses use a mix of casing conventions and singular/plural aliases. The normaliser layer (`lib/normalizers.ts`) transforms these into a consistent frontend shape:
|
||||
|
||||
- `entryRating` → `entryRatings`
|
||||
- `entryId` → `entryIds`
|
||||
- `entrySeen` → `entrySeens`
|
||||
- Snake-case object keys preserved for domain fields; camelCase for discriminators
|
||||
|
||||
### Lazy Loading
|
||||
|
||||
All pages are loaded with `React.lazy()` and wrapped in `<Suspense>` with route-specific skeleton fallbacks. This code-splits each page into a separate chunk.
|
||||
|
||||
### Infinite Queries
|
||||
|
||||
TMDB browse endpoints (trending, popular, top-rated, search) use React Query's `useInfiniteQuery` with:
|
||||
- `initialPageParam: 1`
|
||||
- `getNextPageParam: (lastPage) => lastPage.page < lastPage.total_pages ? lastPage.page + 1 : undefined`
|
||||
- Pages are flattened via `.data?.pages.flatMap(p => p.results)`
|
||||
|
||||
### Library Merge
|
||||
|
||||
When displaying TMDB entries alongside library entries (e.g. on the Home or Discover pages), the `EntryCard` component checks the Zustand library store by TMDB ID. If an entry is already in the library, the richer local version (with ratings, favourite status, etc.) is displayed instead of the raw TMDB data.
|
||||
|
||||
### Mutation Optimism
|
||||
|
||||
Mutations (add/remove/update) update the Zustand store immediately on success, then invalidate related React Query caches for eventual consistency.
|
||||
@@ -0,0 +1,149 @@
|
||||
# Components
|
||||
|
||||
## Layout
|
||||
|
||||
### `AppLayout`
|
||||
**File:** `src/components/layout/AppLayout.tsx`
|
||||
|
||||
Root layout component rendered around all routes via React Router's `<Outlet />`.
|
||||
|
||||
- **Desktop:** Fixed left sidebar (`w-56`) + main content area
|
||||
- **Mobile:** Top header with hamburger menu → `Sheet` overlay sidebar
|
||||
- Responsive padding adjustments (`pt-18` on mobile for fixed header)
|
||||
|
||||
### `Sidebar`
|
||||
**File:** `src/components/layout/Sidebar.tsx`
|
||||
|
||||
Navigation sidebar with grouped links:
|
||||
|
||||
| Group | Items |
|
||||
| ------- | -------------------------------------- |
|
||||
| Main | Dashboard, Home |
|
||||
| Library | Library, Watchlist, Collections, Media |
|
||||
| Other | Calendar, People |
|
||||
| Footer | Settings, Theme toggle |
|
||||
|
||||
Active route highlighted with `bg-sidebar-accent`. Tooltips on all items.
|
||||
|
||||
---
|
||||
|
||||
## Entry Components
|
||||
|
||||
### `EntryCard`
|
||||
**File:** `src/components/entries/EntryCard.tsx`
|
||||
|
||||
Versatile card for displaying a movie or TV series. Accepts either a library `Entry` or a `TmdbEntry`.
|
||||
|
||||
- Poster image with `aspect-[2/3]` ratio
|
||||
- Overlays: title, year, rating badge, type badge (Movie/TV)
|
||||
- Action button: "Add to Library" for TMDB entries, "Remove" (with confirm) for library entries
|
||||
- Checks Zustand library store to determine if a TMDB entry is already in the library
|
||||
- Skeleton loading state
|
||||
|
||||
### `EntryLibraryGrid`
|
||||
**File:** `src/components/entries/EntryLibraryGrid.tsx`
|
||||
|
||||
Responsive grid for displaying `EntryCard` items with infinite scroll.
|
||||
|
||||
- Responsive columns: 2 → 3 → 4 → 5 → 6 → 7 cols across breakpoints
|
||||
- `IntersectionObserver` for lazy loading / load-more trigger
|
||||
- Loading skeletons and empty state
|
||||
- Animated card entrance (`animate-card-enter`)
|
||||
|
||||
### `TrendingSlider`
|
||||
**File:** `src/components/entries/TrendingSlider.tsx`
|
||||
|
||||
Auto-rotating hero carousel for featured entries.
|
||||
|
||||
- Displays top 10 entries as full-width backdrop heroes
|
||||
- Auto-rotates every 6 seconds
|
||||
- Manual navigation (prev/next arrows)
|
||||
- Gradient overlay with title, description, rating, type badge
|
||||
- Add/remove library actions
|
||||
|
||||
### `TrendingGrid`
|
||||
**File:** `src/components/entries/TrendingGrid.tsx`
|
||||
|
||||
Tabbed grid showing entries by category (trending, popular, etc.).
|
||||
|
||||
- Tab switcher: Movies / TV Series
|
||||
- Shows up to 14 items + "More" link to discover page
|
||||
- Animated card entrance
|
||||
|
||||
### `CastList`
|
||||
**File:** `src/components/entries/CastList.tsx`
|
||||
|
||||
Horizontal scrollable list of cast members for an entry.
|
||||
|
||||
- Filters credits to `cast_type === 'cast'` only
|
||||
- Avatar + name + character name
|
||||
- Clickable → links to person details page
|
||||
|
||||
### `SeasonsContainer`
|
||||
**File:** `src/components/entries/SeasonsContainer.tsx`
|
||||
|
||||
Expandable seasons list for TV series entries.
|
||||
|
||||
### `EpisodeWatchHistory`
|
||||
**File:** `src/components/entries/EpisodeWatchHistory.tsx`
|
||||
|
||||
Watch history display for individual episodes.
|
||||
|
||||
---
|
||||
|
||||
## Collection Components
|
||||
|
||||
### `CollectionsGrid`
|
||||
**File:** `src/components/collections/CollectionsGrid.tsx`
|
||||
|
||||
Grid of collection cards showing poster with gradient overlay and name. Includes skeleton and empty states.
|
||||
|
||||
---
|
||||
|
||||
## Dashboard Charts
|
||||
|
||||
All chart components use **Recharts** with `ResponsiveContainer`. Common pattern: card wrapper + filter controls in `CardHeader` + chart in `CardContent`.
|
||||
|
||||
| Component | Chart Type | Data Source | Controls |
|
||||
| -------------------- | ------------- | -------------------------- | -------------------------- |
|
||||
| `WatchActivityChart` | Area chart | Yearly watch count | Year selector, type filter |
|
||||
| `WatchTimeChart` | Bar chart | Yearly watch time | Year selector |
|
||||
| `RatingsChart` | Bar chart | Rating distribution | — |
|
||||
| `TopGenresChart` | Bar/Pie chart | Genre frequency | — |
|
||||
| `CouchDayChart` | Bar chart | Weekday watch distribution | — |
|
||||
| `LibraryGrowthChart` | Line chart | Library size over time | — |
|
||||
| `MediaTypeChart` | Pie chart | Movies vs TV split | — |
|
||||
|
||||
---
|
||||
|
||||
## Dialog Components
|
||||
|
||||
All dialogs follow a controlled pattern: `open` + `onOpenChange` props from parent, mutation hooks for actions, loading states on submit buttons.
|
||||
|
||||
| Component | Purpose |
|
||||
| ---------------------------- | ------------------------------------------------ |
|
||||
| `ConfirmDialog` | Generic confirmation modal (default/destructive) |
|
||||
| `EntrySettingsDialog` | Toggle entry flags (favourite, hidden, etc.) |
|
||||
| `EntrySeenDialog` | Add/edit movie watch record or TV episode watch |
|
||||
| `RatingDialog` | 10-star rating picker with hover preview |
|
||||
| `EntryMediaDialog` | Upload custom posters/backdrops for an entry |
|
||||
| `MovieWatchHistoryDialog` | View/edit/delete movie watch records |
|
||||
| `AddEntryToCollectionDialog` | Add an entry to one or more collections |
|
||||
| `CollectionEditDialog` | Edit collection metadata and media |
|
||||
| `EpisodeSeenEditDialog` | Edit an episode watch record |
|
||||
|
||||
---
|
||||
|
||||
## Skeleton Components
|
||||
|
||||
**File:** `src/components/skeletons/PageSkeletons.tsx`
|
||||
|
||||
Loading placeholder components matching the layout of their target pages. Used as `<Suspense>` fallbacks for lazy-loaded routes.
|
||||
|
||||
---
|
||||
|
||||
## UI Primitives (shadcn/ui)
|
||||
|
||||
Located in `src/components/ui/`. These are copy-pasted from the shadcn/ui registry and customised via CSS variables. They are **not** installed as a package.
|
||||
|
||||
`avatar` · `badge` · `button` · `calendar` · `card` · `checkbox` · `dialog` · `dropdown-menu` · `input` · `label` · `popover` · `progress` · `scroll-area` · `select` · `separator` · `sheet` · `skeleton` · `sonner` · `switch` · `tabs` · `textarea` · `tooltip`
|
||||
@@ -0,0 +1,206 @@
|
||||
# Pages
|
||||
|
||||
All pages are **lazy-loaded** via `React.lazy()` with per-route skeleton fallbacks. Each page fetches data through React Query hooks.
|
||||
|
||||
---
|
||||
|
||||
## `HomePage`
|
||||
|
||||
**File:** `src/pages/HomePage.tsx` · **Route:** `/`
|
||||
|
||||
Landing page with hero carousel and TMDB browse grids.
|
||||
|
||||
- **TrendingSlider** — auto-rotating top-10 hero banner
|
||||
- **Search bar** — debounced (400 ms); switches between search results and browse mode
|
||||
- **Browse sections:** Trending, Popular, Top Rated, Upcoming (each as `TrendingGrid`)
|
||||
- Pre-loads library on mount via `useLibrary()`
|
||||
|
||||
---
|
||||
|
||||
## `DashboardPage`
|
||||
|
||||
**File:** `src/pages/DashboardPage.tsx` · **Route:** `/dashboard`
|
||||
|
||||
Statistics overview with summary cards and charts.
|
||||
|
||||
- **Stats cards:** Movies count, TV count, Favourites, Watchlist, Total watch time
|
||||
- **Charts:** WatchActivityChart, WatchTimeChart, RatingsChart, TopGenresChart, CouchDayChart, MediaTypeChart, LibraryGrowthChart
|
||||
- **Recently Watched:** grid of 14 entries sorted by `date_last_seen` descending
|
||||
- Year selector controls for time-scoped charts
|
||||
|
||||
---
|
||||
|
||||
## `LibraryPage`
|
||||
|
||||
**File:** `src/pages/LibraryPage.tsx` · **Route:** `/library`
|
||||
|
||||
Filterable and sortable library grid.
|
||||
|
||||
- **Tabs:** All / Movies / TV / Favourites / Hidden
|
||||
- **Search:** debounced text search
|
||||
- **Filters:** Genre, Rating range, Year range (via popovers)
|
||||
- **Sort:** Last Watched, Date Added, Title, Release Date, Rating
|
||||
- **Pagination:** 28 items per page with "Load More" button
|
||||
- Responsive: stacked controls on mobile, inline on desktop
|
||||
|
||||
---
|
||||
|
||||
## `WatchlistPage`
|
||||
|
||||
**File:** `src/pages/WatchlistPage.tsx` · **Route:** `/watchlist`
|
||||
|
||||
Similar to LibraryPage but filtered to entries with `watchlist: true`.
|
||||
|
||||
---
|
||||
|
||||
## `CollectionsPage`
|
||||
|
||||
**File:** `src/pages/CollectionsPage.tsx` · **Route:** `/collections`
|
||||
|
||||
- **Tabs:** All / Official (TMDB) / Custom (user-created)
|
||||
- Search by collection name
|
||||
- Grid of `CollectionsGrid` cards (2–6 cols)
|
||||
|
||||
---
|
||||
|
||||
## `CollectionDetailsPage`
|
||||
|
||||
**File:** `src/pages/CollectionDetailsPage.tsx` · **Route:** `/collections/:id`
|
||||
|
||||
Single collection view.
|
||||
|
||||
- Hero banner with backdrop
|
||||
- Poster, name, description, entry count, user rating
|
||||
- Entry grid (`EntryLibraryGrid`)
|
||||
- Edit button → `CollectionEditDialog`
|
||||
|
||||
---
|
||||
|
||||
## `MediaPage`
|
||||
|
||||
**File:** `src/pages/MediaPage.tsx` · **Route:** `/media`
|
||||
|
||||
Custom media gallery.
|
||||
|
||||
- **Tabs:** All / Posters / Backdrops / Logos
|
||||
- Search by entry title
|
||||
- Responsive grid (1–6 cols; backdrops as `aspect-video`)
|
||||
|
||||
---
|
||||
|
||||
## `CalendarPage`
|
||||
|
||||
**File:** `src/pages/CalendarPage.tsx` · **Route:** `/calendar`
|
||||
|
||||
Monthly calendar for upcoming episode air dates.
|
||||
|
||||
- Monthly grid layout
|
||||
- Episodes grouped by air date (up to 4 per day cell)
|
||||
- Navigation: previous / next month buttons
|
||||
- Today highlighted with primary colour
|
||||
- Episode items show poster thumbnail + S##E## label
|
||||
- Tooltip with full episode info
|
||||
|
||||
---
|
||||
|
||||
## `EntryDetailsPage`
|
||||
|
||||
**File:** `src/pages/EntryDetailsPage.tsx` · **Route:** `/entry/:id`
|
||||
|
||||
Full entry detail page.
|
||||
|
||||
- **Hero:** blurred backdrop banner with gradient overlay
|
||||
- **Sticky poster** on left side
|
||||
- **Metadata:** title, year, runtime, rating, type badge, genres
|
||||
- **Description / storyline**
|
||||
- **Actions:** Favourite toggle, Mark Watched dropdown, Rate, Watch History (movies), Hide/Unhide, Refresh, Add to Collection, Manage Media, Settings
|
||||
- **Sections:** Cast list, Seasons (TV series), Watch history, Collections
|
||||
|
||||
---
|
||||
|
||||
## `SeasonPage`
|
||||
|
||||
**File:** `src/pages/SeasonPage.tsx` · **Route:** `/entry/:entryId/season/:seasonId`
|
||||
|
||||
Season detail with episode list.
|
||||
|
||||
- Poster + season header
|
||||
- Progress bar (watched / total episodes)
|
||||
- "Mark Season Watched" button
|
||||
- Episode list: number, name, air date, runtime, ratings, watch status badge
|
||||
- Mark individual episodes as watched
|
||||
- Links to episode detail pages
|
||||
|
||||
---
|
||||
|
||||
## `EpisodePage`
|
||||
|
||||
**File:** `src/pages/EpisodePage.tsx` · **Route:** `/entry/:entryId/season/:seasonId/episode/:episodeId`
|
||||
|
||||
Single episode detail.
|
||||
|
||||
- Still image (or poster fallback)
|
||||
- Metadata: episode number, air date, runtime
|
||||
- Description / overview
|
||||
- Guest stars (cast list)
|
||||
- Watch history
|
||||
- Back-links to season and entry
|
||||
|
||||
---
|
||||
|
||||
## `DiscoverPage`
|
||||
|
||||
**File:** `src/pages/DiscoverPage.tsx` · **Route:** `/discover/:category`
|
||||
|
||||
TMDB category browsing with infinite scroll.
|
||||
|
||||
- Category from URL param: `trending`, `popular`, `top-rated`, `upcoming`
|
||||
- Tab: Movies / TV (hidden for `upcoming`)
|
||||
- Infinite pagination via `useInfiniteQuery`
|
||||
- `EntryCard` grid
|
||||
|
||||
---
|
||||
|
||||
## `PeoplePage`
|
||||
|
||||
**File:** `src/pages/PeoplePage.tsx` · **Route:** `/people`
|
||||
|
||||
People search and discovery.
|
||||
|
||||
- Search from TMDB Popular or search query
|
||||
- Infinite scroll pagination
|
||||
- Avatar grid (3–8 cols)
|
||||
- Links to person detail pages
|
||||
|
||||
---
|
||||
|
||||
## `PersonDetailsPage`
|
||||
|
||||
**File:** `src/pages/PersonDetailsPage.tsx` · **Route:** `/people/:id`
|
||||
|
||||
Person biography and filmography.
|
||||
|
||||
- Profile photo + biographical info
|
||||
- Known-for department
|
||||
- Filmography: Cast credits + Crew credits
|
||||
- Links to entry detail pages
|
||||
|
||||
---
|
||||
|
||||
## `PersonTmdbRedirectPage`
|
||||
|
||||
**File:** `src/pages/PersonTmdbRedirectPage.tsx` · **Route:** `/people/tmdb/:tmdbId`
|
||||
|
||||
Intermediate page that fetches a person from TMDB by ID, creates a local record if needed, then redirects to `/people/:id`.
|
||||
|
||||
---
|
||||
|
||||
## `SettingsPage`
|
||||
|
||||
**File:** `src/pages/SettingsPage.tsx` · **Route:** `/settings`
|
||||
|
||||
Application settings form.
|
||||
|
||||
- Fields: TMDB API Key, Backend Port
|
||||
- Zod validation
|
||||
- Save button with loading state
|
||||
@@ -0,0 +1,138 @@
|
||||
# Project Structure
|
||||
|
||||
```
|
||||
react_frontend/
|
||||
├── public/ # Static assets served as-is
|
||||
├── src/
|
||||
│ ├── api/ # API client modules (one per domain)
|
||||
│ │ ├── collections.ts
|
||||
│ │ ├── entries.ts
|
||||
│ │ ├── entry-seen.ts
|
||||
│ │ ├── episode-seen.ts
|
||||
│ │ ├── episodes.ts
|
||||
│ │ ├── people.ts
|
||||
│ │ ├── seasons.ts
|
||||
│ │ ├── settings.ts
|
||||
│ │ ├── statistics.ts
|
||||
│ │ └── tmdb.ts
|
||||
│ ├── components/
|
||||
│ │ ├── collections/ # Collection-specific components
|
||||
│ │ │ └── CollectionsGrid.tsx
|
||||
│ │ ├── dashboard/ # Dashboard chart widgets
|
||||
│ │ │ ├── CouchDayChart.tsx
|
||||
│ │ │ ├── LibraryGrowthChart.tsx
|
||||
│ │ │ ├── MediaTypeChart.tsx
|
||||
│ │ │ ├── RatingsChart.tsx
|
||||
│ │ │ ├── TopGenresChart.tsx
|
||||
│ │ │ ├── WatchActivityChart.tsx
|
||||
│ │ │ └── WatchTimeChart.tsx
|
||||
│ │ ├── dialogs/ # Modal dialog components
|
||||
│ │ │ ├── AddEntryToCollectionDialog.tsx
|
||||
│ │ │ ├── CollectionEditDialog.tsx
|
||||
│ │ │ ├── ConfirmDialog.tsx
|
||||
│ │ │ ├── EntryMediaDialog.tsx
|
||||
│ │ │ ├── EntrySeenDialog.tsx
|
||||
│ │ │ ├── EntrySettingsDialog.tsx
|
||||
│ │ │ ├── EpisodeSeenEditDialog.tsx
|
||||
│ │ │ ├── MovieWatchHistoryDialog.tsx
|
||||
│ │ │ └── RatingDialog.tsx
|
||||
│ │ ├── entries/ # Entry display components
|
||||
│ │ │ ├── CastList.tsx
|
||||
│ │ │ ├── EntryCard.tsx
|
||||
│ │ │ ├── EntryLibraryGrid.tsx
|
||||
│ │ │ ├── EpisodeWatchHistory.tsx
|
||||
│ │ │ ├── SeasonsContainer.tsx
|
||||
│ │ │ ├── TrendingGrid.tsx
|
||||
│ │ │ └── TrendingSlider.tsx
|
||||
│ │ ├── layout/ # App shell
|
||||
│ │ │ ├── AppLayout.tsx
|
||||
│ │ │ └── Sidebar.tsx
|
||||
│ │ ├── skeletons/ # Loading placeholders
|
||||
│ │ │ └── PageSkeletons.tsx
|
||||
│ │ └── ui/ # shadcn/ui primitives
|
||||
│ │ ├── avatar.tsx
|
||||
│ │ ├── badge.tsx
|
||||
│ │ ├── button.tsx
|
||||
│ │ ├── calendar.tsx
|
||||
│ │ ├── card.tsx
|
||||
│ │ ├── checkbox.tsx
|
||||
│ │ ├── dialog.tsx
|
||||
│ │ ├── dropdown-menu.tsx
|
||||
│ │ ├── input.tsx
|
||||
│ │ ├── label.tsx
|
||||
│ │ ├── popover.tsx
|
||||
│ │ ├── progress.tsx
|
||||
│ │ ├── scroll-area.tsx
|
||||
│ │ ├── select.tsx
|
||||
│ │ ├── separator.tsx
|
||||
│ │ ├── sheet.tsx
|
||||
│ │ ├── skeleton.tsx
|
||||
│ │ ├── sonner.tsx
|
||||
│ │ ├── switch.tsx
|
||||
│ │ ├── tabs.tsx
|
||||
│ │ ├── textarea.tsx
|
||||
│ │ └── tooltip.tsx
|
||||
│ ├── hooks/ # React Query custom hooks
|
||||
│ │ ├── useCollections.ts
|
||||
│ │ ├── useEntries.ts
|
||||
│ │ ├── useEntrySeen.ts
|
||||
│ │ ├── useEpisodes.ts
|
||||
│ │ ├── useEpisodeSeen.ts
|
||||
│ │ ├── usePeople.ts
|
||||
│ │ ├── useSeasons.ts
|
||||
│ │ ├── useStatistics.ts
|
||||
│ │ └── useTmdb.ts
|
||||
│ ├── lib/ # Shared utilities
|
||||
│ │ ├── api.ts # Axios instance + base URL config
|
||||
│ │ ├── media-utils.ts # Media URL helpers & formatters
|
||||
│ │ ├── normalizers.ts # Backend → frontend data transforms
|
||||
│ │ └── utils.ts # cn() class-name merger
|
||||
│ ├── pages/ # Route-level page components
|
||||
│ │ ├── CalendarPage.tsx
|
||||
│ │ ├── CollectionDetailsPage.tsx
|
||||
│ │ ├── CollectionsPage.tsx
|
||||
│ │ ├── DashboardPage.tsx
|
||||
│ │ ├── DiscoverPage.tsx
|
||||
│ │ ├── EntryDetailsPage.tsx
|
||||
│ │ ├── EpisodePage.tsx
|
||||
│ │ ├── HomePage.tsx
|
||||
│ │ ├── LibraryPage.tsx
|
||||
│ │ ├── MediaPage.tsx
|
||||
│ │ ├── PeoplePage.tsx
|
||||
│ │ ├── PersonDetailsPage.tsx
|
||||
│ │ ├── PersonTmdbRedirectPage.tsx
|
||||
│ │ ├── SeasonPage.tsx
|
||||
│ │ ├── SettingsPage.tsx
|
||||
│ │ └── WatchlistPage.tsx
|
||||
│ ├── stores/ # Zustand state stores
|
||||
│ │ ├── useLibraryStore.ts
|
||||
│ │ └── useThemeStore.ts
|
||||
│ ├── types/
|
||||
│ │ └── index.ts # All TypeScript interfaces
|
||||
│ ├── assets/ # Images & static imports
|
||||
│ ├── App.tsx # App root (QueryClientProvider + Router)
|
||||
│ ├── router.tsx # Route definitions
|
||||
│ ├── main.tsx # Entry point (ReactDOM.createRoot)
|
||||
│ └── index.css # Global styles + theme variables
|
||||
├── components.json # shadcn/ui CLI config
|
||||
├── eslint.config.js
|
||||
├── index.html # Vite HTML entry
|
||||
├── vite.config.ts
|
||||
├── tsconfig.json
|
||||
├── tsconfig.app.json
|
||||
└── tsconfig.node.json
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Conventions
|
||||
|
||||
| Convention | Rule |
|
||||
| ------------- | ------------------------------------------------------------------- |
|
||||
| File naming | PascalCase for components/pages, camelCase for hooks/utils/api |
|
||||
| Exports | Named exports for hooks & utilities; default exports for pages |
|
||||
| Path aliases | `@/` maps to `src/` |
|
||||
| API modules | One file per backend domain, thin wrappers around Axios |
|
||||
| Hooks | One file per domain, wrapping React Query `useQuery`/`useMutation` |
|
||||
| Stores | One Zustand store per concern (`library`, `theme`) |
|
||||
| UI primitives | Copied from shadcn/ui, live in `components/ui/`, customised via CSS |
|
||||
@@ -0,0 +1,55 @@
|
||||
# Routing
|
||||
|
||||
> **Router:** React Router v7 · **Strategy:** Lazy-loaded with Suspense boundaries
|
||||
|
||||
---
|
||||
|
||||
## Route Table
|
||||
|
||||
All routes are wrapped in the `AppLayout` component (sidebar + main content area).
|
||||
|
||||
| Path | Page Component | Description |
|
||||
| ----------------------------------------------------- | ------------------------ | ------------------------------------------ |
|
||||
| `/` | `HomePage` | Hero slider, search, TMDB browse grids |
|
||||
| `/dashboard` | `DashboardPage` | Statistics cards and charts |
|
||||
| `/library` | `LibraryPage` | Filterable / sortable library grid |
|
||||
| `/watchlist` | `WatchlistPage` | Watchlisted entries grid |
|
||||
| `/collections` | `CollectionsPage` | All / Official / Custom collection tabs |
|
||||
| `/collections/:id` | `CollectionDetailsPage` | Single collection with its entries |
|
||||
| `/media` | `MediaPage` | Custom media gallery (posters / backdrops) |
|
||||
| `/calendar` | `CalendarPage` | Monthly episode air-date calendar |
|
||||
| `/discover/:category` | `DiscoverPage` | Paginated TMDB category browse |
|
||||
| `/entry/:id` | `EntryDetailsPage` | Full entry detail (info, cast, seasons) |
|
||||
| `/entry/:entryId/season/:seasonId` | `SeasonPage` | Season detail with episode list |
|
||||
| `/entry/:entryId/season/:seasonId/episode/:episodeId` | `EpisodePage` | Single episode detail |
|
||||
| `/people` | `PeoplePage` | People search / popular people grid |
|
||||
| `/people/tmdb/:tmdbId` | `PersonTmdbRedirectPage` | Fetches person from TMDB → redirects to DB |
|
||||
| `/people/:id` | `PersonDetailsPage` | Person bio + filmography |
|
||||
| `/settings` | `SettingsPage` | Application settings form |
|
||||
|
||||
---
|
||||
|
||||
## Code Splitting
|
||||
|
||||
Each page is imported via `React.lazy()`:
|
||||
|
||||
```tsx
|
||||
const HomePage = lazy(() => import('@/pages/HomePage'));
|
||||
```
|
||||
|
||||
Wrapped in `<Suspense fallback={<PageSkeleton />}>` per route, with skeleton components that match the target page layout.
|
||||
|
||||
---
|
||||
|
||||
## Discover Categories
|
||||
|
||||
The `/discover/:category` route accepts:
|
||||
|
||||
| Category | Description |
|
||||
| ----------- | --------------------- |
|
||||
| `trending` | Trending movies / TV |
|
||||
| `popular` | Popular movies / TV |
|
||||
| `top-rated` | Top-rated movies / TV |
|
||||
| `upcoming` | Upcoming movies only |
|
||||
|
||||
Each category has a Movies / TV tab switcher (except `upcoming` which is movies only).
|
||||
@@ -0,0 +1,83 @@
|
||||
# State Management
|
||||
|
||||
## Stores Overview
|
||||
|
||||
Showy uses **Zustand** for synchronous client-side state and **React Query** for all server-side (async) state. The two layers work together:
|
||||
|
||||
| Store | Scope | Persistence | Purpose |
|
||||
| ----------------- | -------- | -------------- | -------------------------------------------- |
|
||||
| `useLibraryStore` | App-wide | In-memory | Cache of all library entries as a Map |
|
||||
| `useThemeStore` | App-wide | `localStorage` | Light / dark theme preference |
|
||||
| React Query cache | Per-hook | In-memory | Server state caching, refetching, pagination |
|
||||
|
||||
---
|
||||
|
||||
## `useLibraryStore`
|
||||
|
||||
**File:** `src/stores/useLibraryStore.ts`
|
||||
|
||||
Holds the full set of user library entries in a `Map<number, Entry>` for O(1) lookups by ID.
|
||||
|
||||
### State
|
||||
|
||||
| Property | Type | Description |
|
||||
| ---------- | -------------------- | --------------------------------- |
|
||||
| `entries` | `Map<number, Entry>` | All library entries keyed by ID |
|
||||
| `isLoaded` | `boolean` | Whether the initial fetch has run |
|
||||
|
||||
### Actions
|
||||
|
||||
| Action | Signature | Description |
|
||||
| ------------- | -------------------------------------------- | ------------------------------------------------- |
|
||||
| `setEntries` | `(entries: Entry[]) => void` | Batch-replace all entries, mark `isLoaded = true` |
|
||||
| `addEntry` | `(entry: Entry) => void` | Add a single entry (marks it as `isInLibrary`) |
|
||||
| `updateEntry` | `(id: number, data: Partial<Entry>) => void` | Merge-update an existing entry |
|
||||
| `removeEntry` | `(id: number) => void` | Delete an entry from the store |
|
||||
|
||||
### Derived Selector
|
||||
|
||||
```ts
|
||||
useLibraryEntries() // returns Entry[] (array from the Map values)
|
||||
```
|
||||
|
||||
### Usage Pattern
|
||||
|
||||
1. `useLibrary()` hook (in `useEntries.ts`) fetches all entries on mount and calls `setEntries()`.
|
||||
2. Mutation hooks (`useCreateEntry`, `useDeleteEntry`, etc.) update the store immediately on success.
|
||||
3. `EntryCard` and other components read from the store to check `isInLibrary` for TMDB entries.
|
||||
|
||||
---
|
||||
|
||||
## `useThemeStore`
|
||||
|
||||
**File:** `src/stores/useThemeStore.ts`
|
||||
|
||||
Manages the light/dark theme and persists the choice to `localStorage` under the key `showy-theme`.
|
||||
|
||||
### State
|
||||
|
||||
| Property | Type | Description |
|
||||
| -------- | ------------------- | -------------------- |
|
||||
| `theme` | `'dark' \| 'light'` | Current active theme |
|
||||
|
||||
### Actions
|
||||
|
||||
| Action | Description |
|
||||
| ------------- | -------------------------------------------------------- |
|
||||
| `setTheme` | Set theme explicitly and apply the CSS class to `<html>` |
|
||||
| `toggleTheme` | Toggle between dark ↔ light |
|
||||
|
||||
Theme is applied by toggling the `dark` / `light` class on `document.documentElement`, which Tailwind CSS uses for its dark-mode variant.
|
||||
|
||||
---
|
||||
|
||||
## React Query Conventions
|
||||
|
||||
| Convention | Pattern |
|
||||
| -------------------- | ----------------------------------------------------------------------- |
|
||||
| **Query keys** | Domain-scoped arrays: `['entries']`, `['entry', id]`, `['collections']` |
|
||||
| **Stale time** | 2–10 minutes depending on volatility |
|
||||
| **Error handling** | 404 responses return empty arrays/objects as fallback |
|
||||
| **Enabled flag** | Conditional fetching via `enabled: !!id` for dependent queries |
|
||||
| **Infinite queries** | Used for TMDB pagination (trending, popular, search) |
|
||||
| **Invalidation** | Mutations invalidate related query keys on success |
|
||||
@@ -0,0 +1,108 @@
|
||||
# Styling & Theming
|
||||
|
||||
## CSS Architecture
|
||||
|
||||
- **Framework:** Tailwind CSS 4 via `@tailwindcss/vite` plugin
|
||||
- **Colour space:** OKLCH (CSS `oklch()` function)
|
||||
- **Theming:** CSS custom properties on `:root`, switched via `.dark` / `.light` class on `<html>`
|
||||
- **Font:** Geist Variable (loaded locally)
|
||||
- **Border radius:** `0.625rem` (global `--radius` token)
|
||||
|
||||
---
|
||||
|
||||
## Theme Variables
|
||||
|
||||
Defined in `src/index.css` as CSS custom properties. All colours use OKLCH values.
|
||||
|
||||
### Core Tokens
|
||||
|
||||
| Variable | Purpose |
|
||||
| ---------------------- | -------------------------- |
|
||||
| `--background` | Page background |
|
||||
| `--foreground` | Default text colour |
|
||||
| `--card` | Card background |
|
||||
| `--card-foreground` | Card text colour |
|
||||
| `--primary` | Brand / accent colour |
|
||||
| `--primary-foreground` | Text on primary background |
|
||||
| `--secondary` | Secondary surfaces |
|
||||
| `--muted` | Muted backgrounds |
|
||||
| `--muted-foreground` | Muted text |
|
||||
| `--accent` | Interactive accent colour |
|
||||
| `--destructive` | Error / delete actions |
|
||||
| `--border` | Default border colour |
|
||||
| `--input` | Input field border |
|
||||
| `--ring` | Focus ring colour |
|
||||
|
||||
### Chart Tokens
|
||||
|
||||
| Variable | Purpose |
|
||||
| ----------- | -------------- |
|
||||
| `--chart-1` | Chart colour 1 |
|
||||
| `--chart-2` | Chart colour 2 |
|
||||
| `--chart-3` | Chart colour 3 |
|
||||
| `--chart-4` | Chart colour 4 |
|
||||
| `--chart-5` | Chart colour 5 |
|
||||
|
||||
### Sidebar Tokens
|
||||
|
||||
| Variable | Purpose |
|
||||
| ---------------------- | ------------------ |
|
||||
| `--sidebar-background` | Sidebar background |
|
||||
| `--sidebar-foreground` | Sidebar text |
|
||||
| `--sidebar-primary` | Active item text |
|
||||
| `--sidebar-accent` | Active item bg |
|
||||
| `--sidebar-border` | Sidebar border |
|
||||
| `--sidebar-ring` | Sidebar focus ring |
|
||||
|
||||
---
|
||||
|
||||
## Dark / Light Mode
|
||||
|
||||
Theme toggling is managed by `useThemeStore` (Zustand, persisted to `localStorage`).
|
||||
|
||||
The `setTheme` action applies the corresponding class to `document.documentElement`:
|
||||
|
||||
```ts
|
||||
document.documentElement.classList.remove('light', 'dark');
|
||||
document.documentElement.classList.add(theme);
|
||||
```
|
||||
|
||||
Tailwind's `darkMode: 'class'` strategy detects the class and applies `dark:` variants.
|
||||
|
||||
Both `.dark` and `.light` rulesets are defined in `index.css` with different OKLCH values for all tokens.
|
||||
|
||||
---
|
||||
|
||||
## Responsive Breakpoints
|
||||
|
||||
Standard Tailwind defaults:
|
||||
|
||||
| Breakpoint | Min-width | Typical usage |
|
||||
| ---------- | --------- | -------------------- |
|
||||
| `sm` | 640 px | 3-col grids |
|
||||
| `md` | 768 px | 4-col grids, sidebar |
|
||||
| `lg` | 1024 px | 5-col grids |
|
||||
| `xl` | 1280 px | 6-col grids |
|
||||
| `2xl` | 1536 px | 7-col grids |
|
||||
|
||||
---
|
||||
|
||||
## Animation Utilities
|
||||
|
||||
| Class | Effect |
|
||||
| -------------------- | ------------------------------------------ |
|
||||
| `animate-page-enter` | Fade + slide-up on page mount |
|
||||
| `animate-card-enter` | Staggered fade-in for card grids |
|
||||
| `animate-in fade-in` | Generic fade-in with configurable duration |
|
||||
|
||||
Card staggering is achieved via inline `animation-delay` based on the card index.
|
||||
|
||||
---
|
||||
|
||||
## Component Styling (shadcn/ui)
|
||||
|
||||
UI primitives in `src/components/ui/` use:
|
||||
|
||||
- `class-variance-authority` (via shadcn internals) for variant props
|
||||
- `cn()` utility (`src/lib/utils.ts`) = `clsx` + `tailwind-merge` for conflict-free class composition
|
||||
- All colours reference CSS custom property tokens, not hard-coded values
|
||||
@@ -0,0 +1,30 @@
|
||||
# Tech Stack
|
||||
|
||||
| Category | Technology | Version |
|
||||
| --------------------- | --------------------------- | ------- |
|
||||
| **Framework** | React | 19 |
|
||||
| **Build Tool** | Vite | 8 |
|
||||
| **Language** | TypeScript | 5.9 |
|
||||
| **Styling** | Tailwind CSS | 4 |
|
||||
| **Component Library** | shadcn/ui (base-nova style) | — |
|
||||
| **Icons** | Lucide React | 1.7 |
|
||||
| **State Management** | Zustand | 5 |
|
||||
| **Server State** | TanStack React Query | 5 |
|
||||
| **Routing** | React Router | 7 |
|
||||
| **HTTP Client** | Axios | 1.14 |
|
||||
| **Forms** | React Hook Form | 7 |
|
||||
| **Validation** | Zod | 4 |
|
||||
| **Charts** | Recharts | 3.8 |
|
||||
| **Date Utilities** | date-fns | 4 |
|
||||
| **Toasts** | Sonner | 2 |
|
||||
|
||||
---
|
||||
|
||||
## Key Design Decisions
|
||||
|
||||
- **Zustand** for synchronous client state (library cache, theme) — avoids prop drilling and provides instant updates across components.
|
||||
- **React Query** for all server state — handles caching, background refetching, pagination (infinite queries), and mutation invalidation.
|
||||
- **shadcn/ui** — copy-pasted, customizable primitives (not a package dependency). Located in `src/components/ui/`.
|
||||
- **Tailwind CSS 4** — utility-first styling with design tokens defined as CSS custom properties in OKLCH colour space.
|
||||
- **Vite** — fast HMR, native ESM, and simple proxy configuration for the backend API.
|
||||
- **Lazy-loaded pages** via `React.lazy()` + `Suspense` — each page is code-split for faster initial load.
|
||||
Reference in new issue
Block a user