Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/pintu544/moviesearchapp

A simple, responsive web application to search and view details of movies using the OMDB API. This app allows users to see a list of popular movies by default, search for movies dynamically with suggestions as they type, and view detailed information about a selected movie in a modal.
https://github.com/pintu544/moviesearchapp

mui omdb-api react

Last synced: 6 days ago
JSON representation

A simple, responsive web application to search and view details of movies using the OMDB API. This app allows users to see a list of popular movies by default, search for movies dynamically with suggestions as they type, and view detailed information about a selected movie in a modal.

Awesome Lists containing this project

README

        



Movie Search App


A simple, responsive web application to search and view details of movies using the OMDB API. This app allows users to see a list of popular movies by default, search for movies dynamically with suggestions as they type, and view detailed information about a selected movie in a modal.




Features




  • Search Movies: Type in the search bar to see live suggestions.


  • Popular Movies: Displays a default list of popular movies.


  • Movie Details: Click on a movie to view detailed information such as plot, genre, year, and IMDb rating in a modal.


  • Responsive Design: Optimized for all screen sizes.


  • Clean and Modern UI: Styled using Material-UI (MUI).




Demo


https://moviesappomdb.netlify.app/




Technologies Used




  • React.js: Frontend framework.


  • Material-UI (MUI): For styling components and ensuring responsiveness.


  • OMDB API: External API for movie data.


  • Axios: For API requests.


  • Environment Variables: To securely store the API key.




Installation and Setup




  1. Clone the repository:


    bash




git clone https://github.com/pintu544/MovieSearchApp/ cd MovieSearchApp




  1. Install dependencies:


    bash


    
    
    npm install



  2. Create a .env file in the root directory and add your OMDB API key:


    env


    REACT_APP_OMDB_API_KEY=your_api_key_here




  3. Start the development server:


    bash


    npm start




  4. Open the app in your browser at http://localhost:5173.






How to Use



  1. Launch the app.

  2. Use the search bar to find a movie. Suggestions will appear dynamically as you type.

  3. Click on a movie title from the suggestions or the popular movies list to view its details in a modal.

  4. Use the close button in the modal to exit the details view.




File Structure


scss


Copy code


src/ ├── pages/ │ ├── MovieDetailsModal.js // Component for the movie details modal ├── App.js // Main application logic ├── Main.js // Entry point └── .env // Environment variables (not included in repo)




Assumptions



  • Popular movies are hardcoded with specific IMDb IDs (tt0111161, tt0068646, tt0071562) for demonstration purposes.

  • The OMDB API is free-tier and has limited request rates.




Future Enhancements



  • Add pagination for search results.

  • Support switching between different movie databases.

  • Add user authentication for personalized features.

  • Implement dark mode for the app.




Acknowledgments




  • OMDB API for providing the movie data.


  • Material-UI for the design components.


Enjoy the app! 🎥🍿