How alecorlo1314/finankey works
1. Repository shape
- This is a .NET MAUI cross-platform mobile/desktop app organized in a layered style: Presentation (FinanzasApp), Application (FinanzasApp.Aplicacion), Domain (FinanzasApp.Domain), and Infrastructure (FinanzasApp.Infrastructure).
- The structure is close to Clean Architecture / CQRS, with UI calling application use cases through a mediator, and infrastructure providing persistence and device/service integrations.
2. Presentation layer (FinanzasApp)
- Contains the MAUI entry points (App.xaml, MauiProgram.cs, AppShell.xaml) plus the main UI.
- The UI is split into Pages/Vistas and ViewModels, indicating an MVVM architecture.
- Main screens are centered around Dashboard, Tarjetas (cards/accounts), Transacciones, Configuración, and LoginBiometrico.
- Convertidores and Modelos support UI binding and presentation-specific shaping of data.
3. Application layer (FinanzasApp.Aplicacion)
- This is where the app’s use cases live.
- It is organized by domain area:
- Tarjetas with commands and queries plus handlers.
- Transacciones with command/query abstractions.
- DTOs define the data contract between application and UI, such as:
- TarjetaResumenDto, TarjetaFormDto
- TransaccionResumenDto, TransaccionFormDto
- financial summary DTOs like ResumenFinancieroDto, ResumenCorteDto, GraficaCategoriaDto
- There is a local IMediator interface, showing the application layer expects message-based invocation rather than direct service calls.
4. Domain layer (FinanzasApp.Domain)
- Holds the core business model:
- Entities: Tarjeta, Transaccion
- Enumerations for domain categorization/rules
- It also defines the key abstractions the rest of the system depends on:
- IRepositorios for persistence access
- IServicioBiometrico for biometric authentication
- IServicioPrediccion for predictive/ML-related behavior
- This layer is intentionally free of UI and platform concerns.
5. Infrastructure layer (FinanzasApp.Infrastructure)
- Implements the domain abstractions and connects the app to external capabilities.
- Persistencia/ContextoBD.cs suggests a database-backed persistence model.
- Persistencia/Repositorios contains repository implementations used by application handlers.
- Biometria/ServicioBiometricoMaui.cs implements biometric authentication through device/runtime APIs.
- Prediccion/ServicioPrediccionOnnx.cs indicates an ONNX-based prediction service, likely used for financial categorization or forecasting.
6. Core dependency flow
- The main runtime flow is: Page → ViewModel → Mediator/Application handler → Repository/Service → Database or device service.
- Responses flow back as DTOs to the ViewModel, which binds them to the page.
- This keeps the UI decoupled from persistence and from platform-specific features.
7. Tarjetas bounded context
- The largest feature area is cards/accounts.
- It includes:
- CRUD commands: create, update, delete
- Queries: get all, get by id, summary, and financial/cut summaries
- A service for period/cut-date logic (Servicios/PeriodoCorte.cs, ServicioPeriodoCorte.cs)
- This suggests the app models card billing cycles and dashboard-style financial overviews, not just simple record storage.
8. Transacciones bounded context
- Transaction handling is separated from cards and includes:
- command/query types
- a view model for forms, global transaction listing, and grouped movements
- GrupoTransacciones in the UI layer suggests transactions are grouped for display or analysis, likely by category/date/card.
- The presence of TransaccionesGlobalPage indicates a cross-card/global transaction view in addition to per-card views.
9. Dashboard and analytics
- The dashboard is fed by summary DTOs and likely combines data from cards and transactions.
- GraficaCategoriaDto and ResumenFinancieroDto indicate the app presents aggregated financial metrics and category breakdowns, not only transactional CRUD.
- This is the main read-only analytics surface in the app.
10. Configuration and authentication
- Configuracion is a separate feature area in both UI and ViewModel layers, suggesting user preferences or app settings are handled independently.
- LoginBiometricoPage plus IServicioBiometrico show authentication can use device biometrics rather than only password-based login.
- This is a notable boundary between the app and the device/platform layer.
11. Cross-platform deployment
- The repo includes platform folders for Android, iOS, Windows, and MacCatalyst under both the MAUI app and the other projects.
- This confirms the app is intended to run cross-platform, with platform-specific startup/configuration where required.
- The architecture itself stays shared, while platform folders isolate OS-specific bootstrapping and capabilities.
12. What to show in an architecture diagram
- Draw three main layers: Presentation, Application, Domain, with Infrastructure beneath them as the implementation layer.
- Show two major business flows: Tarjetas and Transacciones, each with commands/queries and DTOs.
- Include cross-cutting integrations for persistence, biometrics, and prediction/ONNX.
- Mark the MAUI shell/pages as the user-facing entry point, and the mediator as the central application dispatch mechanism.
Main entry points: IMediator.cs Mediator · Tarjetas Tarjetas Use Cases · Transacciones Transacciones Use Cases · IRepositorios.cs Domain Ports
Components 24
Presentation
MAUI UI, shell, pages, and MVVM view models
- App Shell · MAUI application bootstrap and navigation shell
FinanzasApp/AppShell.xaml - Dashboard VM · Dashboard state and summary bindings
FinanzasApp/ViewModels/DashboardViewModel.cs - Tarjetas VM · Card/account listing and navigation logic
FinanzasApp/ViewModels/Tarjetas/TarjetasViewModel.cs - Transacciones VM · Transaction browsing and grouping logic
FinanzasApp/ViewModels/Transacciones/TransaccionesViewModel.cs - Config VM · Settings and configuration bindings
FinanzasApp/ViewModels/Configuracion/ConfiguracionViewModel.cs - Tarjeta Form VM · Create and edit card/account form state
FinanzasApp/ViewModels/Tarjetas/TarjetaFormViewModel.cs - Transaccion Form VM · Create and edit transaction form state
FinanzasApp/ViewModels/Transacciones/TransaccionFormViewModel.cs - Biometric Login · Login surface using device biometrics
FinanzasApp/Vistas/LoginBiometricoPage.xaml - Dashboard · Main financial overview screen
FinanzasApp/Vistas/DashboardPage.xaml - Tarjetas · Cards/accounts list and detail entry point
FinanzasApp/Vistas/Tarjetas/TarjetasPage.xaml - Transacciones · Transaction list and movement views
FinanzasApp/Vistas/TransaccionesGlobalPage.xaml - Configuracion · App settings screen
FinanzasApp/Vistas/Configuracion/ConfiguracionPage.xaml
Application
Use cases, commands, queries, DTOs, and dispatching
- Mediator · Application message dispatcher
FinanzasApp.Aplicacion/Interfaces/IMediator.cs - Tarjetas Use Cases · Card/account commands, queries, handlers, and period logic
FinanzasApp.Aplicacion/Tarjetas - Transacciones Use Cases · Transaction commands and queries
FinanzasApp.Aplicacion/Transacciones - App DTOs · Data transfer objects for summaries, forms, and analytics
FinanzasApp.Aplicacion/DTOs
Domain
Core entities and abstractions
- Tarjeta · Card/account aggregate
FinanzasApp.Domain/Entidades/Tarjeta.cs - Transaccion · Financial movement entity
FinanzasApp.Domain/Entidades/Transaccion.cs - Domain Ports · Repository and service abstractions consumed by application and infrastructure
FinanzasApp.Domain/Interfaces/IRepositorios.cs
Infrastructure
Persistence and device/service implementations
- DB Context · Database-backed persistence context
FinanzasApp.Infrastructure/Persistencia/ContextoBD.cs - Repositories · Concrete repository implementations
FinanzasApp.Infrastructure/Persistencia/Repositorios/Repositorios.cs - Biometric Service · MAUI biometric authentication implementation
FinanzasApp.Infrastructure/Biometria/ServicioBiometricoMaui.cs - Prediction Service · ONNX-based prediction implementation
FinanzasApp.Infrastructure/Prediccion/ServicioPrediccionOnnx.cs - Mediator Impl · Concrete mediator wiring handlers to services
FinanzasApp.Infrastructure/Mediador.cs
Connections 35
- App Shell → Dashboard: navigates to · Shell exposes the main app surfaces
- App Shell → Tarjetas: navigates to · Shell routes into cards area
- App Shell → Transacciones: navigates to · Shell routes into transactions area
- App Shell → Configuracion: navigates to · Shell routes into settings
- Dashboard → Dashboard VM: binds · Page renders dashboard state from view model
- Tarjetas → Tarjetas VM: binds · Cards page is driven by its view model
- Transacciones → Transacciones VM: binds · Transaction page is driven by its view model
- Configuracion → Config VM: binds · Settings page is driven by its view model
- Tarjetas → Tarjeta Form VM: opens form · Card UI creates and edits cards
- Transacciones → Transaccion Form VM: opens form · Transaction UI creates and edits movements
- Biometric Login → Biometric Service: authenticates via · Biometric login delegates to device service
- Dashboard VM → Mediator: queries · Dashboard requests summaries through mediator
- Tarjetas VM → Mediator: queries/commands · Cards view model dispatches use cases
- Transacciones VM → Mediator: queries/commands · Transactions view model dispatches use cases
- Config VM → Mediator: reads state · Settings view model may load or persist configuration
- Tarjeta Form VM → Mediator: submits · Card form sends create/update commands
- Transaccion Form VM → Mediator: submits · Transaction form sends create/update commands
- Mediator → Tarjetas Use Cases: dispatches · Mediator routes card/account use cases
- Mediator → Transacciones Use Cases: dispatches · Mediator routes transaction use cases
- Tarjetas Use Cases → App DTOs: returns · Card use cases produce summary and form DTOs
- Transacciones Use Cases → App DTOs: returns · Transaction use cases produce DTOs and summaries
- Tarjetas Use Cases → Domain Ports: depends on · Use cases call through repository and service abstractions
- Transacciones Use Cases → Domain Ports: depends on · Use cases read/write through domain ports
- Tarjetas Use Cases → Tarjeta: operates on · Card handlers work on card entities
- Transacciones Use Cases → Transaccion: operates on · Transaction handlers work on movement entities
- Repositories → DB Context: persists with · Repositories use the database context
- Repositories → Domain Ports: implements · Infrastructure satisfies repository abstraction
- Biometric Service → Domain Ports: implements · Biometric service satisfies domain abstraction
- Prediction Service → Domain Ports: implements · Prediction service satisfies domain abstraction
- Mediator Impl → Tarjetas Use Cases: invokes · Concrete mediator executes card handlers
- Mediator Impl → Transacciones Use Cases: invokes · Concrete mediator executes transaction handlers
- Tarjetas Use Cases → Repositories: reads/writes · Card use cases persist through repositories
- Transacciones Use Cases → Repositories: reads/writes · Transaction use cases persist through repositories
- Tarjetas Use Cases → Prediction Service: may use · Card workflows can leverage prediction logic
- Dashboard VM → App DTOs: consumes · Dashboard binds to financial summary DTOs