A simple and elegant React application powered by MobX for searching and displaying movie information. This app integrates with the OMDB and TMDB APIs to fetch detailed data. Users can search for movies, view their details, add them to favorites, and watch trailers.
- Search for movies by title.
- View detailed information about movies.
- Add/remove movies from favorites.
- Play movie trailers.
- Save the last search query in
localStorage
.
- React - A library for building user interfaces.
- MobX - A library for state management in applications.
- Material-UI - A component library for React.
- Axios - An HTTP client for making API requests.
- Clone the repository:
git clone https://github.com/so5tmaker/movie-app.git cd movie-app
- Install the dependencies:
In the project directory, you can run:
npm install
- Create a .env file in the root of the project and add your API keys:
REACT_APP_OMDB_API_KEY=your_omdb_api_key REACT_APP_TMDB_API_KEY=your_tmdb_api_key REACT_APP_TMDB_BEARER_TOKEN=your_tmdb_bearer_token
- Run the application:
npm start
- On the main page, you can enter the movie title in the search field.
- Press Enter to execute the search.
- Select a movie from the list to view its details and trailer.
- Add the movie to favorites by clicking the “Add to Favorites” button.
- In the “Favorites” section, you can view all saved movies.
Make sure you have access to the OMDB and TMDB APIs and replace your_omdb_api_key, your_tmdb_api_key, and your_tmdb_bearer_token in .env with your actual keys.