Skip to content

bnithin215/Movie-Database

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

16 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŽฌ Movie Database

A complete full-stack movie database application with IMDB/OMDb API integration and a special focus on Indian Cinema. Search, discover, and manage your personal movie collection with comprehensive movie information including posters, cast, ratings, and trailers.

Built with Node.js, Express.js, MongoDB (Mongoose) on the backend, and HTML, CSS, and JavaScript on the frontend.


โœจ Features

๐ŸŽญ Movie Management

  • โญ Add movies with detailed information (title, genre, cast, director, plot, etc.)
  • ๐ŸŒŸ Rate movies with a 5-star rating system
  • โœ๏ธ Edit movie details
  • ๐Ÿ—‘๏ธ Delete movies from your collection
  • ๐Ÿ” Advanced search and filtering capabilities

๐ŸŒ IMDB/OMDb Integration

  • ๐ŸŽฌ Search millions of movies from the OMDb database
  • ๐Ÿ–ผ๏ธ Automatic poster image fetching
  • ๐Ÿ“Š IMDB ratings and metadata
  • ๐ŸŽฅ Trailer search integration (YouTube)
  • ๐Ÿ“ Complete movie information (plot, cast, director, awards, box office)

๐Ÿ‡ฎ๐Ÿ‡ณ Indian Cinema Focus

  • ๐ŸŽช One-click access to popular Indian movies
  • ๐ŸŽญ Quick search for Bollywood movies
  • ๐Ÿ‘ค 25+ Popular Indian actors quick-select
  • ๐ŸŽฌ Support for multiple languages:
    • Hindi (Bollywood)
    • Tamil (Kollywood)
    • Telugu (Tollywood)
    • Malayalam (Mollywood)
    • Kannada (Sandalwood)
    • Bengali, Marathi, Punjabi
  • ๐ŸŒŸ Pre-loaded popular movies (RRR, Baahubali, 3 Idiots, Dangal, etc.)

๐Ÿ‘ค User Authentication

  • ๐Ÿ” Secure signup and login
  • ๐Ÿ”‘ JWT-based authentication
  • ๐Ÿ‘ฅ Personalized movie collections per user

๐ŸŽจ User Interface

  • ๐Ÿ“ฑ Responsive design for all devices
  • ๐ŸŽจ Beautiful gradient UI with animations
  • ๐Ÿ”„ Grid and List view toggle
  • ๐ŸŽฏ Quick filters and sorting options
  • ๐Ÿ’ซ Smooth animations and transitions

๐Ÿ› ๏ธ Tech Stack

Frontend:

  • HTML5, CSS3, JavaScript (ES6+)
  • Responsive design with CSS Grid and Flexbox
  • Modern UI with gradients and animations

Backend:

  • Node.js & Express.js
  • MongoDB with Mongoose ODM
  • JWT for authentication
  • Axios for HTTP requests

APIs:

  • OMDb API for movie data
  • YouTube (for trailer searches)

๐Ÿ“‚ Project Structure

Movie-Database/
โ”œโ”€โ”€ server.js              # Main application entry point
โ”œโ”€โ”€ package.json           # Dependencies and scripts
โ”œโ”€โ”€ .env                   # Environment variables
โ”‚
โ”œโ”€โ”€ models/                # MongoDB/Mongoose schemas
โ”‚   โ”œโ”€โ”€ User.js           # User model
โ”‚   โ””โ”€โ”€ Movie.js          # Movie model (with IMDB fields)
โ”‚
โ”œโ”€โ”€ routes/               # Express route handlers
โ”‚   โ”œโ”€โ”€ auth.js          # Authentication routes
โ”‚   โ”œโ”€โ”€ movies.js        # Movie CRUD operations
โ”‚   โ””โ”€โ”€ omdb.js          # OMDb API integration routes
โ”‚
โ”œโ”€โ”€ services/            # Business logic services
โ”‚   โ””โ”€โ”€ omdbService.js  # OMDb API service functions
โ”‚
โ”œโ”€โ”€ middleware/          # Express middleware
โ”‚   โ””โ”€โ”€ authMiddleware.js # JWT authentication
โ”‚
โ”œโ”€โ”€ public/              # Frontend static files
โ”‚   โ”œโ”€โ”€ index.html       # Main page (add movies)
โ”‚   โ”œโ”€โ”€ login.html       # Login page
โ”‚   โ”œโ”€โ”€ signup.html      # Signup page
โ”‚   โ”œโ”€โ”€ search.html      # Advanced search page
โ”‚   โ”œโ”€โ”€ script.js        # Main page JavaScript
โ”‚   โ”œโ”€โ”€ search-enhanced.js # Search page JavaScript
โ”‚   โ””โ”€โ”€ styles.css       # Application styles
โ”‚
โ”œโ”€โ”€ README.md            # This file
โ””โ”€โ”€ IMDB_INTEGRATION.md  # Detailed API documentation

