How karafiziartur/the-movie-db-redux works
Project type and purpose
• This is a client‐side, single‐page web application built with Create React App, using React for views, Redux for state management and React-Router-Redux for routing.
• It fetches movie data from the external TheMovieDB API and uses Firebase for user authentication (and potentially user‐specific data such as favorites).
• The deployment target is static hosting (via create-react-app-buildpack), so there’s no custom backend server code in this repo.
File structure
• Top-level:
• public/index.html (hosted entry point)
• src/
– components/ (pure, presentational React components, each with its CSS)
– containers/ (“smart” components wired to Redux and side-effects, e.g. LoginModal, PopularMoviesPageContainer)
– actions/ (Redux action creators for movies, genres, user)
– reducers/ (Redux reducers: moviesReducer, genresReducer, userReducer, combined in index.js)
– store/ (store configuration: apply middleware, create Redux store)
– routes/ (React-Router route definitions)
– config/ (third-party API configurations: Firebase & TMDB)
– helpers/ (utility functions: API wrappers, data massaging)
– index.js & App.js (bootstrapping React, connecting Redux, mounting Router)
• Notice the Flux/Redux pattern: unidirectional data flow from actions → reducers → store → view.
• There are no backend source files: integration with external services happens via client‐side HTTP calls.
Key architecture notes from README
• Uses React, Redux, React-Router-Redux for client routing and state, Material-UI for styling.
• TMDB API key and Firebase config are injected via src/config.
• Deployment is static—no Node/Express or custom server code.
• User click → Action dispatch
• Action → API Call
• API Response → Reducer → Store → UI update
• React layers (light blue)
• Redux layers (light green)
• External services (orange)