# arafaykhalid/nova-winrt architecture

> Architecture diagram of the GitHub repository arafaykhalid/nova-winrt, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-04). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/arafaykhalid/nova-winrt
- Repository: https://github.com/arafaykhalid/nova-winrt

## Overview

This is a WinUI 3/C++/WinRT desktop personal assistant. The user launches the app, reaches its main window, authenticates, and can manage tasks and expenses, use the embedded browser, or chat with Gemini; user data is persisted as encoded JSON. The sampled implementation concentrates these responsibilities in MainWindow.xaml.cpp, while the README documents additional capabilities. Those documented branches are included, but their internal wiring is not assumed where source excerpts do not show it.

Main entry points: [`MainWindow.xaml.cpp`](https://github.com/arafaykhalid/nova-winrt/blob/main/MainWindow.xaml.cpp) (Main window), [`App.xaml.cpp`](https://github.com/arafaykhalid/nova-winrt/blob/main/App.xaml.cpp) (App startup), [`App.xaml.h`](https://github.com/arafaykhalid/nova-winrt/blob/main/App.xaml.h) (App declaration)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_lifecycle["App lifecycle"]
  node_app["App startup<br/>[App.xaml.cpp]"]
  node_app_contract["App declaration<br/>[App.xaml.h]"]
end

subgraph group_experience["User experience"]
  node_window["Main window"]
  node_navigation["Module navigation"]
  node_authentication["Authentication"]
  node_tasks["Task management"]
  node_expenses["Expense tracking"]
  node_progress["Progress monitoring"]
  node_browser["Embedded browser"]
  node_sound_ui["Sound customization"]
end

subgraph group_assistant["Assistant features"]
  node_chatbot["AI chatbot"]
  node_content_language["Content and languages"]
end

subgraph group_data["User data"]
  node_json_store[("JSON user store")]
  node_encoding["Base64 encoding"]
end

node_user(("User"))
node_gemini["Gemini API"]

node_app -->|"uses declaration"| node_app_contract
node_app -->|"creates window"| node_window
node_user -->|"uses"| node_window
node_window -->|"provides"| node_authentication
node_window -->|"provides"| node_navigation
node_window -->|"provides"| node_tasks
node_window -->|"provides"| node_expenses
node_window -->|"provides"| node_progress
node_window -->|"hosts"| node_browser
node_window -->|"provides"| node_sound_ui
node_window -->|"provides"| node_chatbot
node_chatbot -->|"sends requests"| node_gemini
node_chatbot -->|"controls tasks"| node_tasks
node_chatbot -->|"controls expenses"| node_expenses
node_chatbot -->|"controls browser"| node_browser
node_chatbot -->|"supports generation"| node_content_language
node_window -->|"loads and saves"| node_json_store
node_window -->|"encodes data"| node_encoding
node_json_store -->|"stores encoded values"| node_encoding

click node_app "https://github.com/arafaykhalid/nova-winrt/blob/main/App.xaml.cpp"
click node_app_contract "https://github.com/arafaykhalid/nova-winrt/blob/main/App.xaml.h"
click node_window "https://github.com/arafaykhalid/nova-winrt/blob/main/MainWindow.xaml.cpp"
click node_navigation "https://github.com/arafaykhalid/nova-winrt/blob/main/MainWindow.xaml.cpp"
click node_authentication "https://github.com/arafaykhalid/nova-winrt/blob/main/MainWindow.xaml.cpp"
click node_tasks "https://github.com/arafaykhalid/nova-winrt/blob/main/MainWindow.xaml.cpp"
click node_expenses "https://github.com/arafaykhalid/nova-winrt/blob/main/MainWindow.xaml.cpp"
click node_progress "https://github.com/arafaykhalid/nova-winrt/blob/main/MainWindow.xaml.cpp"
click node_browser "https://github.com/arafaykhalid/nova-winrt/blob/main/MainWindow.xaml.cpp"
click node_sound_ui "https://github.com/arafaykhalid/nova-winrt/blob/main/MainWindow.xaml.cpp"
click node_chatbot "https://github.com/arafaykhalid/nova-winrt/blob/main/MainWindow.xaml.cpp"
click node_content_language "https://github.com/arafaykhalid/nova-winrt/blob/main/MainWindow.xaml.cpp"
click node_json_store "https://github.com/arafaykhalid/nova-winrt/blob/main/MainWindow.xaml.cpp"
click node_encoding "https://github.com/arafaykhalid/nova-winrt/blob/main/MainWindow.xaml.cpp"

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_app,node_app_contract,node_user toneBlue
class node_window,node_navigation,node_authentication,node_tasks,node_expenses,node_progress,node_browser,node_sound_ui toneAmber
class node_chatbot,node_content_language,node_gemini toneMint
class node_json_store,node_encoding toneRose
```

## Components

### App lifecycle

- [App startup](https://github.com/arafaykhalid/nova-winrt/blob/main/App.xaml.cpp): `App.xaml.cpp`
- [App declaration](https://github.com/arafaykhalid/nova-winrt/blob/main/App.xaml.h): `App.xaml.h`

### User experience

- [Main window](https://github.com/arafaykhalid/nova-winrt/blob/main/MainWindow.xaml.cpp): `MainWindow.xaml.cpp`
- [Module navigation](https://github.com/arafaykhalid/nova-winrt/blob/main/MainWindow.xaml.cpp): `MainWindow.xaml.cpp`
- [Authentication](https://github.com/arafaykhalid/nova-winrt/blob/main/MainWindow.xaml.cpp): `MainWindow.xaml.cpp`
- [Task management](https://github.com/arafaykhalid/nova-winrt/blob/main/MainWindow.xaml.cpp): `MainWindow.xaml.cpp`
- [Expense tracking](https://github.com/arafaykhalid/nova-winrt/blob/main/MainWindow.xaml.cpp): `MainWindow.xaml.cpp`
- [Progress monitoring](https://github.com/arafaykhalid/nova-winrt/blob/main/MainWindow.xaml.cpp): `MainWindow.xaml.cpp`
- [Embedded browser](https://github.com/arafaykhalid/nova-winrt/blob/main/MainWindow.xaml.cpp): `MainWindow.xaml.cpp`
- [Sound customization](https://github.com/arafaykhalid/nova-winrt/blob/main/MainWindow.xaml.cpp): `MainWindow.xaml.cpp`

### Assistant features

- [AI chatbot](https://github.com/arafaykhalid/nova-winrt/blob/main/MainWindow.xaml.cpp): `MainWindow.xaml.cpp`
- [Content and languages](https://github.com/arafaykhalid/nova-winrt/blob/main/MainWindow.xaml.cpp): `MainWindow.xaml.cpp`

### User data

- [JSON user store](https://github.com/arafaykhalid/nova-winrt/blob/main/MainWindow.xaml.cpp): `MainWindow.xaml.cpp`
- [Base64 encoding](https://github.com/arafaykhalid/nova-winrt/blob/main/MainWindow.xaml.cpp): `MainWindow.xaml.cpp`

### Other components

- **User**
- **Gemini API**

## Connections

- App startup → App declaration: uses declaration (evidence: `App.xaml.cpp`)
- App startup → Main window: creates window (evidence: `App.xaml.cpp`)
- User → Main window: uses (evidence: `README.md`)
- Main window → Authentication: provides (evidence: `README.md`)
- Main window → Module navigation: provides (evidence: `README.md`)
- Main window → Task management: provides (evidence: `README.md`)
- Main window → Expense tracking: provides (evidence: `README.md`)
- Main window → Progress monitoring: provides (evidence: `README.md`)
- Main window → Embedded browser: hosts (evidence: `README.md`)
- Main window → Sound customization: provides (evidence: `README.md`)
- Main window → AI chatbot: provides (evidence: `README.md`)
- AI chatbot → Gemini API: sends requests (evidence: `MainWindow.xaml.cpp`)
- AI chatbot → Task management: controls tasks (evidence: `README.md`)
- AI chatbot → Expense tracking: controls expenses (evidence: `README.md`)
- AI chatbot → Embedded browser: controls browser (evidence: `README.md`)
- AI chatbot → Content and languages: supports generation (evidence: `README.md`)
- Main window → JSON user store: loads and saves (evidence: `MainWindow.xaml.cpp`)
- Main window → Base64 encoding: encodes data (evidence: `MainWindow.xaml.cpp`)
- JSON user store → Base64 encoding: stores encoded values (evidence: `MainWindow.xaml.cpp`)
