Back to projects

ViewTube

A modern, feature-rich YouTube client for Android built with Jetpack Compose, leveraging the InnerTube's Backend, and architected for scalability using MVVM and Hilt.

android

Android

kotlin

Kotlin

jetpack-compose

Jetpack Compose

ViewTube project

ViewTube

A modern, feature-rich YouTube client for Android built with Jetpack Compose, leveraging the InnerTube's backend, and architected for scalability using MVVM and Hilt.

ViewTube is a contemporary Android application designed to replicate the core YouTube experience using the unofficial InnerTube API for data sourcing. It serves as a showcase for modern Android development best practices, featuring a fully reactive UI with Jetpack Compose, robust background playback via AndroidX Media3, and a highly modularized codebase for maintainability. The app handles complex media flows, pagination, and local caching seamlessly.

Technology Stack

  • Language: Kotlin
  • Architecture: MVVM (Model-View-ViewModel)
  • UI Framework: Jetpack Compose (Material 3)
  • Dependency Injection: Dagger Hilt
  • Networking: Retrofit (for API communication)
  • Asynchrony: Kotlin Coroutines & Flow
  • Media Playback: AndroidX Media3 (ExoPlayer)
  • Data & Caching: Room (SQLite), Paging 3 (for infinite scroll)
  • Structure: Multi-module Clean Architecture

Key Architecture & Features

  • InnerTube Integration: ViewTube interfaces directly with YouTube's internal InnerTube API, allowing it to fetch video feeds, metadata, music, news, and search results without an official Google Cloud project.
  • Modern UI with Jetpack Compose: The entire application is built declaratively with Compose. This ensures a highly responsive and fluid user interface across all screens, from the dynamic Home feed to specialized Music and News sections.
  • Robust Media3 Playback: The playback experience is powered by AndroidX Media3 (the successor to ExoPlayer). This provides advanced features including seamless background playback, persistent media notifications, and proper audio focus handling.
  • Offline Caching: Room database is utilized to cache feed data and user history, enabling a smoother offline experience and faster load times upon app relaunch.
  • Reactive Data Flow: By strictly adhering to the MVVM pattern and using Kotlin Coroutines and Flow, ViewTube maintains a unidirectional data flow. ViewModels expose UI states that Compose automatically observes, ensuring the UI is always in sync with the underlying data.
  • Infinite Pagination with Paging 3: The Home, Music, and News feeds implement Paging 3 to efficiently load large datasets, providing an infinite scroll experience with minimal network overhead.
  • Multi-Module Structure: The project is organized into a robust multi-module architecture. This separates concerns (e.g., :core:network, :feature:player, :feature:search), improves build times, and enforces clean boundaries between components, making the codebase easier to scale and test.
  • Dependency Injection with Hilt: Hilt simplifies dependency injection throughout the application, managing the lifecycle of ViewModels, Repositories, and Network services.

Application Screens

ScreenResponsibility & Implementation
HomeThe main discovery feed, utilizing Paging 3 to load an endless list of algorithmic video recommendations.
MusicA dedicated section for YouTube Music content, displaying music videos, playlists, and artist information.
NewsA specialized feed aggregating news-related video content using the InnerTube API's topic filtering.
SearchProvides real-time, paginated search results for videos, channels, and playlists, using Retrofit and Paging 3.
PlaybackThe full-screen video player interface. It manages media controls, quality selection, and interfaces with the Media3 playback service.