# williamsdevo23/csci4540_group_9_project architecture

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

- Interactive diagram: https://gitdiagram.com/williamsdevo23/csci4540_group_9_project
- Repository: https://github.com/williamsdevo23/csci4540_group_9_project

## Overview

Goal Tracker is a .NET MAUI app for managing personal goals, with a local SQLite change log and a push-sync API. The user opens the app and its page loads goals and change history through the view model. Goal create, update, and delete operations are recorded locally; users can push pending changes, which are stored by the API, and successful pushes are marked synced locally. The README also describes deadlines, progress, and completion, but the sampled goal model does not implement all of those fields. Edges reflect shown calls or documented behavior; unsampled page markup and API configuration are not inferred.

Main entry points: [`Group9Project/ViewModels/GoalViewModel.cs`](https://github.com/williamsdevo23/csci4540_group_9_project/blob/main/Group9Project/ViewModels/GoalViewModel.cs) (Goal view model), [`Group9Project/Services/GoalDatabaseService.cs`](https://github.com/williamsdevo23/csci4540_group_9_project/blob/main/Group9Project/Services/GoalDatabaseService.cs) (SQLite database service), [`Group9Project/MauiProgram.cs`](https://github.com/williamsdevo23/csci4540_group_9_project/blob/main/Group9Project/MauiProgram.cs) (Service registration), [`GoalTrackerApi/Program.cs`](https://github.com/williamsdevo23/csci4540_group_9_project/blob/main/GoalTrackerApi/Program.cs) (Sync API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_mobile["Mobile application"]
  node_app["MAUI app<br/>[App.xaml.cs]"]
  node_shell["App shell<br/>[AppShell.xaml.cs]"]
  node_page["Goal page<br/>[MainPage.xaml.cs]"]
  node_viewmodel["Goal view model<br/>[GoalViewModel.cs]"]
  node_registration["Service registration<br/>[MauiProgram.cs]"]
end

subgraph group_local["Local goal data"]
  node_goal["Goal record<br/>[Goals.cs]"]
  node_change["Change record<br/>[GoalChange.cs]"]
  node_database[("SQLite database service")]
end

subgraph group_sync["Synchronization"]
  node_syncservice["Sync service<br/>[SyncService.cs]"]
  node_api["Sync API<br/>[Program.cs]"]
  node_received[("Received changes<br/>[Program.cs]")]
  node_apichange["API change record<br/>[GoalChange.cs]"]
end

node_user(("Goal user"))

node_user -->|"uses"| node_page
node_app -->|"creates window"| node_shell
node_page -->|"loads through"| node_viewmodel
node_registration -->|"registers"| node_viewmodel
node_registration -->|"registers"| node_database
node_registration -->|"registers"| node_syncservice
node_viewmodel -->|"loads and changes"| node_database
node_viewmodel -->|"pushes pending"| node_syncservice
node_database -->|"stores"| node_goal
node_database -->|"tracks changes"| node_change
node_syncservice -->|"posts changes"| node_api
node_api -->|"stores received"| node_received
node_api -->|"accepts records"| node_apichange

click node_app "https://github.com/williamsdevo23/csci4540_group_9_project/blob/main/Group9Project/App.xaml.cs"
click node_shell "https://github.com/williamsdevo23/csci4540_group_9_project/blob/main/Group9Project/AppShell.xaml.cs"
click node_page "https://github.com/williamsdevo23/csci4540_group_9_project/blob/main/Group9Project/MainPage.xaml.cs"
click node_viewmodel "https://github.com/williamsdevo23/csci4540_group_9_project/blob/main/Group9Project/ViewModels/GoalViewModel.cs"
click node_registration "https://github.com/williamsdevo23/csci4540_group_9_project/blob/main/Group9Project/MauiProgram.cs"
click node_goal "https://github.com/williamsdevo23/csci4540_group_9_project/blob/main/Group9Project/Models/Goals.cs"
click node_change "https://github.com/williamsdevo23/csci4540_group_9_project/blob/main/Group9Project/Models/GoalChange.cs"
click node_database "https://github.com/williamsdevo23/csci4540_group_9_project/blob/main/Group9Project/Services/GoalDatabaseService.cs"
click node_syncservice "https://github.com/williamsdevo23/csci4540_group_9_project/blob/main/Group9Project/Services/SyncService.cs"
click node_api "https://github.com/williamsdevo23/csci4540_group_9_project/blob/main/GoalTrackerApi/Program.cs"
click node_received "https://github.com/williamsdevo23/csci4540_group_9_project/blob/main/GoalTrackerApi/Program.cs"
click node_apichange "https://github.com/williamsdevo23/csci4540_group_9_project/blob/main/GoalTrackerApi/Models/GoalChange.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_app,node_shell,node_page,node_viewmodel,node_registration,node_user toneBlue
class node_goal,node_change,node_database toneAmber
class node_syncservice,node_api,node_received,node_apichange toneMint
```

## Components

### Mobile application

- [MAUI app](https://github.com/williamsdevo23/csci4540_group_9_project/blob/main/Group9Project/App.xaml.cs): `Group9Project/App.xaml.cs`
- [App shell](https://github.com/williamsdevo23/csci4540_group_9_project/blob/main/Group9Project/AppShell.xaml.cs): `Group9Project/AppShell.xaml.cs`
- [Goal page](https://github.com/williamsdevo23/csci4540_group_9_project/blob/main/Group9Project/MainPage.xaml.cs): `Group9Project/MainPage.xaml.cs`
- [Goal view model](https://github.com/williamsdevo23/csci4540_group_9_project/blob/main/Group9Project/ViewModels/GoalViewModel.cs): `Group9Project/ViewModels/GoalViewModel.cs`
- [Service registration](https://github.com/williamsdevo23/csci4540_group_9_project/blob/main/Group9Project/MauiProgram.cs): `Group9Project/MauiProgram.cs`

### Local goal data

- [Goal record](https://github.com/williamsdevo23/csci4540_group_9_project/blob/main/Group9Project/Models/Goals.cs): `Group9Project/Models/Goals.cs`
- [Change record](https://github.com/williamsdevo23/csci4540_group_9_project/blob/main/Group9Project/Models/GoalChange.cs): `Group9Project/Models/GoalChange.cs`
- [SQLite database service](https://github.com/williamsdevo23/csci4540_group_9_project/blob/main/Group9Project/Services/GoalDatabaseService.cs): `Group9Project/Services/GoalDatabaseService.cs`

### Synchronization

- [Sync service](https://github.com/williamsdevo23/csci4540_group_9_project/blob/main/Group9Project/Services/SyncService.cs): `Group9Project/Services/SyncService.cs`
- [Sync API](https://github.com/williamsdevo23/csci4540_group_9_project/blob/main/GoalTrackerApi/Program.cs): `GoalTrackerApi/Program.cs`
- [Received changes](https://github.com/williamsdevo23/csci4540_group_9_project/blob/main/GoalTrackerApi/Program.cs): `GoalTrackerApi/Program.cs`
- [API change record](https://github.com/williamsdevo23/csci4540_group_9_project/blob/main/GoalTrackerApi/Models/GoalChange.cs): `GoalTrackerApi/Models/GoalChange.cs`

### Other components

- **Goal user**

## Connections

- Goal user → Goal page: uses (evidence: `README.md`)
- MAUI app → App shell: creates window (evidence: `Group9Project/App.xaml.cs`)
- Goal page → Goal view model: loads through (evidence: `Group9Project/MainPage.xaml.cs`)
- Service registration → Goal view model: registers (evidence: `Group9Project/MauiProgram.cs`)
- Service registration → SQLite database service: registers (evidence: `Group9Project/MauiProgram.cs`)
- Service registration → Sync service: registers (evidence: `Group9Project/MauiProgram.cs`)
- Goal view model → SQLite database service: loads and changes (evidence: `Group9Project/ViewModels/GoalViewModel.cs`)
- Goal view model → Sync service: pushes pending (evidence: `Group9Project/ViewModels/GoalViewModel.cs`)
- SQLite database service → Goal record: stores (evidence: `Group9Project/Services/GoalDatabaseService.cs`)
- SQLite database service → Change record: tracks changes (evidence: `Group9Project/Services/GoalDatabaseService.cs`)
- Sync service → Sync API: posts changes (evidence: `Group9Project/Services/SyncService.cs`)
- Sync API → Received changes: stores received (evidence: `GoalTrackerApi/Program.cs`)
- Sync API → API change record: accepts records (evidence: `GoalTrackerApi/Program.cs`)
