Movie List is a React application that fetches popular movies from the TMDB API, enables users to search for movies, and allows them to add or remove movies from their favorites list. The app uses React Router for navigation and the Context API for managing state, with favorites persisted in localStorage.
- Popular Movies: Fetch and display popular movies.
- Search: Search movies by title.
- Favorites: Add or remove movies from a persistent favorites list.
- Responsive UI: Styled using custom CSS.
- Modern Tooling: Built with React and Vite for fast development.
- Node.js (v14+)
- npm or yarn
-
Clone the repository:
git clone https://github.com/AdnanSattar/movie-list.git cd movie-list
Using npm:
npm install
Or using yarn:OR
Copy
yarn installOpen src/services/Api.js and replace the API key placeholder with your TMDB API key:
const API_KEY = "YOUR_TMDB_API_KEY";npm run devOR
yarn devVisit http://localhost:3000 (or the port specified by Vite) in your browser.
npm run build
npm run previewmovie-list/
├── index.html
├── package.json
└── src
├── main.jsx
├── App.jsx
├── components
│ ├── MovieCard.jsx
│ └── NavBar.jsx
├── contexts
│ └── MovieContext.jsx
├── pages
│ ├── Home.jsx
│ └── Favorites.jsx
├── services
│ └── Api.js
└── css
├── index.css
├── App.css
├── MovieCard.css
├── Navbar.css
├── Home.css
└── Favorites.cssContributions, issues, and feature requests are welcome! Please open an issue or submit a pull request.