# Youtube-Clone-KMP **Repository Path**: pythonzz/Youtube-Clone-KMP ## Basic Information - **Project Name**: Youtube-Clone-KMP - **Description**: No description available - **Primary Language**: Unknown - **License**: AGPL-3.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2024-07-24 - **Last Updated**: 2024-08-09 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # YouTube Clone Kotlin Multiplatform ![YouTube Clone KMP](https://github.com/KhubaibKhan4/Youtube-Clone-KMP/blob/master/screenshots/banner_poster.jpg) ## Overview YouTube Clone KMP is a sophisticated project developed using Kotlin Multiplatform (KMP), enabling the creation of versatile applications across Android, iOS, Web, and Desktop platforms with shared code. This comprehensive YouTube clone mirrors the functionalities of the official YouTube app, offering a seamless user experience across various devices. A Better Version of Original App (A Big Bold Claim). ## 🚀 Key Features - **Cross-Platform Compatibility (Android, iOS, Web & Desktop Applications)** - **Video Playback** - **Sharing Options** - **Download Capability** - **Playlist Viewing** - **Comprehensive Search** - **Video Detail** - **Trending Videos** - **Subscribe Channels** - **View Verified Channel Badges** - **Quick & Responsive Search for Videos & Channels** - **Offline Video Support** - **Smooth Interaction** - **Responsive UI** - **Material Design Components** - **Server Driven Ui** ## 🔥 Additional Features - Top Videos - Shorts Videos - Video Details - Channel Screen - Channel Home - Live Streams - Community - Playlists - Channel Details Screen - Share Channel, Videos, and Shorts - Like and Comment Features - Download Videos - Relevance Videos - Subscriptions - Library - Shimmer Loading Screen - Top Categories - Navigation Rail for Foldable Devices - Desktop and Web Version Support ## 🚀 Future Plans - TV and Wear OS Versions - Integrate Custom Server. - Ai based Search System. ## 🌟 Contributions If you wanna contribute, Please make sure to add new features & Then make a PR.Feel free to contribute to the project and stay tuned for more exciting updates! # Open To Work Do you wanna Convert your thoughts into Physicall & Successfull Project Then I'm here for you. I'm open to work, available for Freelance or Remote Work Opportunities. Feel free to reach me out on Email. # Tech Stack Highlights - **Kotlin Multiplatform**: `2.0.0` - **AGP (Android Gradle Plugin)**: `8.2.2` - **Compose**: `1.6.11` - `androidx-appcompat`: `1.7.0` - `androidx-activityCompose`: `1.9.0` - `compose-uitooling`: `1.6.8` - `composeImageLoader`: `1.7.1` - **Core Libraries**: `12.1.0` - **Kotlinx Libraries**: - `kotlinx-coroutines`: `1.9.0-RC` - `kotlinx-serialization`: `1.7.0` - `kotlinx-datetime`: `0.6.0` - **Networking**: - `ktor`: `2.3.12` - **Dependency Injection**: - `koin`: `3.6.0-Beta4` - `koinComposeMultiplatform`: `1.2.0-Beta4` - **UI/UX**: - `compose-uitooling`: `1.6.8` - **Media Handling**: - `media3Ui`: `1.3.1` - `media3ExoplayerDash`: `1.3.1` - `media3Exoplayer`: `1.3.1` - **Logging**: - `napier`: `2.7.1` - **Database/Storage**: - `sql-delight`: `2.0.2` - **JSON Parsing**: - `json`: `1.6.3` - **Build Configurations**: - `buildConfig`: `5.3.5` - **Cross-Platform Image Loading**: - `kamelImage`: `0.9.6` - **Size Measurement**: - `size`: `0.5.0` - **Voyager Navigation**: `1.1.0-beta02` - **Other Utilities**: - `official-viewmodel`: `2.8.0` - **JavaFX**: `22-ea+16` - **AlertKMP**: `0.0.7` ## Getting Started To use the app, follow these steps: 1. **Create YouTube API V3 credentials:** - Navigate to the [Google Cloud Console](https://console.cloud.google.com/). - Create a new project or select an existing one. - Enable the YouTube Data API v3 for your project. - Generate an API key for your project. 2. **Add the credentials to `composeApp/src/kotlin/com/company/app/utils/`:** - Open the `Constant.kt` file in your project. - Add the following line: `API_KEY=Your_API_VALUE`, replacing `Your_API_VALUE` with the API key generated in step 1. 3. **Ensure API Key Security:** - Restrict your API key to prevent unauthorized usage. - Configure API key restrictions based on IP addresses, referrers, or Android app signatures to enhance security. 4. **Integrate API Key into the App:** - Use the `BuildConfig.API_KEY` variable in your code to access the API key securely. (Removed for Now, due to some bugs) - Ensure that the API key is not hard-coded or exposed directly in your source code. 5. **Download Videos Setup** - Use `yt-dlp` to perform download operation in the applications. - Download the `yt-dlp.exe` file from the official Repository and place that into you Mac, Linux & Windows and just provide it's path in the `actual class VideoDownloader` in each platforms. 6. **Start Using the App:** - Build and run your app to start utilizing the YouTube Data API functionalities. - Implement features such as video search, playback, playlists, and more using the API key. Feel free to reach out if you have any questions or need further assistance! ## 🤝 Connect with Me Let's chat about potential projects, job opportunities, or any other collaboration! Feel free to connect with me through the following channels: [![LinkedIn](https://img.shields.io/badge/LinkedIn-Connect-blue?style=for-the-badge&logo=linkedin)](https://www.linkedin.com/in/khubaibkhandev) [![Twitter](https://img.shields.io/badge/Twitter-Follow-blue?style=for-the-badge&logo=twitter)](https://twitter.com/codespacepro) [![Email](https://img.shields.io/badge/Email-Drop%20a%20Message-red?style=for-the-badge&logo=gmail)](mailto:18.bscs.803@gmail.com) ## 💰 You can help me by Donating [![BuyMeACoffee](https://img.shields.io/badge/Buy%20Me%20a%20Coffee-ffdd00?style=for-the-badge&logo=buy-me-a-coffee&logoColor=black)](https://buymeacoffee.com/khubaibkhan) [![PayPal](https://img.shields.io/badge/PayPal-00457C?style=for-the-badge&logo=paypal&logoColor=white)](https://paypal.me/18.bscs) [![Patreon](https://img.shields.io/badge/Patreon-F96854?style=for-the-badge&logo=patreon&logoColor=white)](https://patreon.com/MuhammadKhubaibImtiaz) [![Ko-Fi](https://img.shields.io/badge/Ko--fi-F16061?style=for-the-badge&logo=ko-fi&logoColor=white)](https://ko-fi.com/muhammadkhubaibimtiaz) ## Download Installers [](https://github.com/KhubaibKhan4/Youtube-Clone-KMP/raw/master/screenshots/youtube-clone-kmp.apk) ## Web Preview If you want to the live version of YouTube Clone KMP then checkout: ```groovy https://khubaibkhan4.github.io/Youtube-Clone-KMP/ ``` ## Android Screen Shots | ![Screenshot 1](https://github.com/KhubaibKhan4/Youtube-Clone-KMP/blob/master/screenshots/1.png) | ![Screenshot 2](https://github.com/KhubaibKhan4/Youtube-Clone-KMP/blob/master/screenshots/9.png) | ![Screenshot 3](https://github.com/KhubaibKhan4/Youtube-Clone-KMP/blob/master/screenshots/59.png) | | --- | --- | --- | | ![Screenshot 4](https://github.com/KhubaibKhan4/Youtube-Clone-KMP/blob/master/screenshots/60.png) | ![Screenshot 5](https://github.com/KhubaibKhan4/Youtube-Clone-KMP/blob/master/screenshots/3.png) | ![Screenshot 6](https://github.com/KhubaibKhan4/Youtube-Clone-KMP/blob/master/screenshots/7.png) | | ![Screenshot 7](https://github.com/KhubaibKhan4/Youtube-Clone-KMP/blob/master/screenshots/8.png) | ![Screenshot 8](https://github.com/KhubaibKhan4/Youtube-Clone-KMP/blob/master/screenshots/9.png) | ![Screenshot 9](https://github.com/KhubaibKhan4/Youtube-Clone-KMP/blob/master/screenshots/10.png) | | ![Screenshot 10](https://github.com/KhubaibKhan4/Youtube-Clone-KMP/blob/master/screenshots/9.png) | ![Screenshot 11](https://github.com/KhubaibKhan4/Youtube-Clone-KMP/blob/master/screenshots/12.png) | ![Screenshot 12](https://github.com/KhubaibKhan4/Youtube-Clone-KMP/blob/master/screenshots/13.png) | | ![Screenshot 13](https://github.com/KhubaibKhan4/Youtube-Clone-KMP/blob/master/screenshots/14.png) | ![Screenshot 14](https://github.com/KhubaibKhan4/Youtube-Clone-KMP/blob/master/screenshots/15.png) | ![Screenshot 15](https://github.com/KhubaibKhan4/Youtube-Clone-KMP/blob/master/screenshots/25.png) | | ![Screenshot 16](https://github.com/KhubaibKhan4/Youtube-Clone-KMP/blob/master/screenshots/26.png) | ![Screenshot 17](https://github.com/KhubaibKhan4/Youtube-Clone-KMP/blob/master/screenshots/27.png) | ![Screenshot 18](https://github.com/KhubaibKhan4/Youtube-Clone-KMP/blob/master/screenshots/28.png) | | ![Screenshot 19](https://github.com/KhubaibKhan4/Youtube-Clone-KMP/blob/master/screenshots/29.png) | ![Screenshot 20](https://github.com/KhubaibKhan4/Youtube-Clone-KMP/blob/master/screenshots/35.png) | ![Screenshot 21](https://github.com/KhubaibKhan4/Youtube-Clone-KMP/blob/master/screenshots/36.png) | | ![Screenshot 22](https://github.com/KhubaibKhan4/Youtube-Clone-KMP/blob/master/screenshots/37.png) | ![Screenshot 23](https://github.com/KhubaibKhan4/Youtube-Clone-KMP/blob/master/screenshots/38.png) | ![Screenshot 24](https://github.com/KhubaibKhan4/Youtube-Clone-KMP/blob/master/screenshots/39.png) | | ![Screenshot 25](https://github.com/KhubaibKhan4/Youtube-Clone-KMP/blob/master/screenshots/40.png) | ![Screenshot 26](https://github.com/KhubaibKhan4/Youtube-Clone-KMP/blob/master/screenshots/46.png) | ![Screenshot 27](https://github.com/KhubaibKhan4/Youtube-Clone-KMP/blob/master/screenshots/49.png) | | ![Screenshot 28](https://github.com/KhubaibKhan4/Youtube-Clone-KMP/blob/master/screenshots/50.png) | ![Screenshot 29](https://github.com/KhubaibKhan4/Youtube-Clone-KMP/blob/master/screenshots/51.png) | ![Screenshot 30](https://github.com/KhubaibKhan4/Youtube-Clone-KMP/blob/master/screenshots/52.png) | | ![Screenshot 31](https://github.com/KhubaibKhan4/Youtube-Clone-KMP/blob/master/screenshots/53.png) | ![Screenshot 32](https://github.com/KhubaibKhan4/Youtube-Clone-KMP/blob/master/screenshots/62.png) | ![Screenshot 33](https://github.com/KhubaibKhan4/Youtube-Clone-KMP/blob/master/screenshots/63.png) | | ![Screenshot 34](https://github.com/KhubaibKhan4/Youtube-Clone-KMP/blob/master/screenshots/65.png) | ![Screenshot 34](https://github.com/KhubaibKhan4/Youtube-Clone-KMP/blob/master/screenshots/69.png) | ![Screenshot 34](https://github.com/KhubaibKhan4/Youtube-Clone-KMP/blob/master/screenshots/70.png) | ![Screenshot 34](https://github.com/KhubaibKhan4/Youtube-Clone-KMP/blob/master/screenshots/71.png) | ## iOS Screen Shots

