Files
Showy/react_frontend
Mohammed AbadandCopilot 4303b33677 feat(electron/frontend) Electron Full Rework
- **Electron Full Rework**: Completely rewrote `electron/main.js` — removed child process spawn, backend now runs in-process via `require()`; frameless window with custom title bar; dual-mode support (dev loads Vite at `:4200`, production loads built files)
- **`electron/preload.js`**: Enhanced contextBridge to expose `windowControls` (minimize/maximize/close) and `isElectron` flag alongside existing `ipcRenderer` bridge
- **`electron/package.json`**: Updated scripts (`start`, `dev`, `build-front` → calls React build), removed duplicated backend dependencies (backend now required in-process), updated electron-builder config with proper `files` and `extraResources`
- **`TitleBar` component**: New `react_frontend/src/components/layout/TitleBar.tsx` — custom frameless window title bar with drag region, app branding, and IPC-powered minimize/maximize/close buttons
- **`AppLayout`**: Conditionally renders `<TitleBar>` when built for Electron (`VITE_ELECTRON=true`); wrapped content in an extra flex container to accommodate title bar height
- **`vite.config.ts`**: Added `VITE_ELECTRON` env detection — sets `base: './'` for correct asset resolution in `file://` context
- **`api.ts`**: Dynamic base URL — uses `http://localhost:4000/api/v1` in Electron mode, `/api/v1` (proxy-relative) otherwise
- **`router.tsx`**: Conditional router factory — uses `createHashRouter` in Electron mode (required for `file://` navigation) and `createBrowserRouter` for web
- **`electron.d.ts`**: Added TypeScript declarations for `window.electron` global (windowControls, ipcRenderer, isElectron)
- **`package.json`**: Added `build:electron` script with `cross-env VITE_ELECTRON=true`; added `cross-env` devDependency
- Updated `Electron.md`

Co-authored-by: Copilot <copilot@github.com>
2026-05-03 02:00:14 +01:00
..

Showy — React Frontend Documentation

Last reviewed: 2026-04-09

Table of Contents

  1. Overview
  2. Tech Stack
  3. Project Structure
  4. Architecture
  5. Routing
  6. State Management
  7. API Layer
  8. Components
  9. Pages
  10. Styling & Theming

Overview

Showy's React frontend is a single-page application for tracking movies and TV series. It communicates with the Showy backend REST API and proxies TMDB discovery requests through it.

Key capabilities:

  • Browse, search, and discover movies & TV series via TMDB
  • Manage a personal media library (add/remove/favourite/watchlist/hide)
  • Track watch history for movies and individual episodes
  • Organize entries into user-defined or TMDB-sourced collections
  • View cast & crew details with filmography
  • Dashboard with watch-time, activity, and rating statistics
  • Calendar view for upcoming episode air dates
  • Manage custom media assets (posters, backdrops, logos)
  • Light / dark theme with persistent preference
  • Responsive design (mobile-first)