Skip to content

sushantshinde7/netflix-clone-react-firebase

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

10 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🎬 React Netflix Clone (Firebase + Vite)

A fully responsive Netflix-inspired web application built with React, Vite, and Firebase Authentication, powered by the TMDB API.
This project focuses on clean UI, scalable architecture, and real-world production practices.

πŸ”— Live Demo: Netflix Clone Live

πŸ“¦ Repository: react-netflix-firebase-clone


Features

Category Feature
Authentication Email & Password authentication using Firebase Auth
Authentication Secure login, signup, and logout flows
Authentication Auth state persistence across page refresh
Authentication Automatic redirect based on authentication state
Movie & TV Content Real-time movie and TV data fetched from TMDB API
Movie & TV Content Categorized rows for trending, popular, upcoming, and top-rated content
Movie & TV Content Netflix-style reusable content rows
Player & Media Dedicated movie player page
Player & Media Dynamic trailer fetching via TMDB Videos API
Player & Media Embedded YouTube trailer playback
Routing & Navigation Client-side routing using React Router
Routing & Navigation Protected navigation flow for authenticated users
Routing & Navigation Dynamic player routes using /player/:id
UI / UX Netflix-inspired modern user interface
UI / UX Hero banner with featured content
UI / UX Fully responsive layout for desktop and mobile
UI / UX Smooth hover effects and transitions
User Feedback Toast notifications for authentication feedback
User Feedback Visual loading spinner during auth operations
State & Async Handling Centralized auth state handling with Firebase listeners
State & Async Handling Loading state management during authentication
State & Async Handling Graceful error handling for API requests
Performance & DX Vite-powered fast builds and hot module replacement
Performance & DX Lazy loading and optimized imports
Performance & DX Environment-based configuration for API keys

🧱 Tech Stack

Frontend

  • React 18
  • Vite
  • React Router v6
  • CSS Modules / Custom CSS

Backend / Services

  • Firebase Authentication
  • TMDB API (movies & TV data)

Tooling & Deployment

  • Vercel (production hosting)
  • ESLint (code quality)
  • Environment Variables (.env)

πŸ“ Project Structure

NETFLIX-CLONE
β”œβ”€β”€ node_modules/          # Installed dependencies (not committed)
β”œβ”€β”€ public/                # Static public assets
β”‚   β”œβ”€β”€ background_banner.jpg
β”‚   └── netflix_favicon.ico
β”‚   β”‚
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ assets/            # Images, icons, media assets
β”‚   β”‚   β”œβ”€β”€ cards/         # Movie card images & metadata
β”‚   β”‚   β”‚   β”œβ”€β”€ card1.jpg
β”‚   β”‚   β”‚   β”œβ”€β”€ card2.jpg
β”‚   β”‚   β”‚   β”œβ”€β”€ ...
β”‚   β”‚   β”‚   β”œβ”€β”€ card14.jpg
β”‚   β”‚   β”‚   └── Cards_data.js  # Card metadata (titles, images, ids)
β”‚   β”‚   β”œβ”€β”€ logo.svg
β”‚   β”‚   β”œβ”€β”€ hero.png
β”‚   β”‚   └── ...
β”‚   β”‚
β”‚   β”œβ”€β”€ components/        # Reusable UI components
β”‚   β”‚   β”œβ”€β”€ Navbar/
β”‚   β”‚   β”‚   β”œβ”€β”€ Navbar.jsx
β”‚   β”‚   β”‚   └── Navbar.css
β”‚   β”‚   β”œβ”€β”€ Footer/
β”‚   β”‚   β”‚   β”œβ”€β”€ Footer.jsx
β”‚   β”‚   β”‚   └── Footer.css
β”‚   β”‚   └── TitleCards/
β”‚   β”‚       β”œβ”€β”€ TitleCards.jsx
β”‚   β”‚       └── TitleCards.css
β”‚   β”‚
β”‚   β”œβ”€β”€ pages/             # Route-level pages
β”‚   β”‚   β”œβ”€β”€ Home/
β”‚   β”‚   β”‚   β”œβ”€β”€ Home.jsx
β”‚   β”‚   β”‚   └── Home.css
β”‚   β”‚   β”œβ”€β”€ Login/
β”‚   β”‚   β”‚   β”œβ”€β”€ Login.jsx
β”‚   β”‚   β”‚   └── Login.css
β”‚   β”‚   └── Player/
β”‚   β”‚       β”œβ”€β”€ Player.jsx
β”‚   β”‚       └── Player.css
β”‚   β”‚
β”‚   β”œβ”€β”€ config.js          # Firebase initialization + TMDB config
β”‚   β”œβ”€β”€ firebaseAuth.js    # Firebase Auth instance (singleton)
β”‚   β”œβ”€β”€ firebaseActions.js # Auth actions (signup, login, logout)
β”‚   β”œβ”€β”€ App.jsx            # Routes & protected navigation
β”‚   β”œβ”€β”€ index.css          # Global styles
β”‚   └── main.jsx           # React app entry point
β”‚
β”œβ”€β”€ .env                   # Environment variables (not committed)
β”œβ”€β”€ .eslintrc.js           # ESLint configuration
β”œβ”€β”€ .gitignore             # Git ignore rules
β”œβ”€β”€ index.html             # HTML entry file
β”œβ”€β”€ package.json           # Dependencies & scripts
β”œβ”€β”€ package-lock.json      # Dependency lock file
β”œβ”€β”€ vite.config.js         # Vite configuration
└── README.md              # Project documentation

