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.
- User authentication
- Profile information
- Personalized feed
- Displays videos from subscribed channels
- Ordered by upload date
- Thumbnail previews
- Direct navigation to video pages
- Embedded YouTube player
- View counter (increments automatically)
- Popularity badge generation via SQL CASE expression
- Video metadata display
- Comment system
- Top-level comments
- Nested replies
- Self-referencing database design
- Thread rendering using SQL self-joins
- Channel information
- Subscriber count
- Subscribe / Unsubscribe functionality
- Uploaded video listing
- Missing description handling
- Top channels sidebar
- View counts
- Subscriber counts
- Popularity classification
The system is designed according to relational database principles and normalized structure.
- USERS
- CHANNELS
- VIDEOS
- COMMENTS
- SUBSCRIPTIONS
β 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
Stores user profiles and authentication information.
Represents content creators and channel metadata.
Stores video information and statistics.
Supports hierarchical discussions through:
parent_comment_idallowing YouTube-style reply threads.
Handles the many-to-many relationship between:
User β Channel
where:
- One user can subscribe to many channels
- One channel can have many subscribers
| Technology | Purpose |
|---|---|
| PHP | Backend Logic |
| MySQL | Relational Database |
| HTML5 | Structure |
| CSS3 | Styling |
| SQL | Data Management |
MiniTube/
β
βββ channel.php
βββ watch.php
βββ feed.php
βββ login.php
βββ install.php
β
βββ database.php
βββ _nav.php
β
βββ seed.sql
βββ generate_data.php
β
βββ style.css
β
βββ README.md
git clone https://github.com/yourusername/minitube.gitEdit:
database.phpand update your MySQL credentials.
Navigate to:
http://localhost/minitube/install.php
This will:
- Create the database
- Create tables
- Insert seed data
Open:
http://localhost/minitube/login.html
and sign in using one of the generated demo accounts.
User Login
β
βΌ
Load Feed
β
βΌ
Select Video
β
βΌ
Increment View Count
β
βΌ
Load Comment Thread
β
βΌ
Add Comment
β
βΌ
Reload Video Page
β
βΌ
Visit Channel
β
βΌ
Subscribe / Unsubscribe
β
βΌ
Update Subscriber Count
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