Home
Softono

YouTube Clone

Open source Java
11
Stars
3
Forks
0
Issues
1
Watchers
1 year
Last Commit

 About YouTube Clone

Full-featured YouTube Clone in Java with JavaFX UI, socket-based communication, RESTful media streaming, and MySQL database using Hibernate ORM. Developed as a final project for an advanced programming course. Emphasizes security, performance, and modular design.

Platforms

Web Self-hosted

Languages

Java

Links

Need Help Installing YouTube Clone?

We provide expert installation service for this software. Our team will install, configure, and secure YouTube Clone on your server. plans start at just $30.

YouTube Clone

View on GitHub

πŸŽ₯ YouTube Clone – Full Stack Java Application (Memoli)

Static Badge star license


This project was developed as the final project for an advanced programming courseπŸ‘¨β€πŸ’»πŸ₯‡. A full-featured YouTube Clone built entirely in Java, with a JavaFX client, Socket-based communication, RESTful media streaming, and MySQL database using Hibernate ORM. This application replicates the core experience of YouTube β€” including video playback, user interaction, and content management β€” with a strong emphasis on security, performance, and modular design.

Screenshot

Now ready to go!πŸŽ‰πŸŽ‰πŸŽ‰


🧰 Technology Stack

Layer Technology
Client (UI) JavaFX
Server Java REST API
Database MySQL
ORM Hibernate
Networking Java Socket
Streaming Java HTTP Server
Email JavaMail

πŸš€ Features

βœ… Core Functionalities

  • πŸ” User Authentication: Login, Registration, Email verification
  • 🏠 Home Page: Personalized feed with video previews & thumbnails
  • πŸ”Ž Search: Search videos by title, tags, or description
  • πŸ“₯ Video Uploading: Add videos with metadata and tags
  • 🏷️ Tags: Categorize videos using searchable tags
  • πŸ“Ί Streaming Player:
    • Real-time streaming without full download
    • Playback controls: speed, volume, seek
  • πŸ’¬ Comments:
    • Comment on videos
    • Like, dislike, and reply to comments
  • πŸ“‚ Playlists: Create and manage custom playlists
  • πŸ”” Notifications: See updates from subscriptions
  • πŸ‘€ User Profiles & Channels: View channel pages and video lists
  • ❀️ Like/Dislike Videos
  • πŸ“₯ Video Downloading: Download videos directly to local storage
  • πŸ€– Simple Video Recommendations: Based on tags and viewing history
  • πŸ“Œ Subscriptions: Follow users and view content from subscribed channels

🧱 Architecture Overview

This application is built using a client-server architecture with clear separation of concerns across UI, networking, and business logic.

πŸ”— Communication

  • Java Sockets are used for real-time communication between client and server
  • Designed using a custom, structured Socket API
  • All communication is encrypted to ensure privacy and integrity

πŸ“‘ Media Transfer

  • Videos are streamed via a Java RESTful API
  • Supports byte-range (partial content) to enable seamless playback and seeking
  • Videos can also be downloaded by users as needed

πŸ—‚οΈ Project Structure

/java
 ┣ /Client
 ┃ ┣ /ClientEncryption.java         # Client-side encryption
 ┃ β”— /Youtube.java                  # JavaFX Application
 ┣ /Server
 ┃ ┣ /Database                 # Database Manager
 ┃ ┣ /Server.java              # Server 
 ┃ ┣ /ClientHandler.java
 ┃ ┣ /ServerEncryption.java    # Server-side encryption
 ┃ /Shared              
 ┃ ┣ /Api                      # DTOs 
 ┃ β”— /Models                   # JPA entities
 ┣ /database
 ┃ β”— schema.sql                # MySQL schema setup
 β”— README.md

πŸ” Security

  • πŸ”’ Encrypted socket communication using custom RSA and AES encryption/decryption methods implemented in ServerEncryption and ClientEncryption classes to secure server-client data exchange.
  • πŸ”‘ Secure login with email-based verification
  • πŸ›‘οΈ Built-in checks to protect user actions and prevent data tampering

πŸ“Ή Media Streaming & Download

  • Videos are served via a dedicated REST API supporting:

    • HTTP byte-range for fast and smooth seeking
    • Video streaming with minimal startup delay
    • Video download for offline viewing
  • The media player supports:

    • Adaptive playback speed
    • Volume control
    • Seek functionality
    • Stream without full file download

🎨User Interface (GUI)

The user interface for this project was developed using the JavaFX framework, enhanced with CSS for styling. Below are some of the key UI features:

  • Responsive(all pages)
  • Interactive(primary buttons|searchbar|hovering)
  • Input validation before backend check(Minimums for name&username|constraints for password field)
  • Shortcuts
Key Action
/ search
Esc cancel search
ctrl+H Home
ctrl+S Shorts
ctrl+Shift+S subscriptions
ctrl+Y your channel
ctrl+Shift+ H History
↑ volume 10% up
↓ volume 10% down
β†’ 10sec forward
← 10sec backward
Space pause/upause

🀝Contributing

Contributions are the heart of the open-source community, fostering learning, inspiration, and creativity. Your contributions are highly valued and appreciated.

If you have suggestions for improvements, please fork the repository and submit a pull request. Alternatively, you can open an issue with the β€œenhancement” tag.

Don’t forget to star🌟 the project! Thanks again!

🌟Acknowledgments

I would like to express my sincere gratitude to the following individuals for their invaluable contributions and support throughout this project:

πŸ“„ License

MIT License – See LICENSE file.