How paulononaka/the_classic_movies_app_example works
Project Type and Purpose
• This is a full‑stack (multi‑platform) Flutter application using a monorepo structure managed by Melos.
• It targets Android, iOS, and Web, and is composed of three main packages:
• core (shared services, utilities, DI)
• design_system (UI components, themes, i18n)
• movies (feature module: domain, data sources, UI pages)
• The main_app (in apps/) ties everything together, injecting dependencies and launching the UI.
Main Components
• Client Platforms: Android, iOS, Web
• Flutter Engine / MainApp
• Feature Modules (packages):
• Core Module
• DesignSystem Module
• Movies Module
• External Services:
• TMDB REST API
• Sentry (Error Monitoring)
• Firebase (Auth, Analytics, Messaging)
• Local Persistence: Hive DB
• Dependency Injection Container (get_it)
• Navigation Layer (go_router)
Relationships and Data Flows
• User taps UI → Flutter Widget (DesignSystem) → GoRouter → MoviesController
• MoviesController → MoviesRepository (domain) →
○ RemoteDataSource → HTTP calls to TMDB
○ LocalDataSource → Hive local database
• Core services (SentryService, FeatureToggleService, SessionTrackerService) register with DI container; accessed by any module.
• Firebase SDK is initialized at startup (via firebase_options.dart) and used by core/infrastructure.
Architectural Patterns & Design Principles
• Modular Monorepo: clear separation into packages for reuse and isolation.
• Clean architecture within each feature: Presentation → Domain → Data → Infrastructure
• Dependency Injection: all services and repositories registered in get_it at app bootstrap.
• Layered navigation: go_router defines routes in movies/routes.
• Localization: arb files in core/design_system/movies for i18n.
• CI/CD: GitHub Actions pipeline configured via .github/workflows.
Detailed Component Breakdown (to include
• MainApp
• main.dart → initializes Firebase, Sentry, DI container, runs App() widget
• Core Module
• Env (reads .env)
• Services: FeatureToggleService, SentryService, SessionTrackerService
• Logger (mca_logger.dart)
• DesignSystem Module
• UI Components: MovieListItem, AppErrorWidget, LoadingWidget…
• Theme Provider & Extensions
• Localization sub‑module
• Movies Module
• Presentation: movies_page, movies_controller, movie_details_page
• Domain: MoviesRepository interface, DataSource interfaces
• Data: MoviesRepositoryImpl, MoviesRemoteDataSourceImpl (HTTP), MoviesLocalDataSourceImpl (Hive)
• Infrastructure: HiveService, movies_dependencies.dart
• DI registration in movies_dependencies.dart
• External & Persistence
• TMDB API (REST)
• Hive (local DB)
• Sentry (error monitoring)
• Firebase (Analytics, Auth)