Skip to content

mrDanh11/Netflix

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

44 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Netflix Clone Logo

🎬 Netflix Clone - Premium Streaming Experience

A cutting-edge Netflix clone built with the latest React 19 and modern web technologies

React 19 Vite Tailwind CSS React Router

πŸŽ₯ Live Demo β€’ ✨ Features β€’ πŸš€ Installation β€’ πŸ› οΈ Tech Stack


🌟 Overview

Dive into the future of streaming with this premium Netflix clone, crafted using React 19 and the latest web technologies. Experience seamless movie discovery, detailed information pages, and a pixel-perfect Netflix-inspired interface that adapts beautifully to any device.

✨ Features

🎯 Core Functionality

  • 🎬 Browse Movies & TV Shows - Explore trending and top-rated content
  • πŸ“± Detailed Media Pages - Rich information with cast, crew, and ratings
  • πŸ“Ί Season Management - Complete TV show season breakdown
  • 🎭 Actor Profiles - Detailed cast information and filmography
  • πŸ” Smart Search - Advanced search with filters and suggestions
  • πŸ’« Recommendations - AI-powered similar content discovery

🎨 UI/UX Excellence

  • πŸŒ™ Netflix-Authentic Design - Pixel-perfect Netflix recreation
  • ⚑ Smooth Animations - Buttery smooth hover effects and transitions
  • πŸ”„ Loading States - Professional loading indicators and skeletons
  • πŸ›‘οΈ Error Handling - Graceful error management and fallbacks
  • πŸ“± Mobile-First - Responsive design for all screen sizes
  • 🎨 Custom Fonts - Netflix Sans font family integration

πŸš€ Tech Stack

🎭 Frontend Powerhouse

Technology Version Purpose
React 19.1.0 Latest React with Concurrent Features
Vite 6.2.0 Next-gen build tool with HMR
React Router 7.6.1 Advanced client-side routing
TailwindCSS 4.1.7 Utility-first CSS framework
React Hook Form 7.65.0 Performant forms with easy validation
React Slick 0.30.3 Smooth carousel components

🎨 UI & Icons

Technology Version Purpose
FontAwesome 6.7.2 Professional icon library
Lodash 4.17.21 Utility functions for better performance

πŸ› οΈ Development Tools

Technology Version Purpose
ESLint 9.21.0 Advanced code linting and formatting
Prettier 3.5.3 Code formatting with Tailwind plugin
TypeScript Types Type definitions for better development

🌐 API & Data

Service Purpose
TMDB Movie and TV show database
Custom Hooks Reusable data fetching logic

🎬 Live Demo

οΏ½ Experience the magic yourself!


πŸ› οΈ Installation & Setup

πŸ“‹ Prerequisites

Requirement Version Download
Node.js 18.0+ Download
npm latest Included with Node.js
TMDB API Required Get API Key

πŸš€ Quick Start

πŸ”₯ One-Click Setup (Recommended)
# Clone and setup in one go
git clone https://github.com/mrDanh11/netflix.git && cd netflix && npm install

πŸ“¦ Step-by-Step Installation

1️⃣ Clone the Repository

git clone https://github.com/mrDanh11/netflix.git
cd netflix

2️⃣ Install Dependencies

# Using npm (recommended)
npm install

# Or using yarn
yarn install

# Or using pnpm (fastest)
pnpm install

3️⃣ Environment Configuration

Create a .env file in the root directory:

# 🌐 TMDB API Configuration
VITE_API_HOST=https://api.themoviedb.org/3
VITE_API_TOKEN=your_tmdb_api_token_here

