π₯ YouTube Clone β Full Stack Java Application (Memoli)
[]() [
]() [
]()
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.
Now ready to go!πππ
π§° Technology Stack
| Layer | Technology |
|---|---|
| Client (UI) | |
| Server | |
| Database | |
| ORM | |
| Networking | |
| Streaming | |
π 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
ServerEncryptionandClientEncryptionclasses 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:
- Mohsen Minavand, Ehsan Habibagahi and Mehrdad Shirvani (Contributors)
- Dr. Saeed R Kheradpishe (Instructor)
- Farid Karimi (Teaching Assistant(TA))
- Video and Image Files
π License
MIT License β See LICENSE file.