# mahbelal-bit/mauiappcalc architecture

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

- Interactive diagram: https://gitdiagram.com/mahbelal-bit/mauiappcalc
- Repository: https://github.com/mahbelal-bit/mauiappcalc

## Overview

MauiApp2 is a cross-platform .NET MAUI calculator. Its visible runtime setup creates the MAUI app and opens an AppShell window; calculator pages implement button-driven arithmetic, expression evaluation, and display updates. The excerpts do not establish how AppShell routes to either calculator page, so that connection is intentionally omitted. Platform startup code is shown where it explicitly creates the MAUI app; no persistent storage or broader product services are evident.

Main entry points: [`MauiApp2/MauiProgram.cs`](https://github.com/mahbelal-bit/mauiappcalc/blob/master/MauiApp2/MauiProgram.cs) (MAUI setup), [`MauiApp2/App.xaml.cs`](https://github.com/mahbelal-bit/mauiappcalc/blob/master/MauiApp2/App.xaml.cs) (Application window), [`MauiApp2/MainPage.xaml.cs`](https://github.com/mahbelal-bit/mauiappcalc/blob/master/MauiApp2/MainPage.xaml.cs) (Main calculator), [`MauiApp2/Calculator3.xaml.cs`](https://github.com/mahbelal-bit/mauiappcalc/blob/master/MauiApp2/Calculator3.xaml.cs) (Calculator page)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_startup["App startup"]
  node_maui["MAUI setup<br/>[MauiProgram.cs]"]
  node_app["Application window<br/>[App.xaml.cs]"]
  node_shell["App shell<br/>[AppShell.xaml.cs]"]
end

subgraph group_calculator["Calculator pages"]
  node_mainpage["Main calculator<br/>[MainPage.xaml.cs]"]
  node_calculator3["Calculator page"]
end

subgraph group_platforms["Platform entrypoints"]
  node_android["Android startup<br/>[MainApplication.cs]"]
  node_ios["iOS startup<br/>[AppDelegate.cs]"]
  node_maccatalyst["Mac Catalyst startup<br/>[AppDelegate.cs]"]
  node_windows["Windows startup<br/>[App.xaml.cs]"]
  node_tizen["Tizen startup<br/>[Main.cs]"]
end

node_user(("User"))
node_ncalc["NCalc evaluator"]

node_maui -->|"registers app"| node_app
node_app -->|"opens window"| node_shell
node_user -->|"uses calculator"| node_mainpage
node_user -->|"uses calculator"| node_calculator3
node_mainpage -->|"evaluates expression"| node_ncalc
node_calculator3 -->|"evaluates expression"| node_ncalc
node_android -->|"creates app"| node_maui
node_ios -->|"creates app"| node_maui
node_maccatalyst -->|"creates app"| node_maui
node_windows -->|"creates app"| node_maui
node_tizen -->|"creates app"| node_maui

click node_maui "https://github.com/mahbelal-bit/mauiappcalc/blob/master/MauiApp2/MauiProgram.cs"
click node_app "https://github.com/mahbelal-bit/mauiappcalc/blob/master/MauiApp2/App.xaml.cs"
click node_shell "https://github.com/mahbelal-bit/mauiappcalc/blob/master/MauiApp2/AppShell.xaml.cs"
click node_mainpage "https://github.com/mahbelal-bit/mauiappcalc/blob/master/MauiApp2/MainPage.xaml.cs"
click node_calculator3 "https://github.com/mahbelal-bit/mauiappcalc/blob/master/MauiApp2/Calculator3.xaml.cs"
click node_android "https://github.com/mahbelal-bit/mauiappcalc/blob/master/MauiApp2/Platforms/Android/MainApplication.cs"
click node_ios "https://github.com/mahbelal-bit/mauiappcalc/blob/master/MauiApp2/Platforms/iOS/AppDelegate.cs"
click node_maccatalyst "https://github.com/mahbelal-bit/mauiappcalc/blob/master/MauiApp2/Platforms/MacCatalyst/AppDelegate.cs"
click node_windows "https://github.com/mahbelal-bit/mauiappcalc/blob/master/MauiApp2/Platforms/Windows/App.xaml.cs"
click node_tizen "https://github.com/mahbelal-bit/mauiappcalc/blob/master/MauiApp2/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_maui,node_app,node_shell,node_user toneBlue
class node_mainpage,node_calculator3 toneAmber
class node_android,node_ios,node_maccatalyst,node_windows,node_tizen toneMint
class node_ncalc toneIndigo
```

## Components

### App startup

- [MAUI setup](https://github.com/mahbelal-bit/mauiappcalc/blob/master/MauiApp2/MauiProgram.cs): `MauiApp2/MauiProgram.cs`
- [Application window](https://github.com/mahbelal-bit/mauiappcalc/blob/master/MauiApp2/App.xaml.cs): `MauiApp2/App.xaml.cs`
- [App shell](https://github.com/mahbelal-bit/mauiappcalc/blob/master/MauiApp2/AppShell.xaml.cs): `MauiApp2/AppShell.xaml.cs`

### Calculator pages

- [Main calculator](https://github.com/mahbelal-bit/mauiappcalc/blob/master/MauiApp2/MainPage.xaml.cs): `MauiApp2/MainPage.xaml.cs`
- [Calculator page](https://github.com/mahbelal-bit/mauiappcalc/blob/master/MauiApp2/Calculator3.xaml.cs): `MauiApp2/Calculator3.xaml.cs`

### Platform entrypoints

- [Android startup](https://github.com/mahbelal-bit/mauiappcalc/blob/master/MauiApp2/Platforms/Android/MainApplication.cs): `MauiApp2/Platforms/Android/MainApplication.cs`
- [iOS startup](https://github.com/mahbelal-bit/mauiappcalc/blob/master/MauiApp2/Platforms/iOS/AppDelegate.cs): `MauiApp2/Platforms/iOS/AppDelegate.cs`
- [Mac Catalyst startup](https://github.com/mahbelal-bit/mauiappcalc/blob/master/MauiApp2/Platforms/MacCatalyst/AppDelegate.cs): `MauiApp2/Platforms/MacCatalyst/AppDelegate.cs`
- [Windows startup](https://github.com/mahbelal-bit/mauiappcalc/blob/master/MauiApp2/Platforms/Windows/App.xaml.cs): `MauiApp2/Platforms/Windows/App.xaml.cs`
- [Tizen startup](https://github.com/mahbelal-bit/mauiappcalc/blob/master/MauiApp2/Platforms/Tizen/Main.cs): `MauiApp2/Platforms/Tizen/Main.cs`

### Other components

- **User**
- **NCalc evaluator**

## Connections

- MAUI setup → Application window: registers app (evidence: `MauiApp2/MauiProgram.cs`)
- Application window → App shell: opens window (evidence: `MauiApp2/App.xaml.cs`)
- User → Main calculator: uses calculator (evidence: `MauiApp2/MainPage.xaml.cs`)
- User → Calculator page: uses calculator (evidence: `MauiApp2/Calculator3.xaml.cs`)
- Main calculator → NCalc evaluator: evaluates expression (evidence: `MauiApp2/MainPage.xaml.cs`)
- Calculator page → NCalc evaluator: evaluates expression (evidence: `MauiApp2/Calculator3.xaml.cs`)
- Android startup → MAUI setup: creates app (evidence: `MauiApp2/Platforms/Android/MainApplication.cs`)
- iOS startup → MAUI setup: creates app (evidence: `MauiApp2/Platforms/iOS/AppDelegate.cs`)
- Mac Catalyst startup → MAUI setup: creates app (evidence: `MauiApp2/Platforms/MacCatalyst/AppDelegate.cs`)
- Windows startup → MAUI setup: creates app (evidence: `MauiApp2/Platforms/Windows/App.xaml.cs`)
- Tizen startup → MAUI setup: creates app (evidence: `MauiApp2/Platforms/Tizen/Main.cs`)
