# dkj121/sastcsharpfriendpart architecture

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

- Interactive diagram: https://gitdiagram.com/dkj121/sastcsharpfriendpart
- Repository: https://github.com/dkj121/sastcsharpfriendpart

## Overview

This is a WinUI 3 desktop starter for animal-friend profiles, currently limited to a welcome screen, local friend-data viewing/editing, navigation, and appearance/help settings. The principal flow opens the desktop window, navigates to the friend page, loads friend records from the app-local JSON data, and lets users save edits. The README describes chat and personal-profile screens, local/remote synchronization, and voice chat as requested future work, not implemented capabilities. Relationships below follow source excerpts or README statements; unsampled view markup and app startup wiring limit further detail.

Main entry points: [`SASTCSharpFriendPart.UI/Services/NavigationService.cs`](https://github.com/dkj121/sastcsharpfriendpart/blob/master/SASTCSharpFriendPart.UI/Services/NavigationService.cs) (Navigation service), [`SASTCSharpFriendPart.UI/Views/MainWindow.xaml.cs`](https://github.com/dkj121/sastcsharpfriendpart/blob/master/SASTCSharpFriendPart.UI/Views/MainWindow.xaml.cs) (Main window), [`SASTCSharpFriendPart.UI/Views/WelcomePage.xaml.cs`](https://github.com/dkj121/sastcsharpfriendpart/blob/master/SASTCSharpFriendPart.UI/Views/WelcomePage.xaml.cs) (Welcome page), [`SASTCSharpFriendPart.UI/ViewModels/FriendViewModel.cs`](https://github.com/dkj121/sastcsharpfriendpart/blob/master/SASTCSharpFriendPart.UI/ViewModels/FriendViewModel.cs) (Friend editing)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_desktop["Desktop shell"]
  node_window["Main window<br/>[MainWindow.xaml.cs]"]
  node_windowvm["Window navigation"]
  node_navigation["Navigation service"]
  node_welcome["Welcome page"]
  node_welcomevm["Welcome state"]
end

subgraph group_friends["Friend profiles"]
  node_friendpage["Friend page<br/>[FriendPage.xaml.cs]"]
  node_friendvm["Friend editing<br/>[FriendViewModel.cs]"]
  node_frienddata[("Local friend JSON<br/>[data.json]")]
  node_futurechat["Chat interface<br/>[Views]"]
  node_futureprofile["Personal profile<br/>[Views]"]
end

subgraph group_preferences["Preferences and help"]
  node_settingspage["Settings page"]
  node_settingsvm["Settings controls"]
  node_theme["Theme service<br/>[ThemeService.cs]"]
  node_morepage["More-info page"]
  node_morevm["Help actions"]
end

subgraph group_domain["Domain data"]
  node_frienddto["Friend record<br/>[FriendDto.cs]"]
  node_chatdto["Chat log model<br/>[ChatLogDto.cs]"]
  node_sessiondto["Session model<br/>[SessionDto.cs]"]
end

node_user(("Desktop user"))
node_browser(("System browser"))
node_remoteservice{{"Remote service"}}

node_user -->|"uses"| node_window
node_window -->|"opens"| node_welcome
node_window -->|"sets frame"| node_navigation
node_window -->|"owns"| node_windowvm
node_windowvm -->|"navigates via"| node_navigation
node_welcome -->|"owns"| node_welcomevm
node_welcome -->|"navigates via"| node_navigation
node_navigation -.->|"navigates"| node_friendpage
node_friendpage -->|"owns"| node_friendvm
node_friendvm -->|"loads and saves"| node_frienddata
node_friendvm -->|"deserializes"| node_frienddto
node_user -->|"sets preferences"| node_settingspage
node_settingspage -->|"uses"| node_settingsvm
node_settingsvm -->|"changes theme"| node_theme
node_settingsvm -->|"opens help via"| node_navigation
node_window -->|"initializes"| node_theme
node_navigation -.->|"navigates"| node_morepage
node_morepage -->|"owns"| node_morevm
node_morevm -->|"opens links"| node_browser
node_user -.->|"requested capability"| node_futurechat
node_user -.->|"requested capability"| node_futureprofile
node_futurechat -.->|"planned sync"| node_remoteservice
node_chatdto -.->|"possible model"| node_futurechat
node_sessiondto -.->|"possible model"| node_remoteservice

click node_window "https://github.com/dkj121/sastcsharpfriendpart/blob/master/SASTCSharpFriendPart.UI/Views/MainWindow.xaml.cs"
click node_windowvm "https://github.com/dkj121/sastcsharpfriendpart/blob/master/SASTCSharpFriendPart.UI/ViewModels/MainWindowViewModel.cs"
click node_navigation "https://github.com/dkj121/sastcsharpfriendpart/blob/master/SASTCSharpFriendPart.UI/Services/NavigationService.cs"
click node_welcome "https://github.com/dkj121/sastcsharpfriendpart/blob/master/SASTCSharpFriendPart.UI/Views/WelcomePage.xaml.cs"
click node_welcomevm "https://github.com/dkj121/sastcsharpfriendpart/blob/master/SASTCSharpFriendPart.UI/ViewModels/WelcomeViewModel.cs"
click node_friendpage "https://github.com/dkj121/sastcsharpfriendpart/blob/master/SASTCSharpFriendPart.UI/Views/FriendPage.xaml.cs"
click node_friendvm "https://github.com/dkj121/sastcsharpfriendpart/blob/master/SASTCSharpFriendPart.UI/ViewModels/FriendViewModel.cs"
click node_frienddata "https://github.com/dkj121/sastcsharpfriendpart/blob/master/SASTCSharpFriendPart.Core/Data/data.json"
click node_frienddto "https://github.com/dkj121/sastcsharpfriendpart/blob/master/SASTCSharpFriendPart.Core/Models/FriendDto.cs"
click node_chatdto "https://github.com/dkj121/sastcsharpfriendpart/blob/master/SASTCSharpFriendPart.Core/Models/ChatLogDto.cs"
click node_sessiondto "https://github.com/dkj121/sastcsharpfriendpart/blob/master/SASTCSharpFriendPart.Core/Models/SessionDto.cs"
click node_settingspage "https://github.com/dkj121/sastcsharpfriendpart/blob/master/SASTCSharpFriendPart.UI/Views/SettingsPage.xaml.cs"
click node_settingsvm "https://github.com/dkj121/sastcsharpfriendpart/blob/master/SASTCSharpFriendPart.UI/ViewModels/SettingsViewModel.cs"
click node_theme "https://github.com/dkj121/sastcsharpfriendpart/blob/master/SASTCSharpFriendPart.UI/Services/ThemeService.cs"
click node_morepage "https://github.com/dkj121/sastcsharpfriendpart/blob/master/SASTCSharpFriendPart.UI/Views/MoreInfoPage.xaml.cs"
click node_morevm "https://github.com/dkj121/sastcsharpfriendpart/blob/master/SASTCSharpFriendPart.UI/ViewModels/MoreInfoViewModel.cs"
click node_futurechat "https://github.com/dkj121/sastcsharpfriendpart/tree/master/SASTCSharpFriendPart.UI/Views"
click node_futureprofile "https://github.com/dkj121/sastcsharpfriendpart/tree/master/SASTCSharpFriendPart.UI/Views"

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_window,node_windowvm,node_navigation,node_welcome,node_welcomevm,node_user,node_browser toneBlue
class node_friendpage,node_friendvm,node_frienddata,node_futurechat,node_futureprofile toneAmber
class node_settingspage,node_settingsvm,node_theme,node_morepage,node_morevm toneMint
class node_frienddto,node_chatdto,node_sessiondto toneRose
class node_remoteservice toneIndigo
```

## Components

### Desktop shell

- [Main window](https://github.com/dkj121/sastcsharpfriendpart/blob/master/SASTCSharpFriendPart.UI/Views/MainWindow.xaml.cs): `SASTCSharpFriendPart.UI/Views/MainWindow.xaml.cs`
- [Window navigation](https://github.com/dkj121/sastcsharpfriendpart/blob/master/SASTCSharpFriendPart.UI/ViewModels/MainWindowViewModel.cs): `SASTCSharpFriendPart.UI/ViewModels/MainWindowViewModel.cs`
- [Navigation service](https://github.com/dkj121/sastcsharpfriendpart/blob/master/SASTCSharpFriendPart.UI/Services/NavigationService.cs): `SASTCSharpFriendPart.UI/Services/NavigationService.cs`
- [Welcome page](https://github.com/dkj121/sastcsharpfriendpart/blob/master/SASTCSharpFriendPart.UI/Views/WelcomePage.xaml.cs): `SASTCSharpFriendPart.UI/Views/WelcomePage.xaml.cs`
- [Welcome state](https://github.com/dkj121/sastcsharpfriendpart/blob/master/SASTCSharpFriendPart.UI/ViewModels/WelcomeViewModel.cs): `SASTCSharpFriendPart.UI/ViewModels/WelcomeViewModel.cs`

### Friend profiles

- [Friend page](https://github.com/dkj121/sastcsharpfriendpart/blob/master/SASTCSharpFriendPart.UI/Views/FriendPage.xaml.cs): `SASTCSharpFriendPart.UI/Views/FriendPage.xaml.cs`
- [Friend editing](https://github.com/dkj121/sastcsharpfriendpart/blob/master/SASTCSharpFriendPart.UI/ViewModels/FriendViewModel.cs): `SASTCSharpFriendPart.UI/ViewModels/FriendViewModel.cs`
- [Local friend JSON](https://github.com/dkj121/sastcsharpfriendpart/blob/master/SASTCSharpFriendPart.Core/Data/data.json): `SASTCSharpFriendPart.Core/Data/data.json`
- [Chat interface](https://github.com/dkj121/sastcsharpfriendpart/tree/master/SASTCSharpFriendPart.UI/Views): `SASTCSharpFriendPart.UI/Views`
- [Personal profile](https://github.com/dkj121/sastcsharpfriendpart/tree/master/SASTCSharpFriendPart.UI/Views): `SASTCSharpFriendPart.UI/Views`

### Preferences and help

- [Settings page](https://github.com/dkj121/sastcsharpfriendpart/blob/master/SASTCSharpFriendPart.UI/Views/SettingsPage.xaml.cs): `SASTCSharpFriendPart.UI/Views/SettingsPage.xaml.cs`
- [Settings controls](https://github.com/dkj121/sastcsharpfriendpart/blob/master/SASTCSharpFriendPart.UI/ViewModels/SettingsViewModel.cs): `SASTCSharpFriendPart.UI/ViewModels/SettingsViewModel.cs`
- [Theme service](https://github.com/dkj121/sastcsharpfriendpart/blob/master/SASTCSharpFriendPart.UI/Services/ThemeService.cs): `SASTCSharpFriendPart.UI/Services/ThemeService.cs`
- [More-info page](https://github.com/dkj121/sastcsharpfriendpart/blob/master/SASTCSharpFriendPart.UI/Views/MoreInfoPage.xaml.cs): `SASTCSharpFriendPart.UI/Views/MoreInfoPage.xaml.cs`
- [Help actions](https://github.com/dkj121/sastcsharpfriendpart/blob/master/SASTCSharpFriendPart.UI/ViewModels/MoreInfoViewModel.cs): `SASTCSharpFriendPart.UI/ViewModels/MoreInfoViewModel.cs`

### Domain data

- [Friend record](https://github.com/dkj121/sastcsharpfriendpart/blob/master/SASTCSharpFriendPart.Core/Models/FriendDto.cs): `SASTCSharpFriendPart.Core/Models/FriendDto.cs`
- [Chat log model](https://github.com/dkj121/sastcsharpfriendpart/blob/master/SASTCSharpFriendPart.Core/Models/ChatLogDto.cs): `SASTCSharpFriendPart.Core/Models/ChatLogDto.cs`
- [Session model](https://github.com/dkj121/sastcsharpfriendpart/blob/master/SASTCSharpFriendPart.Core/Models/SessionDto.cs): `SASTCSharpFriendPart.Core/Models/SessionDto.cs`

### Other components

- **Desktop user**
- **System browser**
- **Remote service**

## Connections

- Desktop user → Main window: uses (evidence: `README.md`)
- Main window → Welcome page: opens (evidence: `SASTCSharpFriendPart.UI/Views/MainWindow.xaml.cs`)
- Main window → Navigation service: sets frame (evidence: `SASTCSharpFriendPart.UI/Views/MainWindow.xaml.cs`)
- Main window → Window navigation: owns (evidence: `SASTCSharpFriendPart.UI/Views/MainWindow.xaml.cs`)
- Window navigation → Navigation service: navigates via (evidence: `SASTCSharpFriendPart.UI/ViewModels/MainWindowViewModel.cs`)
- Welcome page → Welcome state: owns (evidence: `SASTCSharpFriendPart.UI/Views/WelcomePage.xaml.cs`)
- Welcome page → Navigation service: navigates via (evidence: `SASTCSharpFriendPart.UI/Views/WelcomePage.xaml.cs`)
- Navigation service → Friend page: navigates
- Friend page → Friend editing: owns (evidence: `SASTCSharpFriendPart.UI/Views/FriendPage.xaml.cs`)
- Friend editing → Local friend JSON: loads and saves (evidence: `SASTCSharpFriendPart.UI/ViewModels/FriendViewModel.cs`)
- Friend editing → Friend record: deserializes (evidence: `SASTCSharpFriendPart.UI/ViewModels/FriendViewModel.cs`)
- Desktop user → Settings page: sets preferences (evidence: `README.md`)
- Settings page → Settings controls: uses (evidence: `SASTCSharpFriendPart.UI/Views/SettingsPage.xaml.cs`)
- Settings controls → Theme service: changes theme (evidence: `SASTCSharpFriendPart.UI/ViewModels/SettingsViewModel.cs`)
- Settings controls → Navigation service: opens help via (evidence: `SASTCSharpFriendPart.UI/ViewModels/SettingsViewModel.cs`)
- Main window → Theme service: initializes (evidence: `SASTCSharpFriendPart.UI/Views/MainWindow.xaml.cs`)
- Navigation service → More-info page: navigates
- More-info page → Help actions: owns (evidence: `SASTCSharpFriendPart.UI/Views/MoreInfoPage.xaml.cs`)
- Help actions → System browser: opens links (evidence: `SASTCSharpFriendPart.UI/ViewModels/MoreInfoViewModel.cs`)
- Desktop user → Chat interface: requested capability (evidence: `README.md`)
- Desktop user → Personal profile: requested capability (evidence: `README.md`)
- Chat interface → Remote service: planned sync (evidence: `README.md`)
- Chat log model → Chat interface: possible model
- Session model → Remote service: possible model
