usePopcorn is a React-based movie search and watchlist application that allows users to explore movies, track watched films, and view movie statistics. The app leverages the OMDb API to fetch movie data and provides an intuitive interface for movie enthusiasts.
- Movie Search: Quickly search for movies using the OMDb API
- Movie Listing: Display search results with movie posters and basic information
- Watched Movies Tracker:
- Add movies to your watched list
- View detailed statistics about watched movies
- Track personal ratings and movie details
- React
- useState and useEffect Hooks
- OMDb API
- CSS for styling
- Responsive design
- Node.js (v14 or later)
- npm or Yarn
- OMDb API Key
-
Clone the repository
git clone https://github.com/your-username/usepopcorn.git cd usepopcorn -
Install dependencies
npm install
-
Create a
.envfile in the project root and add your OMDb API keyREACT_APP_OMDB_API_KEY=your_api_key_here -
Start the development server
npm start
App.js: Main application componentNavBar: Navigation bar with logo and searchMain: Primary content areaBox: Reusable collapsible containerMovieList: Displays search resultsWatchedMoviesList: Shows watched moviesWatchedSummary: Provides statistics on watched movies
- Real-time movie searching
- Displays number of search results
- Fetches data from OMDb API
- Add movies to watched list
- Calculate average ratings
- Track runtime and personal ratings
The app uses the OMDb API to fetch movie data:
- Endpoint:
http://www.omdbapi.com/ - Fetches movie details based on search query
- Handles loading and error states
Utilizes React's useState and useEffect hooks for:
- Managing movie search results
- Tracking watched movies
- Handling loading and error states
- Graceful error messages for API failures
- Loading indicators during data fetch
- Fallback UI for no search results
- Minimal re-renders using React hooks
- Efficient state management
- Async data fetching with error handling
- Implement movie details view
- Add ability to remove movies from watched list
- Persistent storage (localStorage/database)
- Implement user authentication
- Add more detailed movie filtering
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Distributed under the MIT License. See LICENSE for more information.
Email: andriiwork18@gmail.com
GitHub: @andkcode.