How johanssonjacob/movie-list works
Kvällens film is a React movie-discovery app. Users browse popular films or search TMDb, open a film’s details and trailer, then optionally save it with a 1–5 hype rating and note; the watchlist supports search and sorting. Routing, page-level orchestration, fetch logic, TMDb access, reusable UI, and persistent shared watchlist state form the main layers. The map follows README capabilities and indexed imports; unsampled component internals are not inferred beyond those references.
Main entry points: App.jsx Route shell · HomePage.jsx Browse movies · MovieDetailPage.jsx Movie details · WatchlistPage.jsx My list
Components 19
App and pages
- Route shell
src/App.jsx - Browse movies
src/pages/HomePage.jsx - Movie details
src/pages/MovieDetailPage.jsx - My list
src/pages/WatchlistPage.jsx - Navigation bar
src/components/Navbar.jsx
Movie discovery
- Movie card
src/components/MovieCard.jsx - Search field
src/components/SearchBar.jsx - Pagination
src/components/Pagination.jsx - Fetch state
src/hooks/useFetch.js - Movie query hook
src/hooks/useMovies.js - Trailer action
src/components/TrailerButton.jsx
Watchlist state
- Save movie form
src/components/WatchlistButton.jsx - Watchlist hook
src/hooks/useWatchlist.js - Watchlist provider
src/context/WatchlistContext.jsx - Watchlist context
src/context/watchlist-context.js - Local storage
src/hooks/useLocalStorage.js
TMDb integration
- TMDb client
src/services/tmdb.js - TMDb API
Other components
- Viewer
Connections 26
- Viewer → Route shell: opens
README.md - Route shell → Browse movies: routes to
src/App.jsx - Route shell → Movie details: routes to
src/App.jsx - Route shell → My list: routes to
src/App.jsx - Route shell → Watchlist provider: wraps
src/App.jsx - Route shell → Navigation bar: renders
src/App.jsx - Browse movies → Movie query hook: queries via
src/pages/HomePage.jsx - Browse movies → Search field: renders
src/pages/HomePage.jsx - Browse movies → Movie card: renders
src/pages/HomePage.jsx - Browse movies → Pagination: renders
src/pages/HomePage.jsx - Movie query hook → Fetch state: loads through
src/hooks/useMovies.js - Movie query hook → TMDb client: requests movies
src/hooks/useMovies.js - Movie details → Fetch state: loads through
src/pages/MovieDetailPage.jsx - Movie details → TMDb client: requests details
src/pages/MovieDetailPage.jsx - Movie details → Trailer action: renders
src/pages/MovieDetailPage.jsx - Movie details → Save movie form: renders
src/pages/MovieDetailPage.jsx - Trailer action → TMDb client: requests videos
src/components/TrailerButton.jsx - My list → Watchlist hook: reads list
src/pages/WatchlistPage.jsx - My list → Search field: renders
src/pages/WatchlistPage.jsx - My list → Movie card: renders
src/pages/WatchlistPage.jsx - My list → Pagination: renders
src/pages/WatchlistPage.jsx - Save movie form → Watchlist hook: updates list
src/components/WatchlistButton.jsx - Watchlist hook → Watchlist context: reads context
src/hooks/useWatchlist.js - Watchlist provider → Watchlist context: provides state
src/context/WatchlistContext.jsx - Watchlist provider → Local storage: persists state
src/context/WatchlistContext.jsx - TMDb client → TMDb API: calls
src/services/tmdb.js