Skip to content

Rohit-Nehate/CineQuery

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

20 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🎬 CineQuery

Discover movies tailored to your mood β€” powered by AI.

A modern, cinematic React web app that combines the TMDB movie database with Google Gemini AI to deliver intelligent, natural-language movie and TV show discovery.

React Firebase Gemini TailwindCSS Vite


✨ Features

πŸ” Dual Search Modes

  • Standard Search β€” Search movies and TV shows by title using the TMDB API
  • AI Query Search β€” Describe what you're in the mood for in natural language (e.g., "horror comedy Bollywood masala") and let Google Gemini find the perfect matches

πŸŽ₯ Browse & Discover

  • Curated movie categories: Now Playing, Popular, Top Rated, Upcoming
  • TV show categories: Airing Today, Popular Shows, Top Rated Shows, On The Air
  • Auto-playing YouTube trailers as hero backgrounds
  • Detailed content info pages with poster, ratings, genres, overview, and similar recommendations

πŸ”– Watchlist

  • Save movies and TV shows to your personal watchlist
  • Persistent storage via Firebase Firestore β€” your watchlist syncs across sessions
  • Remove individual items or clear the entire watchlist

πŸ” Authentication

  • Secure email/password sign-up and login via Firebase Auth
  • Protected routes β€” unauthenticated users are redirected to login
  • User profile display with logout functionality

🎨 Premium UI/UX

  • Fluid distortion effect on the login page using React Three Fiber
  • Smooth animations powered by Motion (Framer Motion)
  • Glassmorphism design with backdrop blur effects
  • Fully responsive β€” optimized for mobile, tablet, and desktop
  • Custom scrollbar styling and horizontal movie carousels

πŸ› οΈ Tech Stack

Layer Technology
Frontend React 19, React Router 7, Redux Toolkit
Styling Tailwind CSS 4, Custom CSS
Animations Motion (Framer Motion), React Three Fiber
3D Effects Three.js, @react-three/drei, @react-three/postprocessing
Auth & DB Firebase Authentication, Cloud Firestore
AI Backend Express.js server, Google Gemini API (gemini-3-flash-preview)
Movie Data TMDB API (The Movie Database)
Build Tool Vite (Rolldown)
Icons Remix Icon, Lucide React
Notifications React Hot Toast

πŸ“ Project Structure

CineQuery/
β”œβ”€β”€ public/
β”‚   └── images/              # Logo, backgrounds, and static assets
β”œβ”€β”€ server.js                 # Express backend for Gemini AI queries
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ components/
β”‚   β”‚   β”œβ”€β”€ Header.jsx        # Navigation bar with mobile hamburger menu
β”‚   β”‚   β”œβ”€β”€ Login.jsx         # Auth page with fluid distortion effect
β”‚   β”‚   β”œβ”€β”€ Body.jsx          # Router configuration
β”‚   β”‚   β”œβ”€β”€ BrowserLayout.jsx # Layout wrapper with data fetching hooks
β”‚   β”‚   β”œβ”€β”€ Browse.jsx        # Movies browse page
β”‚   β”‚   β”œβ”€β”€ TvShows.jsx       # TV shows browse page
β”‚   β”‚   β”œβ”€β”€ MainContainer.jsx # Hero section with trailer background
β”‚   β”‚   β”œβ”€β”€ VideoTitle.jsx    # Movie title overlay on hero
β”‚   β”‚   β”œβ”€β”€ VideoBackground.jsx # YouTube trailer embed
β”‚   β”‚   β”œβ”€β”€ MoviesContainer.jsx # Category rows container
β”‚   β”‚   β”œβ”€β”€ MoviesList.jsx    # Horizontal scrollable movie row
β”‚   β”‚   β”œβ”€β”€ MovieCard.jsx     # Individual movie poster card
β”‚   β”‚   β”œβ”€β”€ ContentInfo.jsx   # Detailed movie/show info page
β”‚   β”‚   β”œβ”€β”€ QuerySearch.jsx   # AI-powered search page
β”‚   β”‚   β”œβ”€β”€ Watchlist.jsx     # User's saved movies/shows
β”‚   β”‚   β”œβ”€β”€ TrailerPlayer.jsx # Fullscreen trailer modal
β”‚   β”‚   β”œβ”€β”€ ProfilePopup.jsx  # User profile dropdown
β”‚   β”‚   └── Movie404.jsx      # Cinematic 404 error page
β”‚   β”œβ”€β”€ hooks/                # Custom hooks for TMDB API data fetching
β”‚   β”œβ”€β”€ utils/
β”‚   β”‚   β”œβ”€β”€ store.jsx         # Redux store configuration
β”‚   β”‚   β”œβ”€β”€ moviesSlice.jsx   # Movies state management
β”‚   β”‚   β”œβ”€β”€ querySearchSlice.jsx # Search state management
β”‚   β”‚   β”œβ”€β”€ slices.jsx        # User state management
β”‚   β”‚   β”œβ”€β”€ firebase.jsx      # Firebase initialization
β”‚   β”‚   β”œβ”€β”€ constants.jsx     # API config and genre mappings
β”‚   β”‚   β”œβ”€β”€ loginValidation.jsx # Form validation
β”‚   β”‚   └── PublicRoute.jsx   # Route guard for authenticated users
β”‚   β”œβ”€β”€ App.jsx               # Root component
β”‚   β”œβ”€β”€ main.jsx              # Entry point with Redux Provider
β”‚   └── index.css             # Global styles and Tailwind imports
β”œβ”€β”€ index.html
β”œβ”€β”€ package.json
└── vite.config.js

