Skip to content

🎬 Netflix Clone - Production-grade streaming UI built with Vanilla JavaScript, HTML5, CSS3 & TMDB API. Features responsive design, lazy loading, infinite scroll, search functionality. No frameworks - pure JavaScript. Perfect for learning modern web development. ⭐ Star if helpful!

Notifications You must be signed in to change notification settings

mujeebdev3/netflix-clone-vanilla-javascript

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

16 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🎬 Netflix Clone

A Production-Grade Streaming Platform UI Built With Vanilla JavaScript

Live Demo

HTML5 CSS3 Vanilla JavaScript No Framework TMDB API Responsive

A pixel-perfect, enterprise-grade Netflix clone featuring real-time movie data, infinite scrolling, and a fully responsive design. Built entirely with vanilla JavaScriptβ€”no frameworks, just modern web development best practices.

Features β€’ Demo β€’ Quick Start β€’ Documentation β€’ Contributing

Netflix Clone Preview


πŸ“‹ Table of Contents


✨ Features

🎬 Core Features

🎯 Dynamic Content

  • Real-time movie data from TMDB API

  • Multiple content categories (Trending, Popular, Top Rated, Upcoming)

  • Genre-based filtering and discovery

  • Intelligent content recommendations

🎨 Rich UI/UX

  • Pixel-perfect Netflix design recreation

  • Hero banner with auto-rotating featured content

  • Smooth 60fps animations and transitions

  • Interactive hover effects and card scaling

πŸ“± Responsive Design

  • Mobile-first architecture

  • Touch-enabled horizontal scrolling

  • Hamburger menu for mobile navigation

  • Optimized for all screen sizes (320px - 4K)

⚑ Performance

  • Lazy loading for images and content

  • Debounced search and scroll events

  • Skeleton loaders for perceived performance

  • Optimized API calls with caching

β™Ώ Accessibility

  • WCAG 2.1 AA compliant

  • Full keyboard navigation support

  • Screen reader optimized with ARIA labels

  • Semantic HTML5 structure

πŸ”§ Technical Excellence

  • 100% vanilla JavaScript (no frameworks)

  • BEM methodology for scalable CSS

  • Custom state management system

  • Comprehensive error handling


🎯 Why This Project?

This Netflix Clone demonstrates enterprise-level frontend engineering skills:

  • βœ… Framework-Free Mastery β€” Proves deep JavaScript understanding without framework dependency
  • βœ… API Integration β€” Real-world RESTful API consumption with error handling
  • βœ… Scalable Architecture β€” BEM methodology, component-based design, separation of concerns
  • βœ… Production-Ready β€” Performance optimized, accessible, and deployment-ready
  • βœ… Best Practices β€” Follows industry standards for HTML, CSS, and JavaScript

Perfect for showcasing to recruiters, hiring managers, and development teams.


πŸš€ Live Demo

Note: This is a frontend-only application. No authentication is required to browse content. All movie data is fetched in real-time from the TMDB API.

Try these features:

  • 🎬 Browse trending and popular movies
  • πŸ” Search for your favorite titles
  • πŸ“± Test responsive design on different devices
  • ⌨️ Navigate using keyboard only (Tab, Enter, Escape)

πŸ› οΈ Tech Stack

Core Technologies

Technology Version Purpose
HTML5 HTML5 Semantic markup and structure
CSS3 CSS3 Styling, animations, and responsive design
JavaScript ES2020+ Application logic and interactivity
TMDB API v3 Real-time movie data and images

Development & Deployment

Tool Purpose
Git Version control
VS Code Code editor
Live Server Local development server
Vercel / Netlify Production deployment
Chrome DevTools Debugging and performance profiling

CSS Architecture

  • BEM (Block Element Modifier) β€” Scalable naming convention
  • CSS Custom Properties β€” Design tokens and theming
  • CSS Grid & Flexbox β€” Modern layout systems
  • Mobile-First Approach β€” Progressive enhancement
  • Component-Based Styling β€” Modular and reusable

JavaScript Patterns

  • ES6+ Syntax β€” Modern JavaScript features
  • Async/Await β€” Clean asynchronous code
  • Event Delegation β€” Efficient event handling
  • Custom State Management β€” Vanilla JS state system
  • Module Pattern β€” Organized code structure

🎨 Design System

Color Palette

/* Primary Brand Colors */
--netflix-red: #e50914;
--netflix-black: #141414;
--netflix-dark-gray: #181818;

/* Background Colors */
--bg-primary: #141414;
--bg-secondary: #181818;
--bg-tertiary: #2f2f2f;

