A movie app built using React for browsing and discovering movies from a movie database API.
- Search for movies by title
- Browse movies by different genres
- View movie details including synopsis, release date, ratings, and cast
- Mark movies as favorites
- Responsive design for desktop and mobile devices
- React: A popular JavaScript library for building user interfaces
- Axios: A promise-based HTTP client for making API requests
- react-router-dom: A routing library for handling navigation in a React app
- Tailwind CSS: For styling the app
- Clone the repository to your local machine using
git clone
.
git clone https://github.com/siddharth9300/react-movie-app.git
- Navigate to the project directory.
cd react-movie-app
- Install dependencies using
npm
oryarn
.
npm install or yarn install
-
Obtain an API key from a movie database API (e.g., The Movie Database API, IMDb API, etc.).
-
Create a
.env
file in the root of the project and add your API key.
REACT_APP_API_KEY=your_api_key_here
- Start the development server.
npm start
or yarn start
- Open your web browser and go to
http://localhost:3000
to access the app locally.
- Search for movies by title using the search bar at the top of the page.
- Browse movies by different genres using the genre buttons.
- View movie details by clicking on a movie card, which will display additional information about the movie including synopsis, release date, ratings, and cast.
- Mark movies as favorites by clicking the "Add to Favorites" button on a movie details page.
- View your favorite movies on the Favorites page, which can be accessed from the navigation bar.
- Remove movies from favorites by clicking the "Remove from Favorites" button on the Favorites page.
Contributions are welcome! If you would like to contribute to this project, please follow these steps:
- Fork the repository.
- Create a new branch for your feature or bug fix.
- Make your changes and commit them.
- Push your changes to your forked repository.
- Submit a pull request with a detailed description of your changes.