Skip to content

Repository files navigation

StreamHub Banner

Typing SVG

Platform Android Kotlin Jetpack Compose Media3 ExoPlayer Firebase MIT License


⚑ Overview

StreamHub is a bleeding-edge, high-performance native Android media streaming application built with Kotlin 2.0, Jetpack Compose (Material 3), and AndroidX Media3 ExoPlayer.

Engineered from the ground up for low latency, zero-login instant playback, aggressive byte-range disk caching, and a multi-season Story Arc Creator Studio with 1-click REST API batch ingestion.


✨ Key Highlights & Features

πŸš€ Feature πŸ’‘ Description
⚑ Turbo HTTP Progressive Engine Sub-second playback initialization with byte-range requests and automatic multi-gigabyte disk caching (SimpleCache).
🍿 Slate Glassmorphism UI Netflix & Crunchyroll inspired Jetpack Compose interface with Hero Carousels, fluid category pills, and dynamic ambient glows.
🎬 Multi-Arc Story Hub Dedicated Arc-Level episode manager with automatic missing episode gap detection, 1-click F2L REST batch importer, and snippet insertion.
🎧 Dual-Audio & Subtitle Master Embedded MKV multi-audio track switcher, subtitle track selector with audio/sub delay sync, and ASS/SSA anime typography styling.
πŸ“Ί Advanced Player HUD Fluid seekbar with chapter markers, 3-zone swipe gestures (brightness, volume boost up to 200%), hold-to-2x, pinch-to-zoom, and Picture-in-Picture.
🏷️ Real-time MediaInfo Badges Dynamic resolution and codec badges (4K UHD, 1080p FHD, x264/AVC, HEVC/x265, Dual Audio, ESub, File Size).
πŸ“₯ Background Download Manager Multi-threaded offline file downloads with progress notifications and local playback support.
🎨 Dynamic Theming & Preferences 7 accent themes (AMOLED dark mode), structured preferences, volume normalization, and 1-click JSON Backup & Restore.
πŸ”’ VIP Access Gate & Admin Studio Private community gate on launch with secret 5-tap gesture unlock for Creator Studio in-app publishing.

πŸ› οΈ Architecture & Tech Stack

graph TD
    A[UI Presentation Layer: Jetpack Compose] --> B[ViewModel State Flows]
    B --> C[Player Engine: Media3 ExoPlayer + CacheManager]
    B --> D[Data Layer: Repository & Local Room DB]
    D --> E[Cloud Firestore & TMDB / MAL REST APIs]
    C --> F[Direct HTTP Byte-Range Caching Engine]
Loading
  • Language: Kotlin 2.0+ (Coroutine-first, Dispatchers.IO isolation)
  • UI Framework: Pure Jetpack Compose with Material 3 Design Tokens
  • Video Engine: AndroidX Media3 ExoPlayer (media3-exoplayer, media3-ui, media3-datasource)
  • Metadata Database: Firebase Cloud Firestore (firebase-firestore-ktx)
  • Networking: Retrofit 2 + OkHttp3 + Gson
  • Metadata Resolvers: TMDB API v3 + Official MyAnimeList REST API v2 + Jikan Global Fallback
  • Image Pipeline: Coil Compose with disk and memory cache
  • Security: AndroidX Security Crypto (EncryptedSharedPreferences)

🎬 Creator Studio & In-App Publishing

StreamHub includes a built-in Creator Studio for catalog owners:

  • 1-Click F2L REST API Importer: Paste any batch link or ID (/batch/...) to ingest 300+ episodes across all arcs in seconds.
  • Smart Link & ID Resolver: Paste direct MyAnimeList (https://myanimelist.net/anime/...) or TMDB (https://www.themoviedb.org/tv/...) URLs to auto-fetch high-res posters, banners, studios, cast, and trailers with 100% accuracy.
  • Story Arc Episode Manager: Long-press any Story Arc in the sheet to inspect, edit JSON, detect missing episode gaps, and re-order episodes.

πŸ”’ Private Access & Maintainer Contact

StreamHub includes a private community access gate on first launch. If you need an access invite or want to connect with the maintainer:

Telegram Support


β˜• Support & Donations

If you enjoy StreamHub and want to support high-speed streaming nodes, server hosting costs, and ongoing development:

πŸ’° Crypto Donations (Binance / Web3):

  • USDT / USDC (BNB Smart Chain - BEP20):
    
    
  • USDT (Tron - TRC20):
    
    

πŸ’¬ Or reach out on Telegram @Londe_Lapate for sponsorship or alternative payment methods.


🍴 Forking & Creating Your Own Custom App

StreamHub is designed so anyone can fork the repository and launch their own customized media streaming app. Follow these steps to configure your fork:

1. Database Setup (Firebase & Supabase)

  • Firebase Cloud Firestore (Default & Out-of-the-Box):
    1. Create a free project on the Firebase Console.
    2. Add an Android app with your package name (e.g. com.streamhub.app).
    3. Enable Cloud Firestore in test or production mode.
    4. Download google-services.json and place it inside the app/ folder:
      StreamHub/app/google-services.json
      
  • Supabase (Alternative Backend):
    • If you prefer to use Supabase instead of Firebase, you can implement a custom repository adapter in app/.../data/repository/ to map your tables.
    • Alternatively, feel free to open a GitHub Issue to request official out-of-the-box Supabase integration!

2. Configure API Keys (local.properties)

Create or edit local.properties in the root directory with your free metadata API keys:

# Free API key from https://www.themoviedb.org/settings/api (For movies & TV series metadata & posters)
streamhub.tmdb_api_key=YOUR_TMDB_API_KEY

# Free Client ID from https://myanimelist.net/apiconfig (For anime metadata & posters)
streamhub.mal_client_id=YOUR_MAL_CLIENT_ID

3. Set Your Admin & VIP Passwords (SHA-256 Security)

StreamHub uses cryptographic one-way SHA-256 hashing in code so that plaintext passwords are never stored in GitHub Secrets or exposed in the compiled APK binary.

  1. Generate the SHA-256 hash for your desired password or PIN:

    • Linux / macOS:
      echo -n "YourSecretPassword" | sha256sum
    • Windows PowerShell:
      [BitConverter]::ToString([System.Security.Cryptography.SHA256]::Create().ComputeHash([System.Text.Encoding]::UTF8.GetBytes("YourSecretPassword"))).Replace("-","").ToLower()
    • Or use any online SHA-256 calculator.
  2. Update the code hashes:

    • Creator Studio Admin Password (app/src/main/java/com/streamhub/app/data/AdminManager.kt):
      const val MASTER_PASSWORD_SHA256 = "your_generated_sha256_hash_here"
    • Community / Friends VIP Access Code (app/src/main/java/com/streamhub/app/data/AccessGateManager.kt):
      private const val VIP_PERMANENT_CODE_SHA256 = "your_generated_sha256_hash_here"

4. Personalize App Branding

  • App Name: Change <string name="app_name"> in app/src/main/res/values/strings.xml.
  • Package ID: Change applicationId in app/build.gradle.kts.
  • App Icons: Replace launcher icons in app/src/main/res/mipmap-*/.

5. Automated CI/CD Releases via GitHub Actions (Optional)

If you want your fork to automatically build signed release APKs on push:

  1. In your fork, navigate to Settings > Secrets and variables > Actions.
  2. Add the following repository secrets:
    • FIREBASE_GOOGLE_SERVICES_JSON: Base64 encoded string or raw content of google-services.json
    • RELEASE_KEYSTORE_BASE64: Base64 encoded .jks or .keystore file
    • RELEASE_KEYSTORE_PASSWORD, RELEASE_KEY_ALIAS, RELEASE_KEY_PASSWORD: Keystore signing credentials
    • STREAMHUB_TMDB_API_KEY: Your TMDB API key
    • STREAMHUB_MAL_CLIENT_ID: Your MyAnimeList Client ID

(Notice: No admin password secret is needed in GitHub Actions β€” authentication is handled securely via SHA-256 in code).


πŸ“¦ How to Build & Run Locally

Prerequisites

  • JDK 17 or 21
  • Android SDK 34/35 (Min SDK 24, Target SDK 35)

1. Clone Repository

git clone https://github.com/WorkerOfArea51/StreamHub.git
cd StreamHub

2. Build Debug APK

./gradlew assembleDebug

3. Build Signed Release APK

./gradlew assembleRelease

4. Install & Launch via ADB

adb install -r app/build/outputs/apk/debug/app-debug.apk
adb shell am start -n com.streamhub.app/.MainActivity

πŸ“„ License

This project is licensed under the MIT License.

Crafted with ❀️ by WorkerOfArea51 and the StreamHub Community.

About

🎬 Next-gen ultra-high-performance native Android media streaming ecosystem built with Kotlin 2.0, Jetpack Compose, and Media3 ExoPlayer. Featuring Multi-Arc Creator Studio, aggressive byte-range disk caching & offline downloads.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages