Files
Showy/react_frontend/docs/project_structure.md
Mohammed Abad d28b4caa7e 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
2026-04-10 02:44:06 +01:00

6.3 KiB

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