πŸš€ Getting Started

Prerequisites

  • Node.js β‰₯ 18
  • npm β‰₯ 9
  • A TMDB API account (bearer token)
  • A Google AI Studio API key (for Gemini)
  • A Firebase project with Authentication and Firestore enabled

1. Clone the repository

git clone https://github.com/your-username/CineQuery.git
cd CineQuery

2. Install dependencies

npm install

3. Configure environment variables

Create a .env file in the project root:

GEMINI_API_KEY=your_google_gemini_api_key

4. Configure Firebase

Update the Firebase config in src/utils/firebase.jsx with your own project credentials:

const firebaseConfig = {
  apiKey: "YOUR_FIREBASE_API_KEY",
  authDomain: "YOUR_PROJECT.firebaseapp.com",
  projectId: "YOUR_PROJECT_ID",
  storageBucket: "YOUR_PROJECT.firebasestorage.app",
  messagingSenderId: "YOUR_SENDER_ID",
  appId: "YOUR_APP_ID",
};

5. Configure TMDB API

Update the TMDB bearer token in src/utils/constants.jsx:

export const TMDB_OPTIONS = {
  method: "GET",
  headers: {
    accept: "application/json",
    Authorization: "Bearer YOUR_TMDB_BEARER_TOKEN",
  },
};

6. Start the development servers

Frontend (runs on http://localhost:5173):

npm run dev

Backend (runs on http://localhost:5000 β€” required for AI search):

node server.js

πŸ“± Responsive Design

CineQuery is fully responsive across all screen sizes:

  • Mobile β€” Hamburger navigation menu, stacked layouts, touch-friendly card sizes
  • Tablet β€” Optimized form widths, balanced spacing
  • Desktop β€” Full navigation bar, side-by-side content layouts, expanded movie cards

πŸ—οΈ Architecture Overview

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   React UI  │────▢│  Redux Store │────▢│  TMDB API     β”‚
β”‚  (Vite Dev) β”‚     β”‚  (Toolkit)   β”‚     β”‚  (Movies/TV)  β”‚
β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
       β”‚
       β”‚  POST /api/movies
       β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Express.js  │────▢│  Google       β”‚
β”‚  Server      β”‚     β”‚  Gemini AI    β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
       β”‚
       β”‚  Auth + Firestore
       β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   Firebase   β”‚
β”‚  (Auth + DB) β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
  • Frontend fetches movie/show data directly from the TMDB API via custom React hooks
  • AI queries are proxied through the Express backend to keep the Gemini API key secure
  • Firebase handles user authentication and persists watchlist data in Firestore
  • Redux Toolkit manages global state for movies, search results, and user session

πŸ“œ Available Scripts

Command Description
npm run dev Start the Vite development server
npm run build Build for production
npm run preview Preview the production build
npm run lint Run ESLint
node server.js Start the Express backend for AI search

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

πŸ“„ License

This project is open source and available under the MIT License.


Built with ❀️ using React, Firebase, and Google Gemini AI

About

A modern, cinematic React web app that combines the TMDB movie database with Google Gemini AI to deliver intelligent, natural-language movie and TV show discovery.

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors