$ show RaunoT/plex-rewind
Plex Rewind is a Next.js web application that provides a personalized year-in-review (Rewind), a real-time activity monitor, and a configurable dashboard for Plex media servers. It ingests data from Tautulli (play history, library stats), Overseerr (content requests), and TMDB (posters, ratings), and authenticates users via Plex OAuth through NextAuth. The architecture is a monolith with server-side rendering, API routes, and a middleware layer that enforces setup requirements and access control. Settings are persisted to a local JSON file. The application supports PWA installation, multi-language i18n (English, Estonian, French, German), and is fully containerized with Docker. The codebase demonstrates strong engineering practices: strict TypeScript, server actions for form handling, React Server Components, motion animations, and a well-organized component hierarchy. It is actively maintained with semantic release automation and CI/CD pipelines.
The LLM identified 4 files worth highlighting for reuse:
A collection of pure utility functions for formatting durations, file sizes, bitrates, and ETA calculations. Each function is well-documented, handles edge cases (zero values, NaN, missing data), and accepts a translation function for i18n. The `secondsToTime` function intelligently selects up to two time units and rounds minutes. These functions are self-contained and could be extracted into a standalone formatting library with minimal adaptation.
A React hook that implements a countdown timer with pause/resume support and a callback on completion. It uses `useRef` to avoid stale closures and cleans up intervals properly. The hook is generic and could be reused in any React project requiring timed transitions or countdowns.
A responsive bar chart component built with motion (Framer Motion) that animates bars on mount. It computes a 'nice' scale with evenly spaced ticks, handles dense label layouts by clamping edge labels to prevent clipping, and highlights the peak bar with a distinct gradient. The component is self-contained (only depends on motion and clsx) and could be reused in any React application needing a simple animated bar chart.
A story/carousel component that displays a sequence of components with automatic progress, manual navigation (tap left/right, keyboard arrows), and hold-to-pause. It features a segmented progress bar at the top, smooth transitions, and accessibility labels. The component is generic and could be extracted as a reusable story/carousel pattern for any content-driven UI.