# πŸš€ Optional: Custom Configuration
VITE_APP_TITLE=Netflix Clone
VITE_APP_DESCRIPTION=Premium Streaming Experience
πŸ”‘ How to get your TMDB API Token
  1. Visit TMDB API Settings
  2. Create a free account if you don't have one
  3. Request an API key (it's free!)
  4. Copy your API Read Access Token (not the API Key)
  5. Paste it in your .env file

πŸ’‘ Tip: Use the API Read Access Token, not the API Key for better security!

4️⃣ Start Development Server

# Start the development server
npm run dev

# Or with other package managers
yarn dev
pnpm dev

πŸŽ‰ Success! Visit http://localhost:5173 to see your Netflix clone in action!

5️⃣ Build for Production

# Create optimized production build
npm run build

# Preview production build locally
npm run preview

πŸ”§ Additional Scripts

# 🧹 Lint your code
npm run lint

# 🎨 Format code with Prettier
npm run format

# πŸ§ͺ Run tests (if available)
npm test

# πŸ“Š Analyze bundle size
npm run analyze

πŸ“ Project Architecture

Architecture
πŸ—οΈ netflix/
β”œβ”€β”€ πŸ“ public/
β”‚   β”œβ”€β”€ πŸ–ΌοΈ asets/              # Static images and visual assets
β”‚   β”‚   β”œβ”€β”€ aceBg.jpg          # Hero background image
β”‚   β”‚   β”œβ”€β”€ logo.png           # Netflix logo
β”‚   β”‚   └── NoImage.svg        # Fallback image placeholder
β”‚   └── πŸ”€ fonts/              # Netflix Sans font family
|
β”œβ”€β”€ πŸ“ src/
β”‚   β”œβ”€β”€ 🎯 components/         # Reusable UI components
β”‚   β”‚   β”œβ”€β”€ 🧩 CircularProgressBar.jsx    # Rating visualization
β”‚   β”‚   β”œβ”€β”€ πŸ–ΌοΈ Image.jsx                  # Optimized image component
β”‚   β”‚   β”œβ”€β”€ ⏳ Loading.jsx                # Loading spinner
β”‚   β”‚   β”œβ”€β”€ 🎬 MovieCard.jsx              # Movie/TV show cards
β”‚   β”‚   β”œβ”€β”€ πŸ” SearchForm.jsx             # Search functionality
β”‚   β”‚   β”œβ”€β”€ πŸŽ₯ TrailerModal.jsx           # Video trailer modal
β”‚   β”‚   β”œβ”€β”€ πŸ“ Header/                    # Navigation components
β”‚   β”‚   β”‚   └── index.jsx
β”‚   β”‚   β”œβ”€β”€ πŸ“ FeatureMovie/              # Hero section
β”‚   β”‚   β”‚   β”œβ”€β”€ index.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ Movie.jsx
β”‚   β”‚   β”‚   └── PaginateIndicator.jsx
β”‚   β”‚   β”œβ”€β”€ πŸ“ MediaDetail/               # Detail page components
β”‚   β”‚   β”‚   β”œβ”€β”€ ActorInfo.jsx             # Cast member details
β”‚   β”‚   β”‚   β”œβ”€β”€ ActorList.jsx             # Cast listing
β”‚   β”‚   β”‚   β”œβ”€β”€ Banner.jsx                # Detail page hero
β”‚   β”‚   β”‚   β”œβ”€β”€ MediaInfo.jsx             # Media information
β”‚   β”‚   β”‚   └── RecommendMediaList.jsx    # Similar content
β”‚   β”‚   β”œβ”€β”€ πŸ“ MediaList/                 # Content lists
β”‚   β”‚   β”‚   └── index.jsx
β”‚   β”‚   β”œβ”€β”€ πŸ“ SearchForm/                # Advanced search
β”‚   β”‚   β”‚   β”œβ”€β”€ FormField.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ GenresTypeInput.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ MediaTypeInput.jsx
β”‚   β”‚   β”‚   └── RatingInput.jsx
β”‚   β”‚   └── πŸ“ Season/                    # TV show seasons
β”‚   β”‚       β”œβ”€β”€ SeasonCard.jsx
β”‚   β”‚       └── SeasonList.jsx
β”‚   β”œβ”€β”€ πŸͺ hooks/                         # Custom React hooks
β”‚   β”‚   └── useFetch.jsx                  # API data fetching
β”‚   β”œβ”€β”€ πŸ“š libs/                          # Utilities and constants
β”‚   β”‚   └── constants.js                  # App-wide constants
β”‚   β”œβ”€β”€ πŸ“„ pages/                         # Route components
β”‚   β”‚   β”œβ”€β”€ MovieDetail.jsx               # Movie detail page
β”‚   β”‚   β”œβ”€β”€ PeoplePage.jsx                # Actor/person page
β”‚   β”‚   β”œβ”€β”€ RootLayout.jsx                # Layout wrapper
β”‚   β”‚   β”œβ”€β”€ SearchPage.jsx                # Search results
β”‚   β”‚   └── TvShowDetail.jsx              # TV show detail page
β”‚   β”œβ”€β”€ 🎨 index.css                      # Global styles
β”‚   β”œβ”€β”€ πŸš€ main.jsx                       # Application entry point
β”‚   └── πŸ“± App.jsx                        # Main app component
β”œβ”€β”€ πŸ“ docs/                              # Documentation and assets
β”‚   β”œβ”€β”€ πŸ“Έ screenshots/                   # App screenshots
β”‚   β”œβ”€β”€ docsTailwindcss.md               # Tailwind documentation
β”‚   └── react-hook-form.md               # Form handling docs
β”œβ”€β”€ βš™οΈ vite.config.js                     # Vite configuration
β”œβ”€β”€ 🧹 eslint.config.js                   # ESLint rules
β”œβ”€β”€ πŸ“¦ package.json                       # Dependencies and scripts
└── πŸ“– README.md                          # This file

�️ Component Architecture

🧩 Core Components

🎭 Layout & Navigation

  • App.jsx - Main application orchestrator
  • RootLayout.jsx - Shared layout structure
  • Header/ - Navigation and search bar
  • Loading.jsx - Elegant loading states

🎬 Content Display

  • FeatureMovie/ - Hero section with featured content
  • MediaList/ - Trending/top-rated content carousels
  • MovieCard.jsx - Individual movie/show cards
  • CircularProgressBar.jsx - Visual rating display

πŸ“‹ Detail Pages

  • MovieDetail.jsx - Comprehensive movie information
  • TvShowDetail.jsx - TV show with season details
  • MediaDetail/ - Shared detail components
  • Season/ - Season management components

πŸ” Search & Forms

  • SearchForm/ - Advanced search with filters
  • SearchPage.jsx - Search results display
  • TrailerModal.jsx - Video trailer integration

πŸͺ Custom Hooks & Utilities

useFetch Hook

Centralized API data fetching with advanced features:

const { data, isLoading, error, refetch } = useFetch({
  url: '/movie/popular',
  options: {
    enabled: true,
    cache: true,
    retries: 3
  }
});

Features:

  • βœ… Automatic loading and error states
  • βœ… Request caching and deduplication
  • βœ… Retry logic for failed requests
  • βœ… TypeScript-ready interface

🎨 Design System & Styling

Design System

🎯 Styling Approach

✨ Animations

  • πŸƒ Smooth transitions and hover effects
  • πŸ“± Touch-friendly interactions
  • ⚑ Hardware acceleration for performance
  • 🎭 Micro-interactions for engagement

🌐 API Integration & Data Flow

TMDB API

πŸ”— Endpoint Mapping

Feature Endpoint Purpose Cache
πŸ”₯ Trending /trending/all/day Daily trending content βœ… 30min
⭐ Top Movies /movie/top_rated Highest rated movies βœ… 1hr
πŸ“Ί Top TV Shows /tv/top_rated Highest rated TV shows βœ… 1hr
🎬 Movie Details /movie/{id} Complete movie information βœ… 2hr
πŸ“Ί TV Details /tv/{id} Complete TV show information βœ… 2hr
🎯 Recommendations /movie/{id}/recommendations Similar content discovery βœ… 1hr
πŸ‘₯ Cast & Crew /movie/{id}/credits Actor and crew information βœ… 2hr
πŸ” Search /search/multi Multi-category search ❌ No cache

πŸ“Š Data Flow Architecture

graph TD
    A[User Interaction] --> B[React Component]
    B --> C[useFetch Hook]
    C --> D[API Request]
    D --> E[TMDB API]
    E --> F[Response Processing]
    F --> G[State Update]
    G --> H[UI Re-render]
    H --> I[Loading States]
    H --> J[Error Handling]
    H --> K[Content Display]
Loading

πŸš€ Performance & Optimization

Performance Bundle Size Lazy Loading

⚑ Optimization Features

πŸƒβ€β™‚οΈ React 19 Performance

  • βœ… Concurrent Rendering for smooth UX
  • βœ… Automatic Batching for state updates
  • βœ… Suspense Boundaries for loading states
  • βœ… React Server Components ready

πŸ“¦ Bundle Optimization

  • βœ… Tree Shaking with Vite
  • βœ… Code Splitting by routes
  • βœ… Dynamic Imports for components
  • βœ… Asset Optimization and compression

πŸ–ΌοΈ Image Optimization

  • βœ… Lazy Loading for images
  • βœ… WebP Format support
  • βœ… Responsive Images with srcSet
  • βœ… Placeholder Images during load

🌐 Network Optimization

  • βœ… Request Caching and deduplication
  • βœ… Retry Logic for failed requests
  • βœ… Debounced Search queries
  • βœ… Prefetching for critical resources

πŸ›‘οΈ Error Handling & Resilience

πŸ”§ Error Management Strategy

// Global Error Boundary
<ErrorBoundary fallback={<ErrorFallback />}>
  <Router>
    <Suspense fallback={<Loading />}>
      <App />
    </Suspense>
  </Router>
</ErrorBoundary>

Features:

  • 🚨 Graceful Degradation - App continues working with limited functionality
  • πŸ”„ Automatic Retries - Smart retry logic for failed API calls
  • πŸ“ Error Logging - Comprehensive error tracking and reporting
  • 🎭 Fallback UI - Beautiful error states and empty states

🌟 Features in Development

🚧 Coming Soon

Feature Status Priority ETA
πŸ” User Authentication 🟑 In Progress High Q1 2025
πŸ“š Watchlist Functionality πŸ”΅ Planned High Q1 2025
🎯 Advanced Search Filters 🟑 In Progress Medium Q2 2025
πŸŽ₯ Video Trailer Integration πŸ”΅ Planned Medium Q2 2025
⭐ User Reviews & Ratings πŸ”΅ Planned Low Q3 2025
πŸ“± Progressive Web App πŸ”΅ Planned Medium Q2 2025
🌍 Internationalization πŸ”΅ Planned Low Q3 2025
πŸ€– AI Recommendations πŸ”΅ Planned Low Q4 2025

🎯 Roadmap Highlights

  • Phase 1 (Q1 2025): User authentication and watchlist
  • Phase 2 (Q2 2025): Enhanced search and video integration
  • Phase 3 (Q3 2025): Social features and internationalization
  • Phase 4 (Q4 2025): AI-powered features and advanced analytics

πŸ“± Browser Support & Compatibility

Chrome
Chrome
βœ… Latest
Firefox
Firefox
βœ… Latest
Safari
Safari
βœ… Latest
Edge
Edge
βœ… Latest
Opera
Opera
βœ… Latest

πŸ“± Mobile Support

  • βœ… iOS Safari (iOS 14+)
  • βœ… Chrome Mobile (Android 8+)
  • βœ… Samsung Internet
  • βœ… Firefox Mobile

πŸ“„ License

MIT License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments

πŸ’ Special Thanks

TMDB
The Movie Database
Providing comprehensive movie data
Vite
Vite Team
Lightning-fast build tool
React
React Team
Revolutionary UI framework
Tailwind
Tailwind CSS
Beautiful utility-first CSS

πŸ“ž Contact & Support

🌟 Get in Touch

GitHub Profile Email LinkedIn

πŸ“‚ Project Links

Repository


Β© 2025 Netflix Clone. Built with React 19 & Modern Web Technologies.

About

A modern Netflix clone built with React + Vite, featuring movie discovery, details, and a premium streaming UI.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages