How mirarr-app/mirarr works
Project type and purpose
• This is a cross‑platform Flutter application (“Mirarr”) that runs on Android, iOS, Linux and Windows.
• Its goal is to let users browse and watch movies and TV shows by integrating various external feeds and APIs (TMDB, OMDB, RSS feeds, streaming links).
File structure
• Top‑level platform folders:
• android/ – Android specific embedding and Gradle build files
• ios/ – iOS Runner project and Xcode workspace
• linux/, windows/ – Native embedder code, CMake files, plugin registrants
• Core application code lives under lib/:
• lib/functions/ – Pure Dart “service” layer: HTTP fetchers, URL parsing, error dialogs, theming and region providers
• lib/moviesPage/ and lib/seriesPage/ – Domain‑specific pages: UI widgets, view logic, models
• lib/widgets/ – Reusable components common across the whole app (bottom bar, search screen, settings, etc.)
• lib/main.dart – Entry point bootstrapping the Flutter app
• Configuration files: pubspec.yaml, analysis_options.yaml
• Assets: fonts, images in assets/
Insights from the README
• The app has no bespoke backend; it relies on public APIs (TheMovieDB, OMDB, scnsrc RSS, external streaming/link providers).
• Optional TMDB login for personalized features (watchlist, favorites, ratings).
• Open‑source, built via GitHub Actions, available as binaries on releases and AUR.
a. Main components to include
• Platform Embedders (Android, iOS, Linux, Windows) hosting the Flutter engine
• Dart Application Layer split into:
• UI Layer (pages under moviesPage, seriesPage, widgets)
• Business Logic / State (RegionProvider, ThemeProvider, providers if any)
• Data Layer / Service Layer (functions/fetchers, HTTP client)
• External Services:
• TMDB API (movie & TV data, login)
• OMDB API (ratings)
• scnsrc RSS feed (new releases)
• vidsrc / TV Chart / other link providers (external watch/download links)
• Assets (fonts, images)
b. Relationships and interactions
• The Flutter engine calls into platform embedders for native integration (e.g., share dialogs, file system).
• UI Layer issues events and listens to state from Providers.
• Service Layer performs HTTP calls to external APIs & RSS feeds.
• Business Logic coordinates data fetching, caching (if any), error handling, themes and region selection.
• UI displays models returned by service layer, triggers navigation or external link launches.
• Optional TMDB login flow exchanges credentials and stores session tokens.
c. Architectural patterns and design principles
• Layered architecture: presentation → business logic → data services
• Separation of concerns: UI widgets separate from HTTP fetch logic and from platform code
• Dependency injection via Providers (for themes, region, possibly authentication)
• Modular pages: moviesPage vs seriesPage vs shared widgets
d. Key technologies, frameworks or libraries
• Flutter & Dart
• Provider or ValueNotifier for state management
• http or dio for REST/RSS calls
• Platform channels for share_content, external link launching
• TMDB and OMDB public APIs