πŸ” Environment Variables

Create a .env file in the project root: These variables are required for Firebase Authentication and TMDB API access.

VITE_FIREBASE_API_KEY=your_firebase_api_key
VITE_TMDB_ACCESS_KEY=your_tmdb_access_key

⚠️ Do not commit .env files to GitHub.

πŸ› οΈ Installation & Local Setup

1️⃣ Clone the repository

git clone https://github.com/yourusername/react-netflix-firebase-clone.git

2️⃣ Install dependencies

cd react-netflix-firebase-clone
npm install

3️⃣ Start development server

npm run dev

App will run at:

http://localhost:5173

πŸš€ Deployment

This project is deployed on Vercel.

Vercel Configuration

  • Framework: Vite
  • Build Command: npm run build
  • Output Directory: dist

Required Environment Variables (Vercel)

  • VITE_FIREBASE_API_KEY
  • VITE_TMDB_ACCESS_KEY

πŸ§ͺ Authentication Flow

Auth state persistence using onAuthStateChanged

config.js  ──Initializes Firebase App (singleton)

firebaseAuth.js ──Creates Firebase Auth instance

firebaseActions.js ──Handles signup / login / logout

App.jsx ──Controls routing via onAuthStateChanged

The authentication architecture follows a clean separation of responsibilities:

This ensures:

  • No duplicate Firebase initialization
  • Clean separation of concerns
  • Production-safe architecture

πŸ“Œ Why This Project?

This repository demonstrates:

  • Real-world React project structure
  • Secure Firebase authentication handling
  • Proper environment variable management
  • Scalable frontend architecture
  • Clean, maintainable, portfolio-ready code

This is not a tutorial dump, but a production-style application. Built to reflect real-world frontend engineering practices.

🀝 Contributing

Contributions are welcome.

  1. Fork the repository
  2. Create a new branch
  3. Make your changes
  4. Submit a Pull Request

πŸ“œ License

This project is for educational and portfolio purposes only.

All Netflix branding, logos, and media content belong to their respective owners.

πŸ‘€ Author

Sushant Shinde
Frontend Developer | React & UI Enthusiast

If you like this project, consider giving it a ⭐

About

πŸš€ Netflix Clone – A React + Vite project featuring a modern UI, movie listings, authentication, and search functionality. Built with React.js, Tailwind CSS, and TMDb API for a seamless movie-browsing experience.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors