Skip to content

About

Minitube is Youtube clone website which uses PHP, SQL, Html and CSS.

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

🎬 Minitube-Youtube-Clone

A Simplified YouTube Clone Built with PHP & MySQL

A database-driven video sharing platform inspired by YouTube


πŸ“– Overview

MiniTube is a full-stack web application developed as a database systems project.

The platform allows users to:

  • Authenticate and access a personalized feed
  • Browse subscribed channels
  • Watch videos
  • View and create comment threads
  • Subscribe and unsubscribe from channels
  • Track video popularity through dynamic badges
  • Explore channel statistics and uploaded content

The project focuses heavily on database design, SQL querying, and relational data modeling while maintaining a clean YouTube-inspired user interface.


✨ Features

πŸ‘€ User System

  • User authentication
  • Profile information
  • Personalized feed

πŸ“Ί Video Feed

  • Displays videos from subscribed channels
  • Ordered by upload date
  • Thumbnail previews
  • Direct navigation to video pages

πŸŽ₯ Video Page

  • Embedded YouTube player
  • View counter (increments automatically)
  • Popularity badge generation via SQL CASE expression
  • Video metadata display
  • Comment system

πŸ’¬ Comment Threads

  • Top-level comments
  • Nested replies
  • Self-referencing database design
  • Thread rendering using SQL self-joins

πŸ“‘ Channel Page

  • Channel information
  • Subscriber count
  • Subscribe / Unsubscribe functionality
  • Uploaded video listing
  • Missing description handling

πŸ“Š Dynamic Statistics

  • Top channels sidebar
  • View counts
  • Subscriber counts
  • Popularity classification

πŸ—„οΈ Database Design

The system is designed according to relational database principles and normalized structure.

Main Entities

  • USERS
  • CHANNELS
  • VIDEOS
  • COMMENTS
  • SUBSCRIPTIONS

Design Principles

βœ” Third Normal Form (3NF)

βœ” Elimination of repeating groups

βœ” Separation of concerns between entities

βœ” Many-to-many relationships handled through junction tables

βœ” Self-referencing hierarchy for comment threads


πŸ—οΈ Entity Relationship Model

USERS

Stores user profiles and authentication information.

CHANNELS

Represents content creators and channel metadata.

VIDEOS

Stores video information and statistics.

COMMENTS

Supports hierarchical discussions through:

parent_comment_id

allowing YouTube-style reply threads.

SUBSCRIPTIONS

Handles the many-to-many relationship between:

User ↔ Channel

where:

  • One user can subscribe to many channels
  • One channel can have many subscribers

βš™οΈ Technologies Used

Technology Purpose
PHP Backend Logic
MySQL Relational Database
HTML5 Structure
CSS3 Styling
SQL Data Management

πŸ“‚ Project Structure

MiniTube/
β”‚
β”œβ”€β”€ channel.php
β”œβ”€β”€ watch.php
β”œβ”€β”€ feed.php
β”œβ”€β”€ login.php
β”œβ”€β”€ install.php
β”‚
β”œβ”€β”€ database.php
β”œβ”€β”€ _nav.php
β”‚
β”œβ”€β”€ seed.sql
β”œβ”€β”€ generate_data.php
β”‚
β”œβ”€β”€ style.css
β”‚
└── README.md

πŸš€ Installation

1. Clone Repository

git clone https://github.com/yourusername/minitube.git

2. Configure Database

Edit:

database.php

and update your MySQL credentials.

3. Run Installation Script

Navigate to:

http://localhost/minitube/install.php

This will:

  • Create the database
  • Create tables
  • Insert seed data

4. Login

Open:

http://localhost/minitube/login.html

and sign in using one of the generated demo accounts.


πŸ”„ Application Flow

User Login
      β”‚
      β–Ό
Load Feed
      β”‚
      β–Ό
Select Video
      β”‚
      β–Ό
Increment View Count
      β”‚
      β–Ό
Load Comment Thread
      β”‚
      β–Ό
Add Comment
      β”‚
      β–Ό
Reload Video Page
      β”‚
      β–Ό
Visit Channel
      β”‚
      β–Ό
Subscribe / Unsubscribe
      β”‚
      β–Ό
Update Subscriber Count

🎯 Learning Outcomes

This project demonstrates:

  • Relational database modeling
  • SQL joins
  • SQL self-joins
  • Aggregate queries
  • Database normalization
  • PHP backend development
  • Dynamic content rendering
  • Session management
  • CRUD operations

πŸš€ Built as a Database Systems Project

MiniTube demonstrates how relational database concepts power modern content platforms.

About

Minitube is Youtube clone website which uses PHP, SQL, Html and CSS.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages