How saurabhkaperwan/csx works
1. This repository is a multi-module Kotlin/Android plugin collection, not a single app. Each top-level folder is its own Gradle module with an AndroidManifest.xml and a small set of Kotlin classes, which strongly suggests independent CloudStream-style extensions/providers.
2. The root build files (build.gradle.kts, settings.gradle.kts, Gradle wrapper, GitHub Actions workflow) provide shared build orchestration. The actual runtime logic lives inside each module; there is no central application backend in the repo.
3. The dominant architectural pattern is: a module entrypoint plugin class plus one or more provider classes. Examples include Bollyflix.kt + BollyflixProvider.kt, MoviesDrive.kt + MoviesDriveProvider.kt, VegaMovies.kt + VegaMoviesProvider.kt, and NetflixMirrorPlugin.kt + platform-specific providers. The entrypoint appears to register the extension with the host app.
4. Most modules are source scrapers / stream resolvers. Files like Extractors.kt, CineStreamExtractors.kt, Utils.kt, and CineStreamParser.kt indicate a pipeline that fetches remote pages/APIs, parses site-specific payloads, and turns them into playable sources.
5. Several modules are thin wrappers around a single content site:
- Bollyflix, MoviesDrive, Moviesmod, VegaMovies, and OnlineMoviesHinditProvider
- each keeps its logic localized to site-specific provider and extractor classes
- some modules expose multiple provider variants, which suggests support for multiple mirrors/domains or branded aliases.
6. CineStream is the most architected module. It includes a ProviderRegistry, ApiConstants, separate providers for different metadata/source systems (CineTmdbProvider, CineSimklProvider, CineStreamProvider), a parser, utilities, and a settings package. That points to a composition layer that can switch between providers and drive behavior via user configuration.
7. CineStream also has an explicit settings subsystem (Settings.kt, SettingsDialog.kt, SettingsProviders.kt, SettingsTheme.kt, SettingsWidgets.kt). This is the only module with a dedicated UI/configuration layer, so it likely exposes runtime options such as provider selection, theme, or scraping preferences.
8. NetflixMirrorProvider is the richest domain model in the repo. It contains multiple service-specific providers (NetflixProvider, PrimeVideoProvider, JioHotstarProvider), a plugin entrypoint, storage (NetflixMirrorStorage.kt), and a large entities package. Those entities model the stream domain end-to-end: search, playlists, seasons, episodes, posts, sources, tracks, and metadata.
9. The NetflixMirrorProvider/entities package is an important boundary: it separates remote/API response shapes from the rest of the plugin logic. That suggests a flow of remote fetch → parse/normalize → entity objects → playback/search presentation.
10. GDIndex is structurally simpler and uses a different package root (com.horis.cloudstreamplugins instead of com.megix), implying it is another independent extension with its own maintainer/history rather than a shared library.
11. Across the repo, the external dependencies are not internal services but third-party websites and APIs. The code is organized around accessing remote catalog pages, extracting video links, and in some cases enriching metadata via external services like TMDb and Simkl.
12. There is no evidence of a shared server, database, or cross-module runtime dependency graph. The main boundaries are per-module plugin boundaries, with each module owning its own scraping logic, parsing, and any optional settings or local storage.
13. For an architecture diagram, the highest-value view is: host app → plugin module entrypoint → provider/parser/extractor chain → external streaming site/API. CineStream and NetflixMirrorProvider add side branches for configuration, registry, metadata services, and local storage, while the rest are mostly straight-through scrapers.
14. The README and licensing files emphasize that these are client-side extensions and the project is distributed under GPLv3. Operationally, the repo’s CI likely just builds the Gradle modules and publishes artifacts; there is no deployed runtime service to diagram.
Main entry points: NetflixProvider.kt Service Providers · ProviderRegistry.kt Provider Registry · CineStream.kt CineStream · Bollyflix.kt Bollyflix
Components 25
Build & Host
Root Gradle orchestration and the external CloudStream host boundary.
- Host App · CloudStream-style host that loads extension plugins and consumes their providers.
- Gradle Build · Repository-level Gradle and CI setup for building the module collection.
build.gradle.kts
Simple Extensions
Mostly straight-through plugin modules with site-specific provider/extractor chains.
- Bollyflix · Module entrypoint that registers the Bollyflix extension.
Bollyflix/src/main/kotlin/com/megix/Bollyflix.kt - Bollyflix Provider · Bollyflix scraping and source resolution logic.
Bollyflix/src/main/kotlin/com/megix/BollyflixProvider.kt - Bollyflix Extractors · Remote page and link extraction pipeline for Bollyflix.
Bollyflix/src/main/kotlin/com/megix/Extractors.kt - MoviesDrive · Module entrypoint for the MoviesDrive extension.
MoviesDrive/src/main/kotlin/com/megix/MoviesDrive.kt - MoviesDrive Provider · MoviesDrive catalog and stream lookup logic.
MoviesDrive/src/main/kotlin/com/megix/MoviesDriveProvider.kt - MoviesDrive Extractors · MoviesDrive-specific parsing and source extraction.
MoviesDrive/src/main/kotlin/com/megix/Extractors.kt - Moviesmod · Module entrypoint for the Moviesmod extension.
Moviesmod/src/main/kotlin/com/megix/Moviesmod.kt - Moviesmod Provider · Primary Moviesmod provider implementation.
Moviesmod/src/main/kotlin/com/megix/MoviesmodProvider.kt - VegaMovies · Module entrypoint for the VegaMovies extension.
VegaMovies/src/main/kotlin/com/megix/VegaMovies.kt - Vega Provider · VegaMovies provider layer and branded mirror variants.
VegaMovies/src/main/kotlin/com/megix/VegaMoviesProvider.kt - OnlineMoviesHindi · Module entrypoint for the OnlineMoviesHindi extension.
OnlineMoviesHinditProvider/src/main/kotlin/com/megix/OnlineMoviesHindiPlugin.kt - Hindi Provider · OnlineMoviesHindi scraping and content resolution logic.
OnlineMoviesHinditProvider/src/main/kotlin/com/megix/OnlineMoviesHindiProvider.kt - GDIndex · Independent extension module under a different package root.
GDIndex/src/main/kotlin/com/horis/cloudstreamplugins/GDIndex.kt - GDIndex Provider · Provider logic for GDIndex content access.
GDIndex/src/main/kotlin/com/horis/cloudstreamplugins/GDIndexProvider.kt
CineStream
The most modular extension with registry, settings, parser, and multiple provider backends.
- CineStream · Module entrypoint for the CineStream extension.
CineStream/src/main/kotlin/com/megix/CineStream.kt - Provider Registry · Coordinates selectable providers and runtime routing inside CineStream.
CineStream/src/main/kotlin/com/megix/ProviderRegistry.kt - Cine Providers · CineTmdbProvider, CineSimklProvider, and CineStreamProvider as interchangeable backends.
CineStream/src/main/kotlin/com/megix/CineTmdbProvider.kt - Cine Parser · Parsing, utilities, and extractors for CineStream site and API payloads.
CineStream/src/main/kotlin/com/megix/CineStreamParser.kt - Settings UI · Settings dialog, widgets, theme, and providers for runtime configuration.
CineStream/src/main/kotlin/com/megix/settings/Settings.kt
NetflixMirrorProvider
Rich domain plugin with multiple service providers, persistent storage, and entity models.
- NetflixMirror · Entry module for the NetflixMirrorProvider extension.
NetflixMirrorProvider/src/main/kotlin/com/horis/cloudstreamplugins/NetflixMirrorPlugin.kt - Service Providers · Netflix, Prime Video, and JioHotstar provider implementations.
NetflixMirrorProvider/src/main/kotlin/com/horis/cloudstreamplugins/NetflixProvider.kt - Domain Entities · Search, playlist, episode, source, track, and metadata models.
NetflixMirrorProvider/src/main/kotlin/com/horis/cloudstreamplugins/entities/SearchData.kt - Local Storage · Persistent plugin state and cached configuration/data.
NetflixMirrorProvider/src/main/kotlin/com/horis/cloudstreamplugins/NetflixMirrorStorage.kt
Connections 35
- Gradle Build → Host App: builds plugins for · Gradle/CI produces the extension artifacts consumed by the host.
- Host App → Bollyflix: loads · Host discovers the Bollyflix plugin entrypoint.
- Bollyflix → Bollyflix Provider: registers · Entrypoint wires the provider into the host extension model.
- Bollyflix Provider → Bollyflix Extractors: uses · Provider delegates page/link extraction to helpers.
- Bollyflix Extractors → Host App: fetches from · Scraper pipeline reaches out to external streaming pages and sources.
- Host App → MoviesDrive: loads · Host discovers the MoviesDrive plugin entrypoint.
- MoviesDrive → MoviesDrive Provider: registers · Entrypoint wires the provider.
- MoviesDrive Provider → MoviesDrive Extractors: uses · Provider delegates extraction work.
- MoviesDrive Extractors → Host App: fetches from · External site scraping and source resolution.
- Host App → Moviesmod: loads · Host discovers the Moviesmod plugin entrypoint.
- Moviesmod → Moviesmod Provider: registers · Entrypoint wires the provider.
- Moviesmod Provider → Host App: scrapes · Straight-through content provider reaching remote catalog pages.
- Host App → VegaMovies: loads · Host discovers the VegaMovies plugin entrypoint.
- VegaMovies → Vega Provider: registers · Entrypoint wires site provider variants.
- Vega Provider → Host App: scrapes · Provider resolves mirrors and streaming sources from external sites.
- Host App → OnlineMoviesHindi: loads · Host discovers the OnlineMoviesHindi plugin entrypoint.
- OnlineMoviesHindi → Hindi Provider: registers · Entrypoint wires the Hindi provider.
- Hindi Provider → Host App: scrapes · Provider fetches and resolves external catalog/source pages.
- Host App → GDIndex: loads · Host discovers the GDIndex entrypoint.
- GDIndex → GDIndex Provider: registers · Entrypoint wires the index provider.
- GDIndex Provider → Host App: serves index · Provider exposes indexed remote content to the host.
- Host App → CineStream: loads · Host discovers the CineStream plugin entrypoint.
- CineStream → Provider Registry: initializes · Entrypoint sets up provider routing and selection.
- Provider Registry → Cine Providers: routes to · Registry switches between TMDb, Simkl, and CineStream backends.
- Provider Registry → Cine Parser: parses via · Registry-backed flows normalize payloads through parser/util layers.
- CineStream → Settings UI: exposes · Entrypoint exposes configuration UI and runtime options.
- Settings UI → Provider Registry: configures · Settings drive provider choice and behavior.
- Cine Providers → Host App: calls APIs · Backends query external metadata or site endpoints.
- Cine Parser → Host App: scrapes · Parser and extractors consume remote pages and responses.
- Host App → NetflixMirror: loads · Host discovers the NetflixMirror plugin entrypoint.
- NetflixMirror → Service Providers: registers · Entrypoint wires the service-specific providers.
- Service Providers → Domain Entities: maps to · Providers normalize remote responses into domain entities.
- Service Providers → Local Storage: persists · Providers and plugin state use local storage.
- Local Storage → Domain Entities: stores · Cached state follows the same domain model boundary.
- Service Providers → Host App: queries services · Providers fetch from external streaming catalogs and APIs.