How apptolast/familyfilmapp works
Main Components
• App (Client-side Android Application):
– UI Layer: Built with Jetpack Compose, includes screens (home, login, groups, movie details, profile, search, recommend, etc.) and UI components (dialogs, cards, navigation bars).
– ViewModel Layer: Implements the MVVM pattern using StateFlow, Coroutines, and exposes state for the views.
– Domain/Use Case Layer: Contains business logic for filtering movie recommendations, handling login/registration flows, and group management.
– Repository Layer: Defines separate repositories (BackendRepository, FirebaseRepository, LocalRepository) that abstract data sources (remote API calls via Retrofit and local data management).
– Network Layer: Makes API calls using Retrofit; includes modules like ApiRoutes, BackendApi, and interceptors (e.g., AuthInterceptor).
– DI/Modularization: Dependency Injection is implemented using Hilt, as seen by the various modules (ApplicationModule, FirebaseModule, GoogleSignInModule, LocalStoreModule, NetworkModule, RepositoryModule) to decouple the components.
• External Services:
– Backend API: Externally hosted REST API built with Express/NodeJS that handles authentication and movie data operations.
– Firebase: Provides authentication (Firebase Auth using email/password and Google Sign-In) and Crashlytics for error reporting.
Relationships and Interactions
• The UI components trigger user actions that are handled by ViewModels.
• ViewModels call Use Cases which encapsulate business logic.
• Use Cases interact with different repositories:
– The BackendRepository accesses the RESTful API (using Retrofit) to handle server-side data.
– The FirebaseRepository interacts with Firebase services to handle user authentication and potentially other user-specific data.
– The LocalRepository may be used for managing cached or persistent data.
• Dependency Injection (via Hilt) wires all these components together, ensuring a loose coupling.
• External interactions include:
– The application sending requests to the backend API (secured using an authentication token acquired via Firebase).
– Firebase handling user identity and providing error reporting through Crashlytics.
Architectural Patterns and Design Principles
• MVVM: Clear separation between view, state management, and business logic.
• Reactive State Management: Use of Flow and Coroutines for updating the UI in response to data changes.
• Dependency Injection: Hilt is used to inject dependencies into components, facilitating testing and modularity.
• Clean Architecture principles by isolating the presentation, domain, and data layers.
Relevant Technologies
• Frontend (Android App): Jetpack Compose, Kotlin, Coroutines, StateFlow, Navigation Component.
• Networking: Retrofit, possibly with Gson for JSON conversion.
• DI: Hilt.
• Firebase APIs: Authentication and Crashlytics.
• Backend Components (External): NodeJS with Express (TypeScript), PostgreSQL, Docker, Render for deployment.
• Detailed labels and notes about the technologies (e.g., “Retrofit for API calls”, “Hilt DI for dependency management”, “Flow & Coroutines for reactive state management”).
• Essential interactions, ensuring that even less visible modules (like custom exception handling, navigation type modules) are indicated as part of the overall system if needed.
• Clear separation between Android-specific logic and external services to give an end-to-end view of how the system components come together.