How unlam-tec-movil/a3-2024-h2-e2 works
Main Components
• UI Layer:
• MainActivity: The entry point that sets up the Android “scaffold”, theme, and navigation.
• Screens (located under ui/screens): Containers that orchestrate the visual components.
• Composables/Components (under ui/components): Reusable visual elements.
• Navigation: NavigationApp and NavigationDestination files that use Jetpack Compose Navigation (NavHost, NavController) to switch between screens.
• ViewModels (under ui/viewmodels): Manage UI state and handle user interactions.
• Domain Layer:
• Domain Models: e.g., CategoryModel, ItemModel, ShoppingListModel (representing aggregates or business entities).
• Use Cases/Services: Business logic classes (like CategoryUseCase, ItemUseCases, ShoppingListsUseCases) that encapsulate the application’s behavior.
• Interfaces (ports) defining business operations that the domain relies on.
• Data Layer:
• Repositories: Interfaces and their default implementations for categories, items, and shopping lists (both local and network).
• Local Storage: Data access objects (DAOs) and entities (using Room) – see packages under data/local.
• Network: API services for external communication (like GooglePlaceApi using Retrofit).
• Dependency Injection (DI): Modules (in both data/di and ui/di) that set up the dependencies — ensuring that the adapters (local/network implementations) are injected into the use cases and viewmodels.
Relationships and Interactions
• Dependency inversion: UI and Data layers depend on abstract interfaces from the Domain, not on concrete implementations.
• The DI / Service Modules components exist across layers to wire the system together.
Architectural Patterns/Design Principles
• Separation of Concerns: Emphasize that the UI layer manages all Android-specific code (activities, navigation, composables) while the Domain remains platform agnostic.
• Dependency Injection: Note the use of DI frameworks (e.g., Hilt or Dagger, as mentioned in the README) to decouple components.
Technologies/Frameworks
• Android / Kotlin as the core language and platform.
• Jetpack Compose for building the UI (composables, screens, view models).
• Room as the local persistence solution.
• Retrofit (or related network libraries) for handling API calls.
• Hilt/Dagger for dependency injection.
• Gradle (with build.gradle.kts and wrapper configurations) for building the project.
• Github Workflows for static analysis (ktlint) and test automation.
Detailed Capturing of Elements
• Testing infrastructure lightly if desired (e.g., indicating where test packages exist) but focus mainly on the three primary layers alongside the DI infrastructure.