Skip to content

Latest commit

Β 

History

12 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🎬 MovieInfo β€” Movie Search & Discovery

HTML CSS JavaScript API Status

MovieInfo is a browser-based movie search application built with HTML, CSS, and vanilla JavaScript.

It uses the OMDb API to search for movies and dynamically displays movie posters, titles, release years, ratings, genres, runtime, cast information, release dates, and full plot descriptions.

The application provides a simple, responsive interface for quickly discovering movie information without requiring a complex frontend framework.


πŸ“‘ Table of Contents

  • Features
  • Screenshots
  • Live Demo
  • Technologies
  • Project Structure
  • How It Works
  • Movie Search
  • Movie Details
  • API Integration
  • Installation
  • Security Note
  • Future Improvements
  • Contributing
  • License
  • Author
  • Support

✨ Features

βœ… Movie Search

βœ… OMDb API Integration

βœ… Real-Time API Requests

βœ… Movie Poster Display

βœ… Movie Title Display

βœ… Release Year Display

βœ… IMDb Rating

βœ… Genre Information

βœ… Release Date

βœ… Runtime Information

βœ… Cast Information

βœ… Full Plot Description

βœ… Detailed Movie Modal

βœ… Responsive Movie Card Grid

βœ… Hover Animations

βœ… Search Button

βœ… Enter-Key Search

βœ… Missing Poster Fallback

βœ… Error Handling

βœ… Dark Movie-Themed Interface

βœ… Pure Vanilla JavaScript


πŸ“Έ Screenshots

🏠 Movie Search


🎬 Search Results


ℹ️ Movie Details


πŸš€ Live Demo

https://dhruvpandit46.github.io/MovieInfo/


βš™ Technologies Used

  • HTML5
  • CSS3
  • JavaScript (ES6)
  • OMDb API
  • Fetch API
  • REST API
  • DOM Manipulation
  • CSS Grid
  • Responsive Design
  • Browser APIs

πŸ“‚ Project Structure

MovieInfo/
β”‚
β”œβ”€β”€ index.html
β”œβ”€β”€ style.css
β”œβ”€β”€ script.js
β”œβ”€β”€ assets/
β”‚   └── default.jpg
β”œβ”€β”€ images/
└── README.md

⚑ How It Works

MovieInfo follows a simple client-side API workflow:

User
 β”‚
 β–Ό
Search Movie
 β”‚
 β–Ό
JavaScript
 β”‚
 β–Ό
OMDb API
 β”‚
 β–Ό
Movie Search Results
 β”‚
 β–Ό
Movie Cards
 β”‚
 β”œβ”€β”€ Poster
 β”œβ”€β”€ Title
 β”œβ”€β”€ Release Year
 └── More Info
       β”‚
       β–Ό
   Full Movie Details
       β”‚
       β–Ό
     Modal

πŸ”Ž Movie Search

Users can enter a movie name into the search field.

The application sends a request to the OMDb API using the search endpoint:

https://www.omdbapi.com/?apikey=API_KEY&s=MOVIE_NAME

The returned results are dynamically converted into movie cards.

Each card contains:

  • Movie poster
  • Movie title
  • Release year
  • More Info button

🎬 Movie Details

Selecting More Info sends another API request using the movie's IMDb ID.

https://www.omdbapi.com/?apikey=API_KEY&i=IMDB_ID&plot=full

The application then displays detailed information inside a modal.

Details displayed

  • 🎬 Title
  • ⭐ IMDb Rating
  • 🎭 Genre
  • πŸ“… Release Date
  • ⏱ Runtime
  • πŸ‘₯ Actors
  • πŸ“– Full Plot
  • πŸ–Ό Movie Poster

πŸ–Ό Movie Cards

Search results are dynamically generated using JavaScript.

Each result becomes a .movie-card containing:

Movie Card
β”‚
β”œβ”€β”€ Poster
β”œβ”€β”€ Title
β”œβ”€β”€ Release Year
└── More Info

The layout uses CSS Grid to automatically adapt the number of cards displayed according to the available screen width.


πŸ”Œ OMDb API Integration

MovieInfo uses the OMDb API as its external movie data source.

The application performs two primary API operations:

Search

?s=${encodeURIComponent(query)}

Detailed Information

&i=${imdbID}&plot=full

The Fetch API is used to asynchronously retrieve the JSON responses.


⚠️ Error Handling

The application handles several common API and user-input situations.

Empty Search

The application does not send a request when the search field is empty.

No Results

If the API does not return matching movies, the application displays:

No results found for "query".

API / Network Error

If the request fails, the application displays an error message instead of leaving the interface blank.

Missing Poster

When OMDb returns:

Poster: N/A

the application falls back to:

assets/default.jpg

🎨 UI Highlights

  • Dark cinematic interface
  • Cyan accent color
  • Responsive movie grid
  • Movie poster cards
  • Hover scaling animations
  • Detailed information modal
  • Modal background overlay
  • Clean search interface
  • Responsive layout
  • Minimal frontend architecture

πŸ“¦ Installation

Clone the repository:

git clone https://github.com/dhruvpandit46/MovieInfo.git

Go inside the project:

cd MovieInfo

Open:

index.html

in a browser.

No framework or package installation is required.


πŸ”‘ API Configuration

MovieInfo requires an OMDb API key to retrieve movie information.

The current implementation stores the API key inside script.js:

const API_KEY = "YOUR_API_KEY";

Replace it with your own OMDb API key if necessary.

Security Note: API keys embedded in frontend JavaScript are visible to anyone who can inspect the website. For a production application, API requests should be routed through a backend service or serverless function.


🎯 Future Improvements

  • Movie pagination
  • Search suggestions
  • Genre filtering
  • Year filtering
  • IMDb rating filtering
  • Trending movies
  • Popular movies section
  • Movie favorites
  • Watchlist
  • LocalStorage support
  • Search history
  • Dark / light theme
  • Skeleton loading animations
  • Advanced movie sorting
  • Actor information
  • Related movies
  • Trailer integration
  • TMDB integration
  • Backend API proxy
  • Secure API key handling
  • PWA support

🀝 Contributing

Contributions are welcome.

  1. Fork the repository.

  2. Create your feature branch:

git checkout -b feature/new-feature
  1. Commit your changes:
git commit -m "Add new feature"
  1. Push your branch:
git push origin feature/new-feature
  1. Open a Pull Request.

πŸ“œ License

Licensed under the MIT License.

MIT Β© 2026 Dhruv Pandit.

See the LICENSE file for full license details.


πŸ‘¨β€πŸ’» Author

Dhruv Pandit

GitHub

https://github.com/dhruvpandit46

LinkedIn

https://www.linkedin.com/in/dhruv-pandit-755786326

Instagram

https://instagram.com/dhruv_pandit2007


⭐ Support

If you found MovieInfo useful,

please consider giving it a ⭐ on GitHub.

It helps support future development.

About

A responsive movie search web application built with HTML, CSS, and vanilla JavaScript using the OMDb API to search movies, display posters and release years, and view detailed information including ratings, genre, runtime, cast, release date, and plot.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages