Skip to content

Repository files navigation

SKT Flow — Online Music Streaming App

SKT Flow is a complete, production-ready Android online music streaming application designed to stream audio directly from YouTube using the NewPipe Extractor. Inspired by premium modern streaming applications, it delivers high-quality, fast, and buffer-free audio streams inside an elegant Material 3 obsidian dark theme.

⚠️ Important License & Usage Context

This application extracts audio streams from YouTube using an unofficial extraction library (NewPipe Extractor) and is intended strictly for personal/educational use only.

Due to YouTube's Terms of Service (ToS) regarding content extraction and streaming outside of approved API channels, this app:

  • MUST NOT be distributed on the Google Play Store or any public app marketplace.
  • MUST NOT be used for any commercial or monetized purposes.
  • Is provided as-is under educational fair use guidelines.

Key Features

  1. YouTube Audio Extraction (via NewPipe Extractor):
    • Dynamically searches and pulls audio-only stream URLs from YouTube.
    • Automatically recovers and re-fetches streams if they expire mid-playback.
  2. Media3 ExoPlayer Audio Engine:
    • Integrates background audio playback with a persistent foreground MediaSessionService.
    • Offers lock screen and notification controls out of the box.
    • Restores the last-played song and respects audio focus state changes.
  3. Pristine Jetpack Compose UI (Material 3):
    • Customized Obsidian Cosmic Dark design theme with high-contrast glowing elements.
    • Persistent MiniPlayer anchoring above the bottom navigation tabs.
    • Rich interactive sliders, sleep timers, and custom playback speed modifiers.
  4. Local Room Database Cache:
    • Caches search histories, recently played songs, and user-defined playlists.

Architectural & Technical Stack

  • Architecture: Model-View-ViewModel (MVVM) + Repository Pattern + Clean Architecture.
  • Dependency Management: Centralized Gradle Version Catalog (libs.versions.toml).
  • Data Storage: Jetpack Room for tabular caches/playlists; Preferences DataStore for playback parameters.
  • Image Loading: Coil for rapid, cached thumbnail image loading.
  • Concurrency: Kotlin Coroutines and Flows for non-blocking reactive data emissions.

🔒 Firebase Console Setup

To connect and utilize the production-grade Firebase Authentication and Cloud Firestore features:

  1. Create Firebase Project:

    • Visit the Firebase Console and create a new project.
    • Add an Android app with package name: com.aistudio.sktflow.music.
    • Download the generated google-services.json and place it in the /app/ directory of your project.
  2. Enable Authentication Providers:

    • Navigate to Build > Authentication > Sign-in method and enable:
      • Google: Enable. Ensure you add your SHA-1 and SHA-256 fingerprints in the Project Settings.
      • Phone Number: Enable. Configure reCAPTCHA/Play Integrity API for verification fallbacks.
      • Email/Password: Enable both Email/Password and Email Link (passwordless sign-in).
  3. Configure Deep Linking (for Passwordless Email Link):

    • Configure Firebase Dynamic Links / App Links in the Firebase console.
    • White-list the redirect URL domain in your Firebase console authentication settings.
  4. Enable Cloud Firestore:

    • Navigate to Build > Firestore Database and click Create database in Production Mode.
    • Apply the following Firestore Security Rules to secure user-specific data reads/writes:
rules_version = '2';
service cloud.firestore {
  match /databases/{database}/documents {
    match /users/{userId} {
      allow read, write: if request.auth != null && request.auth.uid == userId;
      
      match /playlists/{playlistId} {
        allow read, write: if request.auth != null && request.auth.uid == userId;
      }
      match /favorites/{videoId} {
        allow read, write: if request.auth != null && request.auth.uid == userId;
      }
      match /history/{historyId} {
        allow read, write: if request.auth != null && request.auth.uid == userId;
      }
    }
  }
}
  1. Enable Offline Sync:
    • Offline-first cache syncing is enabled automatically in the repository layers via Firestore's built-in offline cache engine.