โšก Quick Start

Prerequisites

  • Node.js (v14 or higher)
  • MongoDB Atlas account (or local MongoDB)
  • OMDb API key (free from omdbapi.com)

Installation

  1. Clone the repository:

    git clone https://github.com/bnithin215/Movie-Database.git
    cd Movie-Database
  2. Install dependencies:

    npm install
  3. Configure environment variables:

    Create a .env file in the root directory:

    MONGO_URI=your_mongodb_connection_string
    PORT=5001
    OMDB_API_KEY=your_omdb_api_key
    JWT_SECRET=your_jwt_secret_key
  4. Start the server:

    # Production
    npm start
    
    # Development (with auto-reload)
    npm run dev
  5. Open your browser:

    http://localhost:5001
    

๐ŸŽฏ Usage Guide

Getting Started

  1. Sign up for a new account or log in if you already have one
  2. Navigate to the Search page to discover movies
  3. Click on "Discover Movies (OMDB)" tab

Discovering Indian Movies

  1. Click "Load Popular Indian Movies" for instant results
  2. Or click "Search Bollywood" for Bollywood-specific content
  3. Use the actor chips to quickly find movies by popular Indian actors
  4. Click "Add to Collection" to save any movie

Searching for Movies

  • By Title: Enter movie name in the search box
  • By Actor: Use the actor search field or click an actor chip
  • By Year: Filter movies by release year
  • By Type: Choose between movies and series

Managing Your Collection

  • View all your movies on the main page
  • Edit movie details
  • Delete movies you no longer want
  • Rate movies with stars
  • Filter and sort your collection

๐ŸŒŸ Key Features in Detail

Advanced Search

  • Search across title, actor, director, cast, and genre
  • Combine multiple search criteria
  • Quick filters for instant results
  • Sort by relevance, date, title, or rating

IMDB Integration

  • Fetch complete movie data from OMDb
  • Display IMDB ratings
  • Show movie posters
  • Access full cast and crew information
  • View plot summaries and awards

Indian Cinema

  • Specialized search for Indian movies
  • Quick access to Bollywood hits
  • Support for regional cinema
  • Popular Indian actors database
  • Country and language filtering

Trailer Support

  • Direct YouTube search for trailers
  • One-click trailer access
  • Integration with movie details

๐Ÿ“ก API Endpoints

Authentication

  • POST /api/auth/signup - Create new user account
  • POST /api/auth/login - User login
  • GET /api/auth/me - Get current user info

Movies

  • GET /api/movies - Get all user's movies
  • POST /api/movies - Add new movie
  • GET /api/movies/:id - Get specific movie
  • PUT /api/movies/:id - Update movie
  • DELETE /api/movies/:id - Delete movie

OMDb Integration

  • GET /api/omdb/search - Search OMDb database
  • GET /api/omdb/movie/:imdbID - Get movie details
  • GET /api/omdb/indian-movies - Get popular Indian movies
  • GET /api/omdb/search-by-actor - Search by actor name
  • POST /api/omdb/batch-details - Get multiple movie details
  • GET /api/omdb/indian-actors - Get list of Indian actors

For detailed API documentation, see IMDB_INTEGRATION.md


๐ŸŽจ Screenshots

Main Features

  • Home Page: Add movies to your collection
  • Search Page: Discover new movies with OMDb integration
  • Indian Cinema: Dedicated section for Indian movies
  • Movie Cards: Beautiful display with posters and details

๐Ÿ”’ Security Features

  • JWT Authentication: Secure token-based authentication
  • Password Hashing: Bcrypt password encryption
  • Protected Routes: API endpoints require authentication
  • Input Validation: Server-side validation for all inputs
  • MongoDB Injection Protection: Mongoose schema validation

๐Ÿš€ Deployment

Environment Variables for Production

NODE_ENV=production
MONGO_URI=your_production_mongodb_uri
PORT=5001
OMDB_API_KEY=your_omdb_api_key
JWT_SECRET=strong_random_secret_key

Deployment Platforms

  • Heroku: Perfect for Node.js apps
  • Vercel: Great for full-stack apps
  • Railway: Simple deployment
  • DigitalOcean: Full control with VPS

๐Ÿ“ License

MIT License - feel free to use this project for learning or personal use.


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

Your Name


๐Ÿ™ Acknowledgments

  • OMDb API for movie data
  • MongoDB for database
  • Express.js for backend framework
  • Indian cinema industry for amazing movies! ๐Ÿ‡ฎ๐Ÿ‡ณ

๐Ÿ“ž Support

For issues, questions, or suggestions:


Made with โค๏ธ for movie lovers everywhere! ๐ŸŽฌ๐Ÿฟ

Releases

No releases published

Packages

 
 
 

Contributors