# danielmonettelli/dotnetmaui-mitawi-weather-app-challenge architecture

> Architecture diagram of the GitHub repository danielmonettelli/dotnetmaui-mitawi-weather-app-challenge, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-08-13). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/danielmonettelli/dotnetmaui-mitawi-weather-app-challenge
- Repository: https://github.com/danielmonettelli/dotnetmaui-mitawi-weather-app-challenge

## Overview

#### Purpose and Entry Points
Mitawi is a cross-platform .NET MAUI weather client migrated from an earlier Mitawi app. It retrieves weather data from OpenWeather using a developer-provided API key and presents welcome, home, and detail experiences across mobile and desktop targets. App startup and dependency setup originate in `Mitawi/MauiProgram.cs`; Shell navigation is rooted at `Mitawi/App.xaml` and `Mitawi/AppShell.xaml`.

#### Runtime and Platform Boundary
The application runs on .NET MAUI/XAML, with shared UI, models, services, and view models in `Mitawi/`. Native hosting and packaging are isolated under `Mitawi/Platforms/Android`, `Mitawi/Platforms/iOS`, `Mitawi/Platforms/Windows`, `Mitawi/Platforms/MacCatalyst`, and `Mitawi/Platforms/Tizen`. This separates common application behavior from platform lifecycle, manifest, entitlement, and package concerns.

#### Application Composition and Navigation
`Mitawi/App.xaml.cs` initializes application-level resources, while `Mitawi/AppShell.xaml.cs` coordinates Shell-based page routing. The primary user flow is Welcome → Home → Home Detail, represented by `Mitawi/Views/WelcomePage.xaml`, `Mitawi/Views/HomePage.xaml`, and `Mitawi/Views/HomeDetailPage.xaml`. Orientation-specific layouts under `Mitawi/Views/Orientations` provide alternate presentations without moving weather logic into platform code.

#### Presentation and State Layer
The project follows an MVVM split: XAML pages bind to view models, which hold UI state and commands, rather than directly owning API operations. `Mitawi/ViewModels/Base/BaseViewModel.cs` supplies shared view-model behavior. `Mitawi/ViewModels/WelcomeViewModel.cs`, `Mitawi/ViewModels/HomeViewModel.cs`, and `Mitawi/ViewModels/HomeDetailViewModel.cs` correspond to the major stages of the navigation flow and mediate service results for display.

#### Weather Data Boundary
`Mitawi/Services/IWeatherDataService.cs` defines the weather-data abstraction used by the presentation layer. `Mitawi/Services/WeatherDataService.cs` implements the outbound integration with OpenWeather, keeping HTTP/API specifics outside views and view models. API endpoint and key-related constants are centralized in `Mitawi/Constants/APIConstants.cs`; credentials are an external deployment/developer concern, not an app-owned backend.

#### Data Mapping and UI Transformation
Weather payload state is represented by `Mitawi/Models/WeatherData.cs`, forming the main contract between service and view models. XAML converters transform raw values into presentation-ready values—for example timestamps, images, signs, and abbreviated text—at the binding boundary: `Mitawi/Converters/UnixTimeToDateTimeConverter.cs`, `Mitawi/Converters/OpenWeatherImageUrlScalingConverter.cs`, and `Mitawi/Converters/NegativeAndPositiveNumberConverter.cs`. Shared visual resources and converter registration reside in `Mitawi/Resources/Styles/Converters.xaml` and `Mitawi/Resources/Styles/Styles.xaml`.

#### Assets and Delivery
MAUI-managed branding, fonts, images, splash assets, and styles are contained in `Mitawi/Resources`. The solution/project entry for builds is `Mitawi/Mitawi.sln` and `Mitawi/Mitawi.csproj`. CI is configured through `.github/workflows/mobile.yml`, indicating automated mobile build validation; no server-side infrastructure is present in this repository.

