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.
- 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
- 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
- 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
- Secure email/password sign-up and login via Firebase Auth
- Protected routes β unauthenticated users are redirected to login
- User profile display with logout functionality
- 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
| 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 |
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
- 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
git clone https://github.com/your-username/CineQuery.git
cd CineQuerynpm installCreate a .env file in the project root:
GEMINI_API_KEY=your_google_gemini_api_keyUpdate 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",
};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",
},
};Frontend (runs on http://localhost:5173):
npm run devBackend (runs on http://localhost:5000 β required for AI search):
node server.jsCineQuery 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
βββββββββββββββ ββββββββββββββββ βββββββββββββββββ
β 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
| 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 |
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is open source and available under the MIT License.
Built with β€οΈ using React, Firebase, and Google Gemini AI