A modern, responsive web application built with React that allows users to explore movies and TV shows, manage their favorites, and create watch lists. The application uses The Movie Database (TMDB) API to fetch movie and TV show data.
- Browse popular movies and TV shows
- Search functionality for movies and TV shows
- Filter content by various categories
- Detailed view for each movie/show with expanded information
- Add movies/shows to favorites
- Create and manage watch later list
- React 18 - Frontend library
- TypeScript - Type safety and better developer experience
- Vite - Next generation frontend tooling
- SCSS - For advanced styling
- React Router v6 - For navigation
- Context API - For state management
- TMDB API - For movie and TV show data
Before running this project, you need:
- Node.js (version 14 or higher)
- TMDB API Key (get it from TMDB website)
- Create a
.envfile in the root directory - Add your TMDB API key:
Replace
VITE_TMDB_API_KEY=your_api_key_hereyour_api_key_herewith your actual TMDB API key
-
Clone the repository:
git clone https://github.com/yourusername/react-movies.git
-
Navigate to project directory:
cd react-movies -
Install dependencies:
npm install
-
Start the development server:
npm run dev
react-movies/
├── src/
│ ├── components/ # Reusable components
│ ├── contexts/ # React Context files
│ ├── styles/ # SCSS style files
│ ├── types/ # TypeScript type definitions
│ ├── utils/ # Utility functions
│ ├── App.tsx # Main App component
│ └── main.tsx # Entry point
├── public/ # Static assets
└── index.html # HTML template
This application uses The Movie Database (TMDB) API. To use the application:
- Sign up for a TMDB account at themoviedb.org
- Go to your account settings
- Navigate to the API section
- Request an API key (choose "Developer" option)
- Once you have your API key, add it to the
.envfile as shown in the Environment Setup section
.env file or expose your API key publicly
- Home Page: Displays a grid of popular movies with infinite scroll
- TV Shows: Browse popular TV series
- Search: Search for movies and TV shows using the search bar
- Filters: Filter content by various categories (popularity, rating, etc.)
- Favorites: Save your favorite movies/shows (requires local storage)
- Watch Later: Add movies/shows to your watch list
- Responsive Design: Works on desktop, tablet, and mobile devices
This project is licensed under the MIT License - see the LICENSE file for details
- The Movie Database (TMDB) for providing the API
- All the contributors who have helped with code and suggestions