How jmancentral/frontendfinanzapp works
Main Components
• User Interface (UI) Layer:
• This includes Android activities (e.g., MainActivity, Dashboard, Login, Registro), fragments (e.g., DashboardFragment, FragmentAlertas, FragmentCategorias, FragmentProyecciones, etc.), and layout resources (in the “res/layout” folder).
• Visualizing each major screen or grouping related screens (e.g., finance summaries, recordatorios, tips, etc.).
• ViewModel Layer:
• The “ViewModelsApiRest” package shows that there are view models for various financial aspects (e.g., AlcanciaViewModel, AlertViewModel, IncomeViewModel, etc.).
• Repository and Data Service Layer:
• The “RepositoriosApiRest” package contains repositories such as AlcanciaRepository, AlertRepository, and others which likely manage RESTful API communications.
• Also, the “Utils” folder contains services (e.g., AuthInterceptor, Cliente, various services like IngresoService, GastoService) that support API calls and network communications.
• Local Data & Persistence:
• The “schemas” directory holds JSON files for “AppDatabase” and DAOS which indicate a local database (or local schema definitions) for storing data.
• This component should be depicted as a database layer accessed by the repositories or directly by some service logic.
• Notificaciones / External Services:
• The “Notificaciones” package includes classes like FCMService, NotificationHelper, and RecordatorioReceiver which are used to receive and manage push notifications (presumably via Firebase Cloud Messaging).
• External Libraries:
Relationships and Interactions
• The UI layer should be diagrammed as the starting point where user actions trigger interactions.
• From the ViewModels, show connections to the Repository layer (“RepositoriosApiRest”), which in turn either fetch data from the remote services (via APIs) or interact with the local database (represented by the schema files).
• Detail that the “Utils” services (including network interceptors and client classes) assist the repositories with secure and proper API communication.
• That the Notificaciones component independently interacts with both the user (via UI notifications) and back-end services (through FCM).
Architectural Patterns and Design Principles
• MVVM Pattern: Clearly label pages (UI layer) linked to view models, which mediate data handling and decisions.
• Repository Pattern: Specify that the repositories are the abstraction layer for API calls and local data management.
• Separation of Concerns: Highlight how each component is responsible for a specific part of the functionality (for example, UI is solely for presentation, the ViewModel for business logic, and repositories for data fetching).
• Integration with External Services: Outline the notification flow from FCM to the app.