/* Text Colors */
--text-primary: #ffffff;
--text-secondary: #e5e5e5;
--text-muted: #808080;

/* Status Colors */
--color-success: #10b981;
--color-warning: #f59e0b;
--color-error: #ef4444;
--color-info: #3b82f6;

/* Overlay & Shadow */
--overlay-dark: rgba(0, 0, 0, 0.7);
--shadow-medium: 0 4px 12px rgba(0, 0, 0, 0.5);

Typography

/* Font Family */
--font-primary: "Netflix Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;

/* Font Sizes */
--text-xs: 0.75rem; /* 12px */
--text-sm: 0.875rem; /* 14px */
--text-base: 1rem; /* 16px */
--text-lg: 1.125rem; /* 18px */
--text-xl: 1.25rem; /* 20px */
--text-2xl: 1.5rem; /* 24px */
--text-3xl: 2rem; /* 32px */
--text-4xl: 2.5rem; /* 40px */
--text-5xl: 3rem; /* 48px */

/* Font Weights */
--font-light: 300;
--font-normal: 400;
--font-medium: 500;
--font-semibold: 600;
--font-bold: 700;

Spacing Scale (8px System)

--space-1: 0.25rem; /* 4px */
--space-2: 0.5rem; /* 8px */
--space-3: 0.75rem; /* 12px */
--space-4: 1rem; /* 16px */
--space-5: 1.5rem; /* 24px */
--space-6: 2rem; /* 32px */
--space-8: 3rem; /* 48px */
--space-10: 4rem; /* 64px */

Responsive Breakpoints

/* Mobile First */
--breakpoint-sm: 640px; /* Small devices (phones) */
--breakpoint-md: 768px; /* Medium devices (tablets) */
--breakpoint-lg: 1024px; /* Large devices (laptops) */
--breakpoint-xl: 1280px; /* Extra large (desktops) */
--breakpoint-2xl: 1536px; /* 2X large (large desktops) */

πŸ”Œ API Integration

TMDB API

This project uses The Movie Database (TMDB) API for real-time movie data.

Key Endpoints

Endpoint Purpose Parameters
/trending/all/{time_window} Fetch trending content time_window: day or week
/movie/popular Get popular movies page, language
/movie/top_rated Fetch top-rated movies page, language
/movie/upcoming Get upcoming releases page, region
/movie/{movie_id} Get movie details movie_id, append_to_response
/genre/movie/list List all genres language
/discover/movie Discover movies by filters with_genres, sort_by
/search/movie Search movies by title query, page

Getting Your API Key

  1. Create a free account at TMDB
  2. Navigate to Settings β†’ API
  3. Request an API key (developer account)
  4. Copy your API key and add it to .env
TMDB_API_KEY=your_api_key_here

β™Ώ Accessibility

WCAG 2.1 AA Compliance

This project follows Web Content Accessibility Guidelines (WCAG) 2.1 Level AA standards:

Accessibility Features

  • βœ… Semantic HTML5 β€” Proper use of <header>, <nav>, <main>, <section>, <article>, <footer>
  • βœ… ARIA Labels β€” Screen reader support for interactive elements
  • βœ… Keyboard Navigation β€” Full site navigation via keyboard (Tab, Enter, Escape, Arrow keys)
  • βœ… Focus Management β€” Visible focus indicators on all interactive elements
  • βœ… Color Contrast β€” Minimum 4.5:1 contrast ratio for text
  • βœ… Alt Text β€” Descriptive alternative text for all images
  • βœ… Skip Links β€” Skip to main content for screen reader users
  • βœ… Responsive Text β€” Text scales appropriately for readability

Keyboard Shortcuts

Key Action
Tab Navigate forward through interactive elements
Shift + Tab Navigate backward through interactive elements
Enter / Space Activate buttons and links
Escape Close modals and overlays
Arrow Keys Navigate within content sliders

πŸ“Έ Screenshots

Explore detailed views of the application across different devices and features.

πŸ–₯️ Desktop Experience

Desktop Homepage

Hero Section & Content Rows

Movie Modal

Interactive Movies

πŸ“± Mobile & Tablet Views

Tablet View

Tablet Responsive Layout

Mobile View

Mobile-Optimized Interface

🎨 View More Screenshots

Additional Features

Search

Real-time Search

Mobile Menu

Mobile Navigation


πŸƒ Quick Start

Before you begin, ensure you have:

Installation

# 1. Clone the repository
git clone https://github.com/mujeebdev3/netflix-clone-vanilla-javascript

# 2. Navigate to project directory
cd netflix-clone

# 3. Create environment file (Optional)
cp .env.example .env

# 4. Add your TMDB API key to .env
## Update this with your actual API key if running a server/backend.
TMDB_API_KEY=your_actual_api_key_here

# 5. Open with Live Server or any local server
# No build process needed - it's vanilla JavaScript!

Running Locally

Option 1: VS Code Live Server (Recommended)

  1. Install the Live Server extension
  2. Right-click index.html
  3. Select "Open with Live Server"

Option 2: Python HTTP Server

# Python 3
python -m http.server 8000

# Python 2
python -m SimpleHTTPServer 8000

Option 3: Node.js HTTP Server

npx http-server -p 8000

Then open http://localhost:8000 in your browser.


πŸ“– Documentation

For detailed documentation, please refer to:

  • πŸ“˜ SETUP.md β€” Complete setup and configuration guide
  • 🀝 CONTRIBUTING.md β€” How to contribute to this project
  • πŸ›‘οΈ CODE_OF_CONDUCT.md β€” Community guidelines
  • πŸ”’ SECURITY.md β€” Security policy and reporting vulnerabilities

πŸ§ͺ Testing

Manual Testing Checklist

  • Navigation bar is sticky on scroll
  • Hero banner auto-rotates every 5 seconds
  • Movie cards display hover effects
  • Modal opens/closes correctly
  • Search functionality works
  • Content loads dynamically from API
  • Responsive design works on mobile, tablet, desktop
  • Keyboard navigation functions properly
  • Error states display appropriately

Browser Testing

Tested on:

  • βœ… Chrome 90+
  • βœ… Firefox 88+
  • βœ… Safari 14+
  • βœ… Edge 90+
  • βœ… Opera 76+

Accessibility Testing

  • Lighthouse Accessibility Score: 95+
  • WAVE Web Accessibility Evaluation: 0 errors
  • Keyboard Navigation: Fully functional

🌍 Browser Support

Browser Version Status
Chrome 90+ βœ… Fully Supported
Firefox 88+ βœ… Fully Supported
Safari 14+ βœ… Fully Supported
Edge 90+ βœ… Fully Supported
Opera 76+ βœ… Fully Supported

Required Features

  • CSS Grid & Flexbox
  • CSS Custom Properties (CSS Variables)
  • ES6+ JavaScript (Arrow functions, async/await, template literals)
  • Fetch API
  • IntersectionObserver API (for lazy loading)

🚒 Deployment

Quick Deploy

Deploy to Netlify

Deploy with Vercel

Deployment Platforms Comparison

Platform Difficulty Build Time Custom Domain HTTPS CDN
Vercel ⭐ Easy ~1 min βœ… βœ… βœ…
Netlify ⭐ Easy ~1 min βœ… βœ… βœ…
GitHub Pages ⭐⭐ Medium ~2 min βœ… βœ… βœ…
Cloudflare Pages ⭐⭐ Medium ~2 min βœ… βœ… βœ…

🀝 Contributing

Contributions, issues, and feature requests are welcome!

Feel free to check the issues page or submit a new issue.

How to Contribute

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Please read our Code of Conduct before contributing.

Development Guidelines

  • Follow BEM naming convention for CSS
  • Use ES6+ JavaScript features
  • Write meaningful commit messages (use Conventional Commits)
  • Test across multiple browsers before submitting PR
  • Ensure accessibility compliance (WCAG 2.1 AA)
  • Update documentation for new features

πŸ™ Acknowledgments

Technologies & APIs

Resources & Learning

Community

  • Stack Overflow β€” Problem-solving and debugging
  • GitHub β€” Open-source collaboration platform

Special Thanks

  • The open-source community for inspiration and guidance
  • TMDB for their generous free API tier
  • All contributors who help improve this project

πŸ“§ Contact

Created by AbdulMujeeb

GitHub

πŸ’¬ Get in Touch

Have feedback, suggestions, or questions? I'd love to hear from you!


⭐ Star this repository if you found it helpful!

🍴 Fork this repository to customize it for your needs!

Made with ❀️ and β˜• by AbdulMujeeb

GitHub followers


Netflix Clone Β© 2025 β€’ MIT License

About

🎬 Netflix Clone - Production-grade streaming UI built with Vanilla JavaScript, HTML5, CSS3 & TMDB API. Features responsive design, lazy loading, infinite scroll, search functionality. No frameworks - pure JavaScript. Perfect for learning modern web development. ⭐ Star if helpful!

Topics

Resources

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

No packages published