Skip to content

Latest commit

ย 

History

16 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŽฌ CineVault

A modern movie discovery application built with React, JavaScript, Tailwind CSS, Vite, and the OMDb API.

CineVault is a responsive single-page movie discovery application designed to provide a smooth and interactive way to explore movies, search for titles, view movie details, manage a personal watchlist, and compare movies with a rule-based recommendation system.


โœจ Features

  • ๐Ÿ” Movie Search โ€” Search for movies using the OMDb API.
  • ๐ŸŽฌ Movie Details โ€” View detailed information about selected movies.
  • โค๏ธ Watchlist โ€” Add and remove movies from your personal watchlist.
  • โš–๏ธ Movie Comparison โ€” Select movies and compare their details.
  • ๐Ÿค– Smart Recommendation โ€” Rule-based recommendation system that evaluates selected movies and suggests one based on available movie attributes.
  • ๐ŸŽž๏ธ Genre Browsing โ€” Explore movies through genre-based categories.
  • ๐ŸŒ™ Dark / Light Mode โ€” Switch between dark and light themes.
  • โšก API Caching โ€” Cache movie detail responses to reduce unnecessary API requests.
  • โŒจ๏ธ Debounced Search โ€” Reduce unnecessary API calls while typing search queries.
  • โณ Loading States โ€” Skeleton loading UI while data is being fetched.
  • โŒ Error Handling โ€” User-friendly error states when requests fail.
  • ๐Ÿ“ญ Empty States โ€” Clear feedback when no results are available.
  • โœจ Interactive Animations โ€” Smooth transitions and UI interactions.
  • ๐Ÿ“ฑ Responsive UI โ€” Designed to work across different screen sizes.

๐Ÿ› ๏ธ Tech Stack

Technology Purpose
React Component-based user interface
JavaScript Application logic
Vite Development and build tooling
Tailwind CSS Styling and responsive design
OMDb API Movie data and information

๐Ÿง  Key Technical Concepts

Component-Based Architecture

CineVault is divided into reusable React components to keep the application modular and maintainable.

Examples include:

  • Navbar
  • Hero
  • MovieCard
  • MovieSection
  • SearchBar
  • MovieModal
  • CompareModal
  • GenreChips
  • Loading
  • ErrorMessage
  • EmptyState
  • Footer

React State Management

React state is used to manage application data and UI interactions such as:

  • Search queries
  • Search results
  • Selected movies
  • Watchlist
  • Comparison list
  • Theme
  • Loading state
  • Error state
  • Modal visibility

API Integration

Movie information is retrieved dynamically from the OMDb API instead of relying only on static movie data.

Asynchronous JavaScript

The application handles asynchronous API operations using concepts such as:

  • async / await
  • Promises
  • Promise.all()
  • Error handling

Debouncing

Search input is debounced so that API requests are not sent for every keystroke.

This reduces unnecessary network requests and improves the search experience.

API Response Caching

Movie detail responses are cached using an in-memory JavaScript Map.

When cached information is available, the application can reuse it instead of requesting the same movie data again.

Conditional Rendering

The interface responds to different application states:

User Action
     โ†“
Loading
     โ†“
 โ”Œโ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”
 โ†“        โ†“
Success  Error
 โ†“
Display Data
     โ†“
If no results
     โ†“
Empty State

Responsive Design

Tailwind CSS utility classes are used to create a responsive interface that adapts to different screen sizes.


๐Ÿ“‚ Project Structure

