Hessflix is a movie discovery web application built with React, Vite, Redux Toolkit, and React Router. It uses The Movie Database (TMDB) API to let users search for movies, browse trending titles, and open a detailed movie page with metadata and cast information.
This project appears to have been built as a collaborative course project for CS 494, with different team members owning different pages and features.
- Project Overview
- Features
- Tech Stack
- How It Works
- Project Structure
- Routes
- Getting Started
- Environment Variables
- Available Scripts
- TMDB Integration
- State Management
- Styling
- Team Contributions
- Troubleshooting
- Future Improvements
Hessflix provides a simple movie-browsing experience with a few focused workflows:
- A landing page introducing the app
- A movie search page powered by Redux async state
- A trending page that displays popular movies from TMDB
- A movie detail page with poster, backdrop, overview, rating, runtime, release date, and top cast
- A lightweight about page
The application is a client-side React SPA. Routing is handled in the browser, and movie data is fetched directly from TMDB using environment-based credentials.
- Search for movies by title
- View search results in a reusable movie card grid
- Browse currently trending movies
- Open dedicated detail pages for individual movies
- See a movie's:
- title
- tagline
- release date
- release year
- runtime
- rating
- overview
- cast members
- Navigate between pages with a persistent top navigation bar
- Handle loading, empty, and error states on data-driven pages
React 19for UI renderingVite 7for local development and production buildsReact Router DOM 7for client-side routingRedux Toolkitfor search state and async fetchingReact Reduxto connect Redux state to componentsTMDB APIfor movie dataCSSmodules by page/component file naming conventionTailwind CSSpackages are installed, and utility classes are used on the movie detail and cast components
The app starts in src/main.jsx, where the root React tree is wrapped with:
Providerfor Redux store accessBrowserRouterfor route handling
The main application shell is defined in src/App.jsx, which renders the shared navbar and route map.
The search experience is implemented with Redux Toolkit:
- The user types a title into the search form.
- On submit, the page dispatches
setQuery(trimmed)andsearchMovies(trimmed). searchMoviesis an async thunk insrc/store/searchSlice.js.- The thunk requests
TMDB /search/movie. - Redux updates
status,results, anderror. - The
Searchpage renders loading state, error state, no-results state, or a results grid.
The trending page fetches data directly inside the component with useEffect. On mount, it requests TMDB's weekly trending movie endpoint and stores results in local component state.
The movie detail page reads the id route parameter and makes two requests:
GET /movie/{id}for main movie metadataGET /movie/{id}/creditsfor cast information
The page then formats runtime, rating, year, poster, and backdrop information before rendering the detail layout.
final-project-hessflix/
├── public/
├── src/
│ ├── assets/
│ ├── components/
│ │ ├── CastList.jsx
│ │ ├── MovieCard.jsx
│ │ └── Navbar.jsx
│ ├── pages/
│ │ ├── About.jsx
│ │ ├── Home.jsx
│ │ ├── MovieDetail.jsx
│ │ ├── Search.jsx
│ │ └── Trending.jsx
│ ├── store/
│ │ ├── searchSlice.js
│ │ └── store.js
│ ├── App.jsx
│ ├── main.jsx
│ └── index.css
├── index.html
├── package.json
├── vite.config.js
└── README.md
src/App.jsx: top-level route configurationsrc/main.jsx: app entry point with Redux + router providerssrc/store/searchSlice.js: async search logic and reducer statesrc/store/store.js: Redux store setupsrc/components/MovieCard.jsx: reusable movie card UI for listssrc/components/CastList.jsx: cast rendering block on detail pagesrc/components/Navbar.jsx: persistent site navigation
| Route | Page | Description |
|---|---|---|
/ |
Home | Landing page with calls to action |
/search |
Search | Search movies by title |
/trending |
Trending | Browse trending movies from TMDB |
/movie/:id |
Movie Detail | View full details for a selected movie |
/about |
About | Basic project/about information |
git clone <your-repo-url>
cd final-project-hessflixnpm installCreate a .env file in the project root:
VITE_TMDB_API_KEY=your_tmdb_bearer_token_hereImportant: despite the variable name VITE_TMDB_API_KEY, the app code sends it as a Bearer token in the Authorization header. That means this value should match the TMDB read access token format used by the app.
npm run devThen open the local Vite URL shown in your terminal, typically:
http://localhost:5173
| Variable | Required | Description |
|---|---|---|
VITE_TMDB_API_KEY |
Yes | TMDB bearer token used for authorized API requests |
Because this is a Vite app, environment variables that need to be available in client-side code must begin with VITE_.
In package.json:
npm run devstarts the Vite development servernpm run buildcreates a production buildnpm run previewserves the production build locallynpm run lintruns ESLint across the project
The project uses the following TMDB endpoints:
GET /search/movieGET /trending/movie/weekGET /movie/{id}GET /movie/{id}/credits
TMDB image assets are loaded from:
https://image.tmdb.org/t/p/w300for movie cardshttps://image.tmdb.org/t/p/w500for postershttps://image.tmdb.org/t/p/originalfor backdropshttps://image.tmdb.org/t/p/w185for cast profile images
Reference:
Redux is currently used for the search feature.
The search slice tracks:
queryresultsstatuserror
setQuerystores the active search textclearResultsresets results and statesearchMoviesasynchronously fetches movie data from TMDB
This keeps the search page predictable and makes loading/error handling easier to manage.
The project uses a hybrid styling approach:
- Dedicated CSS files for pages and components such as
Home.css,Search.css, andNavbar.css - Utility-style classes on some components, especially the movie detail experience
This means future contributors should check both the component file and its paired stylesheet when updating UI behavior.
From the existing project documentation:
| Member | Area |
|---|---|
| Ryan Doering | Home, Search |
| Hsun-Yu Kuo | Movie Details |
| Bryden Takayama | Trending, About |
Check that:
.envexists in the project rootVITE_TMDB_API_KEYis set- the value is a valid TMDB bearer token
- the dev server was restarted after editing
.env
Possible causes:
- invalid or expired TMDB token
- malformed environment variable
- TMDB API rate limits or temporary downtime
- network restrictions in the current environment
Some TMDB entries do not include poster, backdrop, or profile images. The app already provides fallbacks in several places.
- Add pagination for search results
- Add genre filters and sorting
- Add favorites or watchlist functionality
- Improve mobile responsiveness across all pages
- Standardize styling into a single approach
- Add automated tests for pages and Redux logic
- Add loading skeletons and richer error recovery