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,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).
|
||||
Reference in new issue
Block a user