33 lines
1.1 KiB
Markdown
33 lines
1.1 KiB
Markdown
# Frontend
|
|
|
|
## Overview
|
|
|
|
React 18 + TypeScript SPA built with Vite. Uses shadcn/ui for components, TanStack Query for server state, Zustand for client state, and Recharts for charts.
|
|
|
|
## Key Patterns
|
|
|
|
- **State Management**: `useLibraryStore` (Zustand) holds all entries; TanStack Query for server data
|
|
- **Forms**: react-hook-form + zod for validation
|
|
- **Routing**: React Router v6 with nested routes
|
|
- **Styling**: Tailwind CSS + shadcn/ui components
|
|
|
|
## Important Pages
|
|
|
|
- **Dashboard** — [[Statistics]] charts (CouchDayChart, LibraryGrowthChart)
|
|
- **Entry Details** — Entry info, seasons list, watch history
|
|
- **[[SeasonPage]]** — Season episodes with watch progress
|
|
- **[[EpisodePage]]** — Episode details with prev/next navigation
|
|
- **[[Settings Page]]** — App config + maintenance cleanup
|
|
|
|
## Navigation
|
|
|
|
See [[Navigation]] for breadcrumb patterns.
|
|
|
|
## API Clients
|
|
|
|
Located in `react_frontend/src/api/`:
|
|
- `settings.ts` — Settings CRUD
|
|
- `maintenance.ts` — Orphan file/record scan and cleanup
|
|
- `seasons.ts` — Season and episode data
|
|
- `entries.ts` — Entry CRUD
|