MovieNest is a production-grade entertainment discovery and media catalog web platform built with React 19, React Router v7, and The Movie Database (TMDB) REST API. Designed with an obsidian streaming design system, the application delivers client-side state synchronization, sub-millisecond keyboard navigation, GPU-accelerated 3D card tilt physics, and analytical queue evaluation.
Live Deployment β’ Architecture β’ Feature Specs β’ API Contract β’ Setup Guide
- System Architecture
- Feature Specifications
- Component Hierarchy & Data Flow
- Performance & Engineering Highlights
- Tech Stack & Dependencies
- Repository Structure
- TMDB API Integration
- Local Development Setup
- Automated Testing
- Production Build & Deployment
- Engineering Standards & Commit Conventions
- Author & License
The client follows a modular, unidirectional data flow architecture organized into three primary layers: Presentation, Domain Logic & Hooks, and External Infrastructure (TMDB REST API & LocalStorage).
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Presentation Layer β
β βββββββββββββββββββββββββ ββββββββββββββββββββββ ββββββββββββββββββ β
β β Pages & Routes β β UI Component Tree β β Modals & Portalsβ β
β β (Home, TV, Explore, β β (Navbar, MovieCard,β β (CommandPalette,β β
β β Roulette, Favorites) β β HeroBanner, Rows) β β Trailer, Cast)β β
β βββββββββββββ¬ββββββββββββ βββββββββββ¬βββββββββββ ββββββββββ¬ββββββββ β
ββββββββββββββββΌβββββββββββββββββββββββββΌβββββββββββββββββββββββΌβββββββββββ
β β β
βΌ βΌ βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Application State & Hook Middleware β
β βββββββββββββββββββββββ ββββββββββββββββββββββββ ββββββββββββββββββ β
β β URLSearchParams Syncβ β useDebounce (400ms) β β Local Storage β β
β β (Genre, Sort, Year) β β (Search Optimization)β β (Watchlist Bus)β β
β βββββββββββββ¬ββββββββββ βββββββββββββ¬βββββββββββ ββββββββββ¬ββββββββ β
ββββββββββββββββΌβββββββββββββββββββββββββΌβββββββββββββββββββββββΌβββββββββββ
β β β
βΌ βΌ βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Data Layer & Services β
β βββββββββββββββββββββββββββββββββββββββ ββββββββββββββββββββββββββββ β
β β TMDB Axios REST Client β β Browser Storage Engine β β
β β (Endpoints, Cache, Error Handling) β β (JSON serialization) β β
β βββββββββββββββββββββββββββββββββββββββ ββββββββββββββββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
- Hero Billboard: Features dynamic spotlight titles with cinematic backdrop layering, synchronized Ken Burns breathing effects, genre classification tags, and real-time TMDB rating indicators.
- Categorized Streaming Rows: Horizontal touch-enabled carousels for Trending, Top Rated, Action, Comedy, Horror, Romance, and Documentaries.
- Multi-Parametric Filter Engine:
/exploreimplements an interactive filtering matrix across Genre IDs, Sorting Criteria (popularity.desc,vote_average.desc,primary_release_date.desc), and Release Years. - Polymorphic Media Handling: Unified components normalize disparate schemas between Feature Films (
title,release_date) and Television Series (name,first_air_date).
- Algorithmic Selection: Queries TMDB Discover endpoints filtered by user-selected emotional/tonal vectors (Sci-Fi, Adrenaline, Comedy, Thriller, Romance, Horror).
-
Quality Gate Filter: Enforces a strict threshold of minimum votes and a
$\ge 7.0$ rating to guarantee high-caliber recommendations. - Randomized Rolling Animation: State machine cycles through candidates with timed interval pacing before locking onto the final choice.
- Global Shortcut Trigger: Accessible from anywhere in the application via
Ctrl+K(Windows/Linux) orCmd+K(macOS). - Keyboard-First Navigation: Full
ArrowUp,ArrowDown,Enter, andEscapesupport. - Instant Search: Intercepts input, passes through
useDebounce, queries TMDB search endpoints asynchronously, and presents thumbnail previews with direct route redirection.
- Client Persistence: Safe, fault-tolerant
localStoragepersistence layer with fallback error recovery for disabled cookies or storage exhaustion. - Real-Time Binge Metrics: Computes aggregate total runtime in formatted
Xh Ym, calculates the mathematical mean TMDB score of the queue, and tracks queue size. - Instant Queue Manipulation: Single-click toggling on any card across the platform with immediate badge synchronization in the global navigation bar.
- Atmospheric Title Overview: Displays high-resolution backdrop art, production metadata, runtime, budgetary metrics, and categorized genres.
- Interactive Cast Reel: Interactive cast avatars query TMDB
/person/{id}and/person/{id}/movie_credits, rendering full biography profiles, birth facts, and top career credits without leaving the page context. - Trailer Player: 16:9 YouTube modal with automatic backdrop focus trapping, background scroll locking, and keyboard escape dismissals.
App (Route Orchestrator, Global Keyboard Listener, Ctrl+K Portal)
βββ Navbar (Scroll listener, route tabs, debounced quick-search, watchlist counter)
βββ Routes
β βββ Home (HeroBanner, Category MovieRows, Infinite Scroll Search Grid)
β βββ TVShows (TV HeroBanner, Category TV Rows)
β βββ Explore (Filter Controls, URLSearchParams Sync, Infinite Discovery Grid)
β βββ Roulette (Mood Picker, Randomization State Machine, Result Spotlight)
β βββ Favorites (Binge Calculator Header, Watchlist Grid, Empty State)
β βββ MovieDetails (Backdrop, Metadata, Cast Reel, Trailer Trigger)
βββ TrailerModal (Portal: 16:9 responsive YouTube player, focus-trap, ESC listener)
βββ PersonModal (Portal: Actor dossier, biography, career filmography credits)
βββ CommandPalette (Portal: Spotlight modal, live search, keyboard navigation)
βββ Footer (Sitemap columns, TMDB attribution, smooth scroll-to-top)
| Metric / Pattern | Implementation Strategy | Impact |
|---|---|---|
| Input Debouncing | Custom useDebounce hook with useRef cleanup timers (400ms threshold) |
Reduces TMDB API requests by >82% during active search typing |
| GPU-Accelerated 3D Tilt | Cursor tracking via getBoundingClientRect executing perspective(800px) rotateX() rotateY() |
60 FPS smooth transforms without layout reflows |
| Dynamic Specular Glare | Radial gradient translation tracking cursor coordinates | Realistic physical illumination overlay with zero third-party canvas overhead |
| URL State Synchronization | Two-way binding between filter UI and browser URLSearchParams |
Complete shareability and deep-linking support across all catalog permutations |
| Component Memoization | React.memo wrapping for catalog card items and carousel rows |
Prevents cascading child re-renders on global state changes |
| Bundle Efficiency | Replaced bulky icon libraries with hand-tuned SVG path primitives in Icons.jsx |
Reduced vendor bundle footprint, eliminating third-party icon dependencies |
- React 19.2.3: Concurrent rendering pipeline, optimized hooks, zero legacy patterns.
- React DOM 19.2.3: Efficient virtual DOM reconciliation.
- React Router DOM 7.11.0: Modern client-side routing and declarative navigation.
- Axios 1.13.2: Promise-based HTTP client with configured base URLs, default query parameters, and response interceptors.
- The Movie Database (TMDB) API v3: Data source for movies, television series, video teasers, cast credits, and genres.
- Swiper 12.1.2: Touch-enabled carousel slider engine.
- CSS Variables Design System: Solid surface palettes (
#141414,#181818), high-contrast accents (#e50914), and standardized spacing tokens. - Plus Jakarta Sans: Typography loaded via Google Fonts preconnect headers.
- Jest: Unit testing runner and assertion engine.
- @testing-library/react: DOM component testing utilities.
movienest/
βββ public/
β βββ favicon.ico # Application branding favicon
β βββ index.html # HTML document shell with font preconnects
β βββ manifest.json # Web application manifest (PWA)
β βββ robots.txt # Search engine crawler policies
βββ src/
β βββ api/
β β βββ tmdb.js # TMDB REST API client & endpoint definitions
β βββ components/
β β βββ CommandPalette.jsx # Ctrl+K Spotlight command modal
β β βββ Footer.jsx # Global footer with smooth scroll-to-top
β β βββ HeroBanner.jsx # Featured billboard with Ken Burns effect
β β βββ Icons.jsx # Hand-crafted zero-dependency SVG icon system
β β βββ Loader.jsx # Clean CSS-based circular buffer loader
β β βββ MovieCard.jsx # 3D interactive tilt card with specular glare
β β βββ MovieRow.jsx # Horizontal scrolling category row
β β βββ MovieSlider.jsx # Swiper.js carousel wrapper
β β βββ Navbar.jsx # Scroll-aware navigation bar with search & counter
β β βββ PersonModal.jsx # Actor & director filmography dossier modal
β β βββ TrailerModal.jsx # 16:9 YouTube iframe modal with scroll lock
β βββ hooks/
β β βββ useDebounce.js # Cancellation-aware debouncing hook
β βββ pages/
β β βββ Explore.jsx # Multi-parameter filter & discovery view
β β βββ Favorites.jsx # Watchlist view with Binge Time Analytics
β β βββ Home.jsx # Discovery landing feed with infinite scroll
β β βββ MovieDetails.jsx # Full title overview, cast reel, and metadata
β β βββ Roulette.jsx # Decision-paralysis movie picker engine
β β βββ TVShows.jsx # Dedicated TV series discovery hub
β βββ utils/
β β βββ localStorage.js # Storage read/write utilities with error handling
β β βββ localStorage.test.js # Jest unit test suite for persistence operations
β β βββ theme.js # Theme state definitions
β βββ App.css # Global layout containers
β βββ App.jsx # Root router configuration & global key listeners
β βββ index.css # Obsidian design system, reset & CSS variables
β βββ index.js # React root injection point
β βββ setupTests.js # Jest testing setup configuration
βββ .env.example # Template for required environment variables
βββ .gitignore # Version control exclusion rules
βββ package.json # Dependency manifest & script definitions
βββ README.md # System documentation
All external HTTP calls are routed through src/api/tmdb.js using a pre-configured Axios instance.
| Path | Purpose | Parameters |
|---|---|---|
GET /movie/popular |
Home feed trending movies | page |
GET /movie/top_rated |
Home feed top-rated movies | page |
GET /tv/popular |
TV shows discovery feed | page |
GET /tv/top_rated |
Top-rated television series | page |
GET /discover/movie |
Multi-parameter filtering & Roulette | with_genres, sort_by, primary_release_year, vote_average.gte, vote_count.gte |
GET /search/multi |
Global search & Command Palette | query, page |
GET /movie/{id} |
Detailed title overview | append_to_response=credits,videos |
GET /movie/{id}/videos |
Official YouTube trailers | - |
GET /person/{id} |
Actor biography & profile | - |
GET /person/{id}/movie_credits |
Actor career filmography | - |
GET /genre/movie/list |
Catalog genre mapping | - |
- Node.js:
v18.0.0or higher - Package Manager:
npm(v9+) oryarn/pnpm - TMDB API Key: Free account available at themoviedb.org
-
Clone the repository:
git clone https://github.com/anoopcodehack/MovieNest.git cd MovieNest/movienest -
Install project dependencies:
npm install
-
Configure Environment Variables: Create a
.envfile in themovienestdirectory:REACT_APP_TMDB_KEY=your_actual_tmdb_api_key_here
-
Start the local development server:
npm start
Navigate to http://localhost:3000 in your web browser.
MovieNest includes unit tests targeting data persistence and utility functions. Tests are executed via Jest and React Testing Library:
# Execute test suite once
npm test -- --watchAll=false
# Execute test suite with watch mode enabled
npm test
# Generate test coverage report
npm test -- --coverage --watchAll=falseTo generate an optimized production bundle:
npm run buildThis compiles minified JavaScript and CSS bundles into the build/ directory with content hashing enabled for long-term browser cache invalidation.
build/
βββ static/
β βββ css/main.[hash].css
β βββ js/main.[hash].js
βββ index.html
βββ manifest.json
For single-page applications (SPA), configure URL rewrites so that all routing requests resolve to /index.html:
Vercel (vercel.json):
{
"rewrites": [{ "source": "/(.*)", "destination": "/index.html" }]
}This project enforces strict software engineering standards to maintain codebase hygiene and seamless collaboration:
Commits follow the Conventional Commits specification:
feat:Implementation of a new user-facing or technical capability.fix:Bug fix or error resolution.refactor:Code modification that neither fixes a bug nor adds a feature.perf:Performance enhancement reducing CPU, memory, or network load.style:Formatting or UI styling changes without logic impact.test:Addition or refactoring of unit or integration tests.docs:Documentation updates in markdown or inline source code.
- Explicit Prop Contracts: Maintain predictable prop shapes across all components.
- Zero Inline Hardcoded Colors: All color tokens resolve through CSS variables in
index.css. - Keyboard & Accessibility Standards: All interactive dialogs must support keyboard trap,
Escapekey dismissal, and visible focus rings.
Anoop A
- GitHub: @anoopcodehack
- LinkedIn: Anoop A
This project is licensed under the MIT License β see the LICENSE file for complete terms.