How charlyiii/dragonballapp works
Main Components
• App Module: Acts as the Android application entry point. It may manage global configurations and app-level initializations (e.g., setting up dependency injection with Dagger Hilt).
• UI Module: Contains all presentation logic, including the screens, fragments, ViewModels (MVVM), UI components (Compose Views), and resource files. It is responsible for visual representation and user interactions.
• Domain Module: Implements the core business logic. This layer includes the models, use cases, repositories' interfaces, and domain utilities (e.g., Either for error handling). It is independent of framework-specific implementations.
• Data Module: Provides concrete implementations of repositories and data sources. It manages data interactions such as network calls using Retrofit and integration with Firebase (for the real-time database and storage). This module includes data transfer objects (DTOs), network configuration, service definitions, and dependency injection modules for wiring up data sources.
Relationships and Interactions
• The UI layer communicates with the Domain layer via ViewModels. ViewModels request use case executions from the Domain module that encapsulate business logic.
• The Domain layer acts as a mediator, invoking repository interfaces. These interfaces are concretely implemented inside the Data module.
• The Data module is responsible for fetching and transforming data from remote APIs (using Retrofit) and Firebase services. It exposes the results back through the system (often wrapped in domain models or error representations).
• Dependency injection with Dagger Hilt connects these layers while minimizing direct dependencies.
Architectural Patterns and Design Principles
• Clean Architecture: Focuses on separation of concerns and dependency inversion. The Domain layer is central and independent of both the UI and Data layers.
• MVVM (Model-View-ViewModel): Facilitates the separation between the UI and business logic. Use StateFlows to propagate data changes.
• Modular Structure: The project is broken into clear modules (app, ui, domain, data), which is reflected in the file tree.
Relevant Technologies, Frameworks, and Libraries
• Android and Android Studio
• Kotlin as the programming language
• Retrofit for managing network API requests
• Firebase RealTime Database and Firebase Storage for data persistence and asset management
• Dagger Hilt for dependency injection
• Clean Architecture & MVVM for software structure
• Gradle for build configuration and dependency management
• Drill down into each module if needed:
– For the UI layer, split out components such as activities, fragments, and ViewModels.
– For the Domain layer, include blocks for models, use cases, and repository interfaces.
– For the Data layer, include networking, repositories, and data sources.
• External dependencies (e.g., Retrofit, Firebase) and how they interact with the internal layers.