|
1 | | -# YouTube-Clone |
2 | | -A responsive YouTube clone UI built using HTML, CSS, Bootstrap 5, and Font Awesome, featuring a navbar with search, sidebar categories, explore section, and video cards with local video playback. |
| 1 | +# Youtube Clone |
| 2 | +--- |
3 | 3 |
|
4 | | -# YouTube Clone – Frontend Project |
5 | | -This project is a static frontend clone of YouTube built using HTML5, CSS3, Bootstrap 5, and Font Awesome. The interface includes a responsive navigation bar, sidebar with categories, and a dynamic content section displaying videos as cards. Each video card contains a thumbnail, title, and description, with support for local video playback. |
| 4 | +# Static Website Deployment Flow |
| 5 | +--- |
| 6 | +This project demonstrates how static assets (**HTML, CSS, JS, Images, and Videos**) are served to clients via a **Static Host** (e.g., Nginx, GitHub Pages) and optimized using a **CDN (Cache Layer)** for performance. |
6 | 7 |
|
7 | | - # Key Features: |
| 8 | +## 📌 Architecture Diagram |
| 9 | +--- |
| 10 | + |
8 | 11 |
|
9 | | -Responsive Bootstrap 5 layout with grid system. |
| 12 | +## 📖 How It Works |
| 13 | +--- |
10 | 14 |
|
11 | | -Navigation bar with search functionality and sign-in button. |
| 15 | +1. **Client Request** |
| 16 | + - Browser requests the entry point: |
| 17 | + ```http |
| 18 | + GET /index.html |
| 19 | + ``` |
12 | 20 |
|
13 | | -Sidebar menu including sections like Home, Shorts, Subscriptions, History, Playlists, etc. |
| 21 | +2. **CDN (Cache Layer)** |
| 22 | + - If cached → returns `200 OK + index.html`. |
| 23 | + - If not cached → forwards the request to the static host. |
14 | 24 |
|
15 | | -Explore section with trending categories (Music, Gaming, News, Sports, etc.). |
| 25 | +3. **Static Host (Nginx / GitHub Pages)** |
| 26 | + - Stores and serves static files: |
| 27 | + - HTML Pages |
| 28 | + - CSS (e.g., `bootstrap.css`) |
| 29 | + - JS (e.g., `bootstrap.bundle.js`) |
| 30 | + - Images (`img/`, `img1/`) |
| 31 | + - Videos (`.mp4`) |
16 | 32 |
|
17 | | -Video cards with thumbnails and titles, linking to locally stored .mp4 files. |
| 33 | +4. **Browser Parses HTML** |
| 34 | + - After receiving `index.html`, the browser parses it and sends additional requests for assets inside the HTML. |
18 | 35 |
|
19 | | -Icons integrated using Font Awesome 6. |
| 36 | +5. **Asset Fetching** |
| 37 | + - CSS → `GET css/bootstrap.css` |
| 38 | + - JS → `GET js/bootstrap.bundle.js` |
| 39 | + - Images → `GET img/*`, `GET img1/*` |
| 40 | + - Videos → `GET video/*.mp4` |
20 | 41 |
|
21 | | -Custom scrollbar hidden using CSS. |
| 42 | +6. **Response Flow** |
| 43 | + - CSS → `200 OK + bootstrap.css` |
| 44 | + - JS → `200 OK + bootstrap.bundle.js` |
| 45 | + - Images → `200 OK + img files` |
| 46 | + - Videos → `200 OK + mp4 files` |
22 | 47 |
|
23 | | -# Tech Stack: |
| 48 | +## 📂 File Types Served |
| 49 | +--- |
24 | 50 |
|
25 | | -HTML5 |
| 51 | +- **HTML Pages** → `index.html` |
| 52 | +- **CSS** → `bootstrap.css` |
| 53 | +- **JavaScript** → `bootstrap.bundle.js` |
| 54 | +- **Images** → `img/, img1/` |
| 55 | +- **Videos** → `Radhe Govinda.mp4`, `Rait Zara Si.mp4`, `Pal.mp4` |
26 | 56 |
|
27 | | -CSS3 |
28 | 57 |
|
29 | | -Bootstrap 5 |
30 | 58 |
|
31 | | -Font Awesome 6 |
| 59 | +## ✅ Benefits |
| 60 | +--- |
32 | 61 |
|
| 62 | +- Faster loading with **CDN caching** |
| 63 | +- Efficient asset delivery |
| 64 | +- Scalable and reliable static hosting |
| 65 | +- Reduced server load due to cache hits |
33 | 66 |
|
34 | | -📷 Preview |
| 67 | +--- |
| 68 | +
|
| 69 | +👉 This README explains the **flow of static assets** from **host → CDN → browser** for optimized website performance. |
35 | 70 |
|
36 | | -https://github.com/CodingwithAnkit-tech/YouTube-Clone/blob/main/Screenshot%202025-10-01%20005047.png |
|
0 commit comments