Main entry points: [`Mitawi/Services/WeatherDataService.cs`](https://github.com/danielmonettelli/dotnetmaui-mitawi-weather-app-challenge/blob/main/Mitawi/Services/WeatherDataService.cs) (OpenWeather Client), [`Mitawi/ViewModels/HomeViewModel.cs`](https://github.com/danielmonettelli/dotnetmaui-mitawi-weather-app-challenge/blob/main/Mitawi/ViewModels/HomeViewModel.cs) (Weather View Models), [`Mitawi/Views/WelcomePage.xaml`](https://github.com/danielmonettelli/dotnetmaui-mitawi-weather-app-challenge/blob/main/Mitawi/Views/WelcomePage.xaml) (Welcome, Home & Detail), [`Mitawi/Services/IWeatherDataService.cs`](https://github.com/danielmonettelli/dotnetmaui-mitawi-weather-app-challenge/blob/main/Mitawi/Services/IWeatherDataService.cs) (Weather Service Contract)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["MAUI Runtime"]
  node_maui_program{{"Startup &amp; DI<br/>composition root<br/>[MauiProgram.cs]"}}
  node_app["Application<br/>MAUI app<br/>[App.xaml.cs]"]
  node_shell["App Shell<br/>navigation root<br/>[AppShell.xaml.cs]"]
end

subgraph group_presentation["Presentation"]
  node_pages["Welcome, Home &amp; Detail<br/>XAML pages<br/>[WelcomePage.xaml]"]
  node_orientation_layouts["Orientation Layouts<br/>responsive XAML"]
  node_viewmodels["Weather View Models<br/>MVVM state<br/>[HomeViewModel.cs]"]
  node_base_viewmodel["Base View Model<br/>MVVM base<br/>[BaseViewModel.cs]"]
  node_converters["Binding Converters<br/>XAML converters"]
  node_resources["Styles &amp; Assets<br/>MAUI resources"]
end

subgraph group_weather["Weather Integration"]
  node_weather_contract["Weather Service Contract<br/>service interface"]
  node_weather_service{{"OpenWeather Client<br/>HTTP service"}}
  node_weather_model["Weather Data<br/>data model<br/>[WeatherData.cs]"]
  node_api_constants["API Constants<br/>integration settings<br/>[APIConstants.cs]"]
  node_openweather(("OpenWeather<br/>external API"))
end

subgraph group_delivery["Platforms &amp; Delivery"]
  node_platform_hosts["Native Platform Hosts<br/>platform boundary"]
  node_project["Solution &amp; Project<br/>build entry<br/>[Mitawi.sln]"]
  node_ci["Mobile CI<br/>workflow<br/>[mobile.yml]"]
end

node_maui_program -->|"creates"| node_app
node_app -->|"hosts"| node_shell
node_shell -->|"routes flow"| node_pages
node_pages -->|"binds to"| node_viewmodels
node_orientation_layouts -->|"adapts"| node_pages
node_base_viewmodel -->|"shared by"| node_viewmodels
node_maui_program -->|"registers"| node_weather_contract
node_viewmodels -->|"requests weather"| node_weather_contract
node_weather_service -->|"implements"| node_weather_contract
node_weather_service -->|"maps payload"| node_weather_model
node_weather_service -->|"uses"| node_api_constants
node_weather_service -->|"HTTP requests"| node_openweather
node_weather_contract -->|"returns"| node_weather_model
node_viewmodels -->|"presents"| node_weather_model
node_converters -->|"transforms bindings"| node_pages
node_resources -->|"registers"| node_converters
node_resources -->|"application resources"| node_app
node_project -->|"builds"| node_maui_program
node_project -->|"targets"| node_platform_hosts
node_ci -->|"validates build"| node_project

click node_maui_program "https://github.com/danielmonettelli/dotnetmaui-mitawi-weather-app-challenge/blob/main/Mitawi/MauiProgram.cs"
click node_app "https://github.com/danielmonettelli/dotnetmaui-mitawi-weather-app-challenge/blob/main/Mitawi/App.xaml.cs"
click node_shell "https://github.com/danielmonettelli/dotnetmaui-mitawi-weather-app-challenge/blob/main/Mitawi/AppShell.xaml.cs"
click node_pages "https://github.com/danielmonettelli/dotnetmaui-mitawi-weather-app-challenge/blob/main/Mitawi/Views/WelcomePage.xaml"
click node_orientation_layouts "https://github.com/danielmonettelli/dotnetmaui-mitawi-weather-app-challenge/tree/main/Mitawi/Views/Orientations"
click node_viewmodels "https://github.com/danielmonettelli/dotnetmaui-mitawi-weather-app-challenge/blob/main/Mitawi/ViewModels/HomeViewModel.cs"
click node_base_viewmodel "https://github.com/danielmonettelli/dotnetmaui-mitawi-weather-app-challenge/blob/main/Mitawi/ViewModels/Base/BaseViewModel.cs"
click node_weather_contract "https://github.com/danielmonettelli/dotnetmaui-mitawi-weather-app-challenge/blob/main/Mitawi/Services/IWeatherDataService.cs"
click node_weather_service "https://github.com/danielmonettelli/dotnetmaui-mitawi-weather-app-challenge/blob/main/Mitawi/Services/WeatherDataService.cs"
click node_weather_model "https://github.com/danielmonettelli/dotnetmaui-mitawi-weather-app-challenge/blob/main/Mitawi/Models/WeatherData.cs"
click node_api_constants "https://github.com/danielmonettelli/dotnetmaui-mitawi-weather-app-challenge/blob/main/Mitawi/Constants/APIConstants.cs"
click node_converters "https://github.com/danielmonettelli/dotnetmaui-mitawi-weather-app-challenge/blob/main/Mitawi/Converters/UnixTimeToDateTimeConverter.cs"
click node_resources "https://github.com/danielmonettelli/dotnetmaui-mitawi-weather-app-challenge/tree/main/Mitawi/Resources"
click node_platform_hosts "https://github.com/danielmonettelli/dotnetmaui-mitawi-weather-app-challenge/tree/main/Mitawi/Platforms/Android"
click node_project "https://github.com/danielmonettelli/dotnetmaui-mitawi-weather-app-challenge/blob/main/Mitawi/Mitawi.sln"
click node_ci "https://github.com/danielmonettelli/dotnetmaui-mitawi-weather-app-challenge/blob/main/.github/workflows/mobile.yml"

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_maui_program,node_app,node_shell toneBlue
class node_pages,node_orientation_layouts,node_viewmodels,node_base_viewmodel,node_converters,node_resources toneAmber
class node_weather_contract,node_weather_service,node_weather_model,node_api_constants,node_openweather toneMint
class node_platform_hosts,node_project,node_ci toneRose
```

## Components

### MAUI Runtime

Shared application startup and Shell navigation.

- [Startup & DI](https://github.com/danielmonettelli/dotnetmaui-mitawi-weather-app-challenge/blob/main/Mitawi/MauiProgram.cs): composition root · `Mitawi/MauiProgram.cs`
- [Application](https://github.com/danielmonettelli/dotnetmaui-mitawi-weather-app-challenge/blob/main/Mitawi/App.xaml.cs): MAUI app · Initializes application resources. · `Mitawi/App.xaml.cs`
- [App Shell](https://github.com/danielmonettelli/dotnetmaui-mitawi-weather-app-challenge/blob/main/Mitawi/AppShell.xaml.cs): navigation root · Coordinates Shell page routing. · `Mitawi/AppShell.xaml.cs`

### Presentation

XAML pages, MVVM state, and binding transformations.

- [Welcome, Home & Detail](https://github.com/danielmonettelli/dotnetmaui-mitawi-weather-app-challenge/blob/main/Mitawi/Views/WelcomePage.xaml): XAML pages · Primary flow is Welcome → Home → Home Detail. · `Mitawi/Views/WelcomePage.xaml`
- [Orientation Layouts](https://github.com/danielmonettelli/dotnetmaui-mitawi-weather-app-challenge/tree/main/Mitawi/Views/Orientations): responsive XAML · Alternate presentations remain in shared UI. · `Mitawi/Views/Orientations`
- [Weather View Models](https://github.com/danielmonettelli/dotnetmaui-mitawi-weather-app-challenge/blob/main/Mitawi/ViewModels/HomeViewModel.cs): MVVM state · Welcome, Home, and detail state and commands. · `Mitawi/ViewModels/HomeViewModel.cs`
- [Base View Model](https://github.com/danielmonettelli/dotnetmaui-mitawi-weather-app-challenge/blob/main/Mitawi/ViewModels/Base/BaseViewModel.cs): MVVM base · Shared view-model behavior. · `Mitawi/ViewModels/Base/BaseViewModel.cs`
- [Binding Converters](https://github.com/danielmonettelli/dotnetmaui-mitawi-weather-app-challenge/blob/main/Mitawi/Converters/UnixTimeToDateTimeConverter.cs): XAML converters · Formats timestamps, images, signs, and text for display. · `Mitawi/Converters/UnixTimeToDateTimeConverter.cs`
- [Styles & Assets](https://github.com/danielmonettelli/dotnetmaui-mitawi-weather-app-challenge/tree/main/Mitawi/Resources): MAUI resources · Shared styles, converter registration, branding, fonts, and images. · `Mitawi/Resources`

### Weather Integration

Weather abstraction and OpenWeather boundary.

- [Weather Service Contract](https://github.com/danielmonettelli/dotnetmaui-mitawi-weather-app-challenge/blob/main/Mitawi/Services/IWeatherDataService.cs): service interface · Presentation-facing weather-data abstraction. · `Mitawi/Services/IWeatherDataService.cs`
- [OpenWeather Client](https://github.com/danielmonettelli/dotnetmaui-mitawi-weather-app-challenge/blob/main/Mitawi/Services/WeatherDataService.cs): HTTP service · Outbound OpenWeather implementation. · `Mitawi/Services/WeatherDataService.cs`
- [Weather Data](https://github.com/danielmonettelli/dotnetmaui-mitawi-weather-app-challenge/blob/main/Mitawi/Models/WeatherData.cs): data model · Main service-to-view-model payload contract. · `Mitawi/Models/WeatherData.cs`
- [API Constants](https://github.com/danielmonettelli/dotnetmaui-mitawi-weather-app-challenge/blob/main/Mitawi/Constants/APIConstants.cs): integration settings · Centralizes endpoint and key-related constants. · `Mitawi/Constants/APIConstants.cs`
- **OpenWeather**: external API · Developer API key is supplied externally.

### Platforms & Delivery

Native hosts, project build, and CI.

- [Native Platform Hosts](https://github.com/danielmonettelli/dotnetmaui-mitawi-weather-app-challenge/tree/main/Mitawi/Platforms/Android): platform boundary · Android, iOS, Windows, MacCatalyst, and Tizen lifecycle and packaging. · `Mitawi/Platforms/Android`
- [Solution & Project](https://github.com/danielmonettelli/dotnetmaui-mitawi-weather-app-challenge/blob/main/Mitawi/Mitawi.sln): build entry · Builds the MAUI application. · `Mitawi/Mitawi.sln`
- [Mobile CI](https://github.com/danielmonettelli/dotnetmaui-mitawi-weather-app-challenge/blob/main/.github/workflows/mobile.yml): workflow · Automated mobile build validation. · `.github/workflows/mobile.yml`

## Connections

- Startup & DI → Application: creates
- Application → App Shell: hosts
- App Shell → Welcome, Home & Detail: routes flow
- Welcome, Home & Detail → Weather View Models: binds to
- Orientation Layouts → Welcome, Home & Detail: adapts
- Base View Model → Weather View Models: shared by
- Startup & DI → Weather Service Contract: registers
- Weather View Models → Weather Service Contract: requests weather
- OpenWeather Client → Weather Service Contract: implements
- OpenWeather Client → Weather Data: maps payload
- OpenWeather Client → API Constants: uses
- OpenWeather Client → OpenWeather: HTTP requests
- Weather Service Contract → Weather Data: returns
- Weather View Models → Weather Data: presents
- Binding Converters → Welcome, Home & Detail: transforms bindings
- Styles & Assets → Binding Converters: registers
- Styles & Assets → Application: application resources
- Solution & Project → Startup & DI: builds
- Solution & Project → Native Platform Hosts: targets
- Mobile CI → Solution & Project: validates build