## Desktop Screen Shots | ![Screenshot 1](https://github.com/KhubaibKhan4/Youtube-Clone-KMP/blob/master/screenshots/4.png) | | --- | | ![Screenshot 2](https://github.com/KhubaibKhan4/Youtube-Clone-KMP/blob/master/screenshots/5.png) | | ![Screenshot 3](https://github.com/KhubaibKhan4/Youtube-Clone-KMP/blob/master/screenshots/6.png) | | ![Screenshot 4](https://github.com/KhubaibKhan4/Youtube-Clone-KMP/blob/master/screenshots/16.png) | | ![Screenshot 5](https://github.com/KhubaibKhan4/Youtube-Clone-KMP/blob/master/screenshots/17.png) | | ![Screenshot 6](https://github.com/KhubaibKhan4/Youtube-Clone-KMP/blob/master/screenshots/18.png) | | ![Screenshot 7](https://github.com/KhubaibKhan4/Youtube-Clone-KMP/blob/master/screenshots/19.png) | | ![Screenshot 8](https://github.com/KhubaibKhan4/Youtube-Clone-KMP/blob/master/screenshots/20.png) | | ![Screenshot 9](https://github.com/KhubaibKhan4/Youtube-Clone-KMP/blob/master/screenshots/21.png) | | ![Screenshot 10](https://github.com/KhubaibKhan4/Youtube-Clone-KMP/blob/master/screenshots/21.png) | | ![Screenshot 11](https://github.com/KhubaibKhan4/Youtube-Clone-KMP/blob/master/screenshots/23.png) | | ![Screenshot 12](https://github.com/KhubaibKhan4/Youtube-Clone-KMP/blob/master/screenshots/24.png) | | ![Screenshot 13](https://github.com/KhubaibKhan4/Youtube-Clone-KMP/blob/master/screenshots/30.png) | | ![Screenshot 14](https://github.com/KhubaibKhan4/Youtube-Clone-KMP/blob/master/screenshots/31.png) | | ![Screenshot 15](https://github.com/KhubaibKhan4/Youtube-Clone-KMP/blob/master/screenshots/32.png) | | ![Screenshot 16](https://github.com/KhubaibKhan4/Youtube-Clone-KMP/blob/master/screenshots/33.png) | | ![Screenshot 17](https://github.com/KhubaibKhan4/Youtube-Clone-KMP/blob/master/screenshots/34.png) | | ![Screenshot 18](https://github.com/KhubaibKhan4/Youtube-Clone-KMP/blob/master/screenshots/41.png) | | ![Screenshot 19](https://github.com/KhubaibKhan4/Youtube-Clone-KMP/blob/master/screenshots/42.png) | | ![Screenshot 20](https://github.com/KhubaibKhan4/Youtube-Clone-KMP/blob/master/screenshots/43.png) | | ![Screenshot 21](https://github.com/KhubaibKhan4/Youtube-Clone-KMP/blob/master/screenshots/44.png) | | ![Screenshot 22](https://github.com/KhubaibKhan4/Youtube-Clone-KMP/blob/master/screenshots/45.png) | | ![Screenshot 23](https://github.com/KhubaibKhan4/Youtube-Clone-KMP/blob/master/screenshots/47.png) | | ![Screenshot 24](https://github.com/KhubaibKhan4/Youtube-Clone-KMP/blob/master/screenshots/48.png) | | ![Screenshot 25](https://github.com/KhubaibKhan4/Youtube-Clone-KMP/blob/master/screenshots/54.png) | | ![Screenshot 26](https://github.com/KhubaibKhan4/Youtube-Clone-KMP/blob/master/screenshots/55.png) | | ![Screenshot 27](https://github.com/KhubaibKhan4/Youtube-Clone-KMP/blob/master/screenshots/56.png) | | ![Screenshot 28](https://github.com/KhubaibKhan4/Youtube-Clone-KMP/blob/master/screenshots/61.png) | | ![Screenshot 29](https://github.com/KhubaibKhan4/Youtube-Clone-KMP/blob/master/screenshots/66.png) | ## Web Screen Shots | ![Screenshot 1](https://github.com/KhubaibKhan4/Youtube-Clone-KMP/blob/master/screenshots/97.png) | | --- | | ![Screenshot 2](https://github.com/KhubaibKhan4/Youtube-Clone-KMP/blob/master/screenshots/98.png) | | ![Screenshot 3](https://github.com/KhubaibKhan4/Youtube-Clone-KMP/blob/master/screenshots/99.png) | | ![Screenshot 4](https://github.com/KhubaibKhan4/Youtube-Clone-KMP/blob/master/screenshots/100.png) | | ![Screenshot 4](https://github.com/KhubaibKhan4/Youtube-Clone-KMP/blob/master/screenshots/101.png) | | ![Screenshot 4](https://github.com/KhubaibKhan4/Youtube-Clone-KMP/blob/master/screenshots/102.png) | | ![Screenshot 4](https://github.com/KhubaibKhan4/Youtube-Clone-KMP/blob/master/screenshots/103.png) | | ![Screenshot 4](https://github.com/KhubaibKhan4/Youtube-Clone-KMP/blob/master/screenshots/104.png) | | ![Screenshot 4](https://github.com/KhubaibKhan4/Youtube-Clone-KMP/blob/master/screenshots/105.png) | | ![Screenshot 4](https://github.com/KhubaibKhan4/Youtube-Clone-KMP/blob/master/screenshots/106.png) | | ![Screenshot 4](https://github.com/KhubaibKhan4/Youtube-Clone-KMP/blob/master/screenshots/107.png) | | ![Screenshot 4](https://github.com/KhubaibKhan4/Youtube-Clone-KMP/blob/master/screenshots/108.png) | ## Server Driven Ui Setup To Setup the Server Driven UI using Firebase. You need to create a new firebase project and add Android, iOS, Web And Desktop inside your project. Make sure to provide the `.json` file in Your `commonMain` & also inside your iOS App as well. Moreover, Provide the `projectId, apiKey, applicationId` inside your `jsMain` & `jvmMain` Modules. ## Star History ![star-history-2024629](https://github.com/KhubaibKhan4/Youtube-Clone-KMP/assets/98816544/5a7ebbcb-94ec-4906-870f-2eab317adb2f) ## Before running! - check your system with [KDoctor](https://github.com/Kotlin/kdoctor) - install JDK 17 on your machine - add `local.properties` file to the project root and set a path to Android SDK there - Make sure to Complete the Installation of Compose Multiplatform Before using this Project. - Official Setup Guide: [![Official KMP Setup Guide]](https://www.jetbrains.com/help/kotlin-multiplatform-dev/multiplatform-setup.html) ### Android To run the application on android device/emulator: - open project in Android Studio and run imported android run configuration To build the application bundle: - run `./gradlew :composeApp:assembleDebug` - find `.apk` file in `composeApp/build/outputs/apk/debug/composeApp-debug.apk` ### Desktop Run the desktop application: `./gradlew :composeApp:run` ### iOS To run the application on iPhone device/simulator: - Open `iosApp/iosApp.xcproject` in Xcode and run standard configuration - Or use [Kotlin Multiplatform Mobile plugin](https://plugins.jetbrains.com/plugin/14936-kotlin-multiplatform-mobile) for Android Studio ### Browser Run the browser application: `./gradlew :composeApp:jsBrowserDevelopmentRun` # Create Native Distributables ## Android - to create .apk file for the Andorid. We simply need to 'build > Build Bundles > Build APK'. ## Desktop - to create Native Distributable for the Desktop Windows, MacOS, Linux. We need to follow the procedure. - 'First of all following inside the 'build.gradle.kts' ' compose.desktop { application { mainClass = "MainKt" nativeDistributions { targetFormats(TargetFormat.Dmg, TargetFormat.Msi, TargetFormat.Deb) packageName = "org.company.app.desktopApp" packageVersion = "1.0.0" description = "YouTube Clone Using Kotlin Multiplatform" copyright = "© 2024 Muhammad Khubaib Imtiaz. All rights reserved." windows { iconFile.set(project.file("src/commonMain/resources/youtube_music.ico")) } macOS { iconFile.set(project.file("src/commonMain/resources/youtube_music.icns")) } linux { iconFile.set(project.file("src/commonMain/resources/youtube_music.png")) } } } } ' - Now simply run the command 'gradle createDistributable or ./gradlew createDistributable' ## JS - for the Js Web App, we simply need to execute the 'gradle jsBrowserWebpack' ## Contribution Guidelines We welcome contributions to the YouTube Clone project! To contribute, please follow these guidelines: - **Reporting Bugs**: If you encounter a bug, please open an issue and provide detailed information about the bug, including steps to reproduce it. - **Suggesting Features**: We encourage you to suggest new features or improvements by opening an issue and describing your idea. - **Submitting Pull Requests**: If you'd like to contribute code, please fork the repository, create a new branch for your changes, and submit a pull request with a clear description of the changes. ## Code of Conduct We expect all contributors and users of the YouTube Clone project to adhere to our code of conduct. Please review the [Code of Conduct](CODE_OF_CONDUCT.md) for details on expected behavior and reporting procedures. ## Project Roadmap Here's a brief overview of our project roadmap: - **Upcoming Features**: We're planning to add support for TV and Wear OS versions in future releases. - **Milestones**: We'll be releasing updates regularly to introduce new features and enhancements. Stay tuned for announcements about upcoming releases. ## Community Resources Join our community to connect with other users and contributors: - **Documentation**: Find more information and resources in our [documentation](https://github.com/KhubaibKhan4/Youtube-Clone-KMP/wiki). - **Forums**: Ask questions and discuss ideas in our [community forums](https://github.com/KhubaibKhan4/Youtube-Clone-KMP/discussions). - **Chat**: Join our community chat on [Slack](https://join.slack.com/t/kotlinmultipl-gr51340/shared_invite/zt-2go24sz06-_lyxM2arRifMqwAPN2EzoA) to chat with other users and contributors. ## Acknowledgments We'd like to thank the following individuals and organizations for their contributions to the YouTube Clone project: - No Contributor Yet. ## FAQs Here are some frequently asked questions about the YouTube Clone project: 1. **How do I run the application on Android?** - Follow the instructions in the README to set up your development environment and run the app on an Android device or emulator. 2. **Can I contribute to the project if I'm new to Kotlin Multiplatform?** - Yes! We welcome contributions from developers of all skill levels. Check out our Contribution Guidelines for more information on how to get started. ## Performance & Optimization Tips To optimize performance in the YouTube Clone project, consider the following tips: - **Lazy Loading**: Implement lazy loading for images and videos to reduce initial load times. - **Cache Optimization**: Use caching strategies to minimize network requests and improve data loading performance. - **Code Profiling**: Profile your code to identify and optimize performance bottlenecks. - **Resource Management**: Ensure efficient use of system resources, such as memory and CPU, to improve overall performance. ## Disclaimer This project is for educational purposes. All the Design Credit Goes to YouTube Official Team.