# andreluizam/cote-ja-maui architecture

> Architecture diagram of the GitHub repository andreluizam/cote-ja-maui, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-16). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/andreluizam/cote-ja-maui
- Repository: https://github.com/andreluizam/cote-ja-maui

## Overview

Cote Já is a .NET MAUI currency-quotation app. The main workflow is selecting a currency and period, fetching current and historical quotes, displaying the current value, and building a price-history chart. The view constructs the view model; the view model owns quote retrieval and chart preparation. README documents AwesomeAPI and Microcharts, while the excerpts show the service requests and chart construction. The chart and model details are not independently sampled beyond the shown view-model and quote code.

Main entry points: [`CoteAqui/ViewModel/CotacaoViewModel.cs`](https://github.com/andreluizam/cote-ja-maui/blob/master/CoteAqui/ViewModel/CotacaoViewModel.cs) (Quote view model), [`CoteAqui/Api/CotacaoService.cs`](https://github.com/andreluizam/cote-ja-maui/blob/master/CoteAqui/Api/CotacaoService.cs) (Quote service), [`CoteAqui/Views/PaginaPrincipal.xaml.cs`](https://github.com/andreluizam/cote-ja-maui/blob/master/CoteAqui/Views/PaginaPrincipal.xaml.cs) (Main page), [`CoteAqui/Platforms/Tizen/Main.cs`](https://github.com/andreluizam/cote-ja-maui/blob/master/CoteAqui/Platforms/Tizen/Main.cs) (Tizen entry point)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["App interface"]
  node_main_view["Main page"]
  node_view_model["Quote view model"]
end

subgraph group_quotes["Quote retrieval"]
  node_quote_service["Quote service<br/>[CotacaoService.cs]"]
  node_awesome_api["AwesomeAPI"]
  node_quote_data["Quote data<br/>[Cotacao.cs]"]
  node_currency_options["Currency options<br/>[Moedas.cs]"]
end

subgraph group_presentation["Quote presentation"]
  node_current_value["Current quote display"]
  node_history_chart["History chart"]
end

subgraph group_startup["MAUI startup"]
  node_maui_bootstrap["MAUI bootstrap<br/>[MauiProgram.cs]"]
  node_tizen_entry["Tizen entry point<br/>[Main.cs]"]
end

node_user(("User"))

node_user -.->|"uses"| node_main_view
node_main_view -->|"sets binding context"| node_view_model
node_view_model -->|"creates options"| node_currency_options
node_view_model -->|"requests quotes"| node_quote_service
node_quote_service -->|"fetches quotes"| node_awesome_api
node_quote_service -->|"deserializes into"| node_quote_data
node_view_model -->|"formats current quote"| node_current_value
node_view_model -->|"builds chart"| node_history_chart
node_tizen_entry -->|"creates app"| node_maui_bootstrap

click node_main_view "https://github.com/andreluizam/cote-ja-maui/blob/master/CoteAqui/Views/PaginaPrincipal.xaml.cs"
click node_view_model "https://github.com/andreluizam/cote-ja-maui/blob/master/CoteAqui/ViewModel/CotacaoViewModel.cs"
click node_quote_service "https://github.com/andreluizam/cote-ja-maui/blob/master/CoteAqui/Api/CotacaoService.cs"
click node_quote_data "https://github.com/andreluizam/cote-ja-maui/blob/master/CoteAqui/Models/Cotacao.cs"
click node_currency_options "https://github.com/andreluizam/cote-ja-maui/blob/master/CoteAqui/Models/Moedas.cs"
click node_current_value "https://github.com/andreluizam/cote-ja-maui/blob/master/CoteAqui/ViewModel/CotacaoViewModel.cs"
click node_history_chart "https://github.com/andreluizam/cote-ja-maui/blob/master/CoteAqui/ViewModel/CotacaoViewModel.cs"
click node_maui_bootstrap "https://github.com/andreluizam/cote-ja-maui/blob/master/CoteAqui/MauiProgram.cs"
click node_tizen_entry "https://github.com/andreluizam/cote-ja-maui/blob/master/CoteAqui/Platforms/Tizen/Main.cs"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_main_view,node_view_model,node_user toneBlue
class node_quote_service,node_awesome_api,node_quote_data,node_currency_options toneAmber
class node_current_value,node_history_chart toneMint
class node_maui_bootstrap,node_tizen_entry toneRose
```

## Components

### App interface

- [Main page](https://github.com/andreluizam/cote-ja-maui/blob/master/CoteAqui/Views/PaginaPrincipal.xaml.cs): `CoteAqui/Views/PaginaPrincipal.xaml.cs`
- [Quote view model](https://github.com/andreluizam/cote-ja-maui/blob/master/CoteAqui/ViewModel/CotacaoViewModel.cs): `CoteAqui/ViewModel/CotacaoViewModel.cs`

### Quote retrieval

- [Quote service](https://github.com/andreluizam/cote-ja-maui/blob/master/CoteAqui/Api/CotacaoService.cs): `CoteAqui/Api/CotacaoService.cs`
- **AwesomeAPI**
- [Quote data](https://github.com/andreluizam/cote-ja-maui/blob/master/CoteAqui/Models/Cotacao.cs): `CoteAqui/Models/Cotacao.cs`
- [Currency options](https://github.com/andreluizam/cote-ja-maui/blob/master/CoteAqui/Models/Moedas.cs): `CoteAqui/Models/Moedas.cs`

### Quote presentation

- [Current quote display](https://github.com/andreluizam/cote-ja-maui/blob/master/CoteAqui/ViewModel/CotacaoViewModel.cs): `CoteAqui/ViewModel/CotacaoViewModel.cs`
- [History chart](https://github.com/andreluizam/cote-ja-maui/blob/master/CoteAqui/ViewModel/CotacaoViewModel.cs): `CoteAqui/ViewModel/CotacaoViewModel.cs`

### MAUI startup

- [MAUI bootstrap](https://github.com/andreluizam/cote-ja-maui/blob/master/CoteAqui/MauiProgram.cs): `CoteAqui/MauiProgram.cs`
- [Tizen entry point](https://github.com/andreluizam/cote-ja-maui/blob/master/CoteAqui/Platforms/Tizen/Main.cs): `CoteAqui/Platforms/Tizen/Main.cs`

### Other components

- **User**

## Connections

- User → Main page: uses
- Main page → Quote view model: sets binding context (evidence: `CoteAqui/Views/PaginaPrincipal.xaml.cs`)
- Quote view model → Currency options: creates options (evidence: `CoteAqui/ViewModel/CotacaoViewModel.cs`)
- Quote view model → Quote service: requests quotes (evidence: `CoteAqui/ViewModel/CotacaoViewModel.cs`)
- Quote service → AwesomeAPI: fetches quotes (evidence: `CoteAqui/Api/CotacaoService.cs`)
- Quote service → Quote data: deserializes into (evidence: `CoteAqui/Api/CotacaoService.cs`)
- Quote view model → Current quote display: formats current quote (evidence: `CoteAqui/ViewModel/CotacaoViewModel.cs`)
- Quote view model → History chart: builds chart (evidence: `CoteAqui/ViewModel/CotacaoViewModel.cs`)
- Tizen entry point → MAUI bootstrap: creates app (evidence: `CoteAqui/Platforms/Tizen/Main.cs`)