CineVault/
โ”‚
โ”œโ”€โ”€ public/
โ”‚
โ”œโ”€โ”€ src/
โ”‚   โ”‚
โ”‚   โ”œโ”€โ”€ components/
โ”‚   โ”‚   โ”œโ”€โ”€ Navbar/
โ”‚   โ”‚   โ”œโ”€โ”€ Hero/
โ”‚   โ”‚   โ”œโ”€โ”€ MovieCard/
โ”‚   โ”‚   โ”œโ”€โ”€ MovieSection/
โ”‚   โ”‚   โ”œโ”€โ”€ ComingSoonCard/
โ”‚   โ”‚   โ”œโ”€โ”€ GenreChips/
โ”‚   โ”‚   โ”œโ”€โ”€ SearchBar/
โ”‚   โ”‚   โ”œโ”€โ”€ MovieModal/
โ”‚   โ”‚   โ”œโ”€โ”€ CompareModal/
โ”‚   โ”‚   โ”œโ”€โ”€ Loading/
โ”‚   โ”‚   โ”œโ”€โ”€ ErrorMessage/
โ”‚   โ”‚   โ”œโ”€โ”€ EmptyState/
โ”‚   โ”‚   โ””โ”€โ”€ Footer/
โ”‚   โ”‚
โ”‚   โ”œโ”€โ”€ services/
โ”‚   โ”‚   โ””โ”€โ”€ omdbApi.js
โ”‚   โ”‚
โ”‚   โ”œโ”€โ”€ data/
โ”‚   โ”‚
โ”‚   โ”œโ”€โ”€ App.jsx
โ”‚   โ”œโ”€โ”€ main.jsx
โ”‚   โ””โ”€โ”€ index.css
โ”‚
โ”œโ”€โ”€ .env.example
โ”œโ”€โ”€ .gitignore
โ”œโ”€โ”€ package.json
โ”œโ”€โ”€ vite.config.js
โ””โ”€โ”€ README.md

๐Ÿ”„ Application Flow

                    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                    โ”‚     User      โ”‚
                    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                            โ”‚
                            โ–ผ
                    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                    โ”‚   React UI    โ”‚
                    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                            โ”‚
             โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
             โ–ผ              โ–ผ              โ–ผ
          Search        Watchlist       Compare
             โ”‚
             โ–ผ
       โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
       โ”‚   OMDb API  โ”‚
       โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”˜
              โ”‚
              โ–ผ
       โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
       โ”‚    Cache    โ”‚
       โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐Ÿš€ Getting Started

Prerequisites

Make sure you have installed:

  • Node.js
  • npm

1. Clone the repository

git clone https://github.com/Priya76843/Cinevault.git

2. Navigate to the project

cd Cinevault

3. Install dependencies

npm install

4. Configure the OMDb API

Create a .env file in the project root:

VITE_OMDB_API_KEY=your_omdb_api_key

5. Start the development server

npm run dev

Open the local URL provided by Vite in your browser.


๐Ÿ” Environment Variables

CineVault uses an environment variable for the OMDb API key.

VITE_OMDB_API_KEY=your_omdb_api_key

The actual .env file should not be committed to GitHub.

A .env.example file can be used to show the required environment variable without exposing the actual API key.


๐Ÿ“ˆ Performance Considerations

CineVault uses several techniques to reduce unnecessary work and improve the user experience:

  • Debounced search to limit unnecessary API requests.
  • In-memory caching to reuse previously fetched movie details.
  • Reusable components to keep UI logic modular.
  • Conditional rendering to display only the appropriate application state.
  • Loading and error handling to provide clear feedback during asynchronous operations.

๐ŸŽฏ Project Goals

The project was developed to demonstrate practical frontend development concepts including:

  • React component architecture
  • API integration
  • State management
  • Asynchronous JavaScript
  • Search optimization
  • Client-side caching
  • Responsive UI development
  • Error and loading state management
  • Interactive UI design

๐Ÿ”ฎ Future Improvements

Possible future enhancements include:

  • Personalized recommendation models
  • User authentication
  • Cloud-synchronized watchlists
  • Advanced filtering and sorting
  • Pagination or infinite scrolling
  • Movie ratings and reviews
  • More advanced recommendation algorithms
  • Progressive Web App support

๐Ÿ‘ฉโ€๐Ÿ’ป Author

Priya Hegde

M.Tech Computer Science & Engineering

GitHub: @Priya76843


๐Ÿ“„ License

This project was developed for educational and portfolio purposes.

About

๐ŸŽฌ A modern React movie discovery app powered by the OMDb API, featuring search, watchlist, movie comparison, caching, recommendations, themes, and interactive animations.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages