The React Movie App is a web application that allows users to browse movies, search by title, and filter by genres using The Movie Database (TMDb) API. This app demonstrates the use of modern React features, such as hooks, React Router for navigation, and dynamic data fetching.
- Popular Movies: Displays a list of popular movies fetched from the TMDb API.
- Search Functionality: Allows users to search for movies by title.
- Genre Filtering: Users can browse movies by genres, with the option to filter results.
- Responsive Design: Fully responsive interface, optimized for both desktop and mobile devices.
- Authentication: Users can sign up and log in using Firebase Authentication.
Select a genre to see movies of that category.
Follow the steps below to set up the project locally:
- Node.js (v16 or later)
- npm or yarn
- TMDb API key
-
Clone the repository:
git clone https://github.com/Git-abby/react-movie.git
-
Navigate to the project directory:
cd react-movie/frontend
-
Install dependencies:
npm install
-
Create a
.env
file in thefrontend
directory and add the following environment variables:REACT_APP_API_KEY=your_tmdb_api_key REACT_APP_AUTH_DOMAIN=your_firebase_auth_domain REACT_APP_PROJECT_ID=your_firebase_project_id
-
Start the development server:
npm start
-
Open your browser and navigate to
http://localhost:3000
.
The app is deployed using Vercel. To deploy your own version:
-
Install the Vercel CLI:
npm install -g vercel
-
Run the deployment command:
vercel
-
Follow the CLI prompts to complete the deployment.
react-movie/
├── frontend/
│ ├── public/ # Static assets
│ ├── src/
│ │ ├── components/ # Reusable UI components
│ │ ├── css/ # Custom stylesheets
│ │ ├── pages/ # Page components (Home, Login, SignUp, GenreMovies)
│ │ ├── App.jsx # Main app component
│ │ ├── index.js # Entry point
│ ├── package.json
├── .gitignore
├── README.md
- Base URL:
https://api.themoviedb.org/3
- Endpoints:
/movie/popular
- Fetch popular movies/search/movie
- Search movies by query/genre/movie/list
- Get a list of movie genres/discover/movie
- Get movies by genre
- Used for user signup and login functionality.
Contributions are welcome! To contribute:
- Fork the repository.
- Create a new branch:
git checkout -b feature-name
- Make your changes and commit them:
git commit -m "Add some feature"
- Push to the branch:
git push origin feature-name
- Open a pull request.
This project is licensed under the MIT License.
- TMDb API for providing movie data.
- Firebase for authentication.
- React, Vite, and TailwindCSS for powering the frontend.
Developed by Git-abby.