A modern, responsive React application that allows users to search and explore movies using the OMDB API. Built with React 18, React Router, and Context API for efficient state management.
- π Real-time Movie Search - Search for movies by title with instant results
- π¬ Movie Grid Display - Browse movies in a beautiful, responsive grid layout
- π Detailed Movie Information - View comprehensive details including plot, cast, ratings, and more
- π¨ Modern UI Design - Clean, premium interface with smooth animations and glassmorphism effects
- π± Fully Responsive - Optimized for all device sizes
- β‘ Custom React Hooks - Utilizes custom
useFetchhook for API calls - π Context API - Centralized state management for seamless data flow
- π Fast Performance - Optimized rendering and efficient data fetching
| Screen | Description |
|---|---|
![]() |
Home Page - Search and browse movies in a responsive grid layout |
![]() |
Movie Details Page - View comprehensive information about selected movies |
- React 18.2.0 - Modern UI library
- React Router DOM v5.2.0 - Client-side routing
- OMDB API - Movie database API
- Context API - State management
- Custom Hooks - Reusable logic with
useFetch - CSS3 - Modern styling with animations and responsive design
-
Clone the repository
git clone <repository-url> cd movie-db
-
Install dependencies
npm install
-
Set up environment variables
Create a
.envfile in the root directory:REACT_APP_MOVIE_API_KEY=your_omdb_api_key_here
-
Start the development server
npm start
The app will open at http://localhost:3000
- Visit OMDB API
- Select the free tier (1,000 daily requests)
- Enter your email address
- Check your email for the API key
- Add the API key to your
.envfile asREACT_APP_MOVIE_API_KEY
Important
Never commit your .env file to version control. Make sure it's listed in .gitignore.
-
Search for Movies
- Enter a movie title in the search bar
- Results update automatically as you type
- The default search shows "Avengers" movies
-
View Movie Details
- Click on any movie card to view detailed information
- See plot summary, cast, director, ratings, and more
- Use the back button to return to search results
-
Navigate
- Home page (
/) - Search and browse movies - Movie details (
/movie/:id) - View individual movie information
- Home page (
movie-db/
βββ public/
β βββ screens/ # Application screenshots
βββ src/
β βββ App.js # Main app component with routing
β βββ Home.js # Home page wrapper
β βββ Movies.js # Movie grid display component
β βββ SearchForm.js # Search input component
β βββ SingleMovie.js # Movie details page
β βββ context.js # Context API setup and provider
β βββ useFetch.js # Custom hook for API calls
β βββ index.js # App entry point
β βββ index.css # Global styles
βββ package.json
- App.js - Sets up routing between home and movie details pages
- context.js - Provides global state (movies, loading, error, query)
- useFetch.js - Custom hook for fetching data from OMDB API
- Movies.js - Renders the movie grid with search results
- SingleMovie.js - Displays detailed information for a selected movie
- SearchForm.js - Handles user input for movie searches
Runs the app in development mode at http://localhost:3000
Builds the app for production to the build folder
Launches the test runner in interactive watch mode
Note: this is a one-way operation. Once you eject, you can't go back!
This application uses the OMDB API for movie data.
Endpoints used:
- Search movies:
/?apikey={key}&s={query} - Get movie details:
/?apikey={key}&i={imdbID}
Contributions are welcome! Please read CONTRIBUTING.md for more details.
Distributed under the MIT License. See LICENSE for more information.
Aadhar Gaur
- OMDb API for the movie data
- Built with β€οΈ using React

