# sameersyd/expenso-ios architecture

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

- Interactive diagram: https://gitdiagram.com/sameersyd/expenso-ios
- Repository: https://github.com/sameersyd/expenso-ios

## Overview

Expenso is a SwiftUI expense-tracking app using Core Data and an MVVM-style structure. The main workflow is to unlock the app, view and filter the transaction dashboard, then add, edit, inspect, or delete transactions; settings also provide CSV export, and the app includes biometric authentication and chart-based summaries. The graph prioritizes app-owned features and excludes bundled charting and animation libraries. Some feature links are supported only by the README or source index, so those links are marked as unverified.

Main entry points: [`Expenso/Screens/Expense/ExpenseView.swift`](https://github.com/sameersyd/expenso-ios/blob/main/Expenso/Screens/Expense/ExpenseView.swift) (Dashboard), [`Expenso/Screens/AddExpense/AddExpenseView.swift`](https://github.com/sameersyd/expenso-ios/blob/main/Expenso/Screens/AddExpense/AddExpenseView.swift) (Add transaction), [`Expenso/Screens/Authenticate/AuthenticateView.swift`](https://github.com/sameersyd/expenso-ios/blob/main/Expenso/Screens/Authenticate/AuthenticateView.swift) (Unlock screen), [`Expenso/Screens/ExpenseFilter/ExpenseFilterView.swift`](https://github.com/sameersyd/expenso-ios/blob/main/Expenso/Screens/ExpenseFilter/ExpenseFilterView.swift) (Expense filter)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["App entry"]
  node_app["App root<br/>[ExpensoApp.swift]"]
  node_auth["Unlock screen"]
  node_dashboard["Dashboard<br/>[ExpenseView.swift]"]
  node_about["About screen<br/>[AboutView.swift]"]
end

subgraph group_transactions["Transaction management"]
  node_add["Add transaction"]
  node_addvm["Transaction editor"]
  node_attachment["Image attachment"]
  node_detail["Transaction details"]
  node_detailvm["Detail actions"]
end

subgraph group_insights["Insights and export"]
  node_filter["Expense filter"]
  node_chart["Chart display<br/>[ChartView.swift]"]
  node_settings["Expense settings"]
  node_settingsvm["Settings actions"]
  node_csv["CSV export"]
end

subgraph group_shared["Authentication and data"]
  node_authvm["Auth state"]
  node_biometric["Biometric auth"]
  node_record[("Expense record<br/>[ExpenseCD.swift]")]
  node_text["Text styling<br/>[TextView.swift]"]
end

node_user(("User"))

node_user -->|"opens"| node_app
node_app -->|"starts"| node_auth
node_app -->|"shows"| node_dashboard
node_auth -->|"invokes"| node_authvm
node_authvm -->|"authenticates"| node_biometric
node_auth -->|"navigates"| node_dashboard
node_dashboard -->|"fetches"| node_record
node_dashboard -->|"opens"| node_add
node_dashboard -->|"opens"| node_filter
node_dashboard -->|"opens"| node_detail
node_dashboard -->|"opens"| node_settings
node_dashboard -->|"opens"| node_about
node_add -->|"binds"| node_addvm
node_add -.->|"selects image"| node_attachment
node_add -.->|"saves transaction"| node_record
node_detail -.->|"uses actions"| node_detailvm
node_detail -->|"opens editor"| node_add
node_detailvm -.->|"updates record"| node_record
node_filter -->|"filters records"| node_record
node_filter -->|"renders charts"| node_chart
node_filter -->|"opens details"| node_detail
node_settings -.->|"uses actions"| node_settingsvm
node_settings -.->|"exports CSV"| node_csv
node_dashboard -->|"styles text"| node_text
node_auth -->|"styles text"| node_text
node_add -->|"styles text"| node_text

click node_app "https://github.com/sameersyd/expenso-ios/blob/main/Expenso/ExpensoApp.swift"
click node_auth "https://github.com/sameersyd/expenso-ios/blob/main/Expenso/Screens/Authenticate/AuthenticateView.swift"
click node_authvm "https://github.com/sameersyd/expenso-ios/blob/main/Expenso/Screens/Authenticate/AuthenticationViewModel.swift"
click node_biometric "https://github.com/sameersyd/expenso-ios/blob/main/Expenso/Library/Utilities/BiometricAuthUtility.swift"
click node_dashboard "https://github.com/sameersyd/expenso-ios/blob/main/Expenso/Screens/Expense/ExpenseView.swift"
click node_record "https://github.com/sameersyd/expenso-ios/blob/main/Expenso/Library/CoreData/ExpenseCD.swift"
click node_add "https://github.com/sameersyd/expenso-ios/blob/main/Expenso/Screens/AddExpense/AddExpenseView.swift"
click node_addvm "https://github.com/sameersyd/expenso-ios/blob/main/Expenso/Screens/AddExpense/AddExpenseViewModel.swift"
click node_attachment "https://github.com/sameersyd/expenso-ios/blob/main/Expenso/Library/Helpers/AttachmentHandler.swift"
click node_detail "https://github.com/sameersyd/expenso-ios/blob/main/Expenso/Screens/ExpenseDetailed/ExpenseDetailedView.swift"
click node_detailvm "https://github.com/sameersyd/expenso-ios/blob/main/Expenso/Screens/ExpenseDetailed/ExpenseDetailedViewModel.swift"
click node_filter "https://github.com/sameersyd/expenso-ios/blob/main/Expenso/Screens/ExpenseFilter/ExpenseFilterView.swift"
click node_chart "https://github.com/sameersyd/expenso-ios/blob/main/Expenso/Library/Helpers/ChartView.swift"
click node_settings "https://github.com/sameersyd/expenso-ios/blob/main/Expenso/Screens/ExpenseSettings/ExpenseSettingsView.swift"
click node_settingsvm "https://github.com/sameersyd/expenso-ios/blob/main/Expenso/Screens/ExpenseSettings/ExpenseSettingsViewModel.swift"
click node_csv "https://github.com/sameersyd/expenso-ios/blob/main/Expenso/Screens/ExpenseSettings/ExpenseCSVModel.swift"
click node_about "https://github.com/sameersyd/expenso-ios/blob/main/Expenso/Screens/About/AboutView.swift"
click node_text "https://github.com/sameersyd/expenso-ios/blob/main/Expenso/Library/Helpers/TextView.swift"

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_auth,node_dashboard,node_about,node_user toneBlue
class node_add,node_addvm,node_attachment,node_detail,node_detailvm toneAmber
class node_filter,node_chart,node_settings,node_settingsvm,node_csv toneMint
class node_authvm,node_biometric,node_record,node_text toneRose
```

## Components

### App entry

- [App root](https://github.com/sameersyd/expenso-ios/blob/main/Expenso/ExpensoApp.swift): `Expenso/ExpensoApp.swift`
- [Unlock screen](https://github.com/sameersyd/expenso-ios/blob/main/Expenso/Screens/Authenticate/AuthenticateView.swift): `Expenso/Screens/Authenticate/AuthenticateView.swift`
- [Dashboard](https://github.com/sameersyd/expenso-ios/blob/main/Expenso/Screens/Expense/ExpenseView.swift): `Expenso/Screens/Expense/ExpenseView.swift`
- [About screen](https://github.com/sameersyd/expenso-ios/blob/main/Expenso/Screens/About/AboutView.swift): `Expenso/Screens/About/AboutView.swift`

### Transaction management

- [Add transaction](https://github.com/sameersyd/expenso-ios/blob/main/Expenso/Screens/AddExpense/AddExpenseView.swift): `Expenso/Screens/AddExpense/AddExpenseView.swift`
- [Transaction editor](https://github.com/sameersyd/expenso-ios/blob/main/Expenso/Screens/AddExpense/AddExpenseViewModel.swift): `Expenso/Screens/AddExpense/AddExpenseViewModel.swift`
- [Image attachment](https://github.com/sameersyd/expenso-ios/blob/main/Expenso/Library/Helpers/AttachmentHandler.swift): `Expenso/Library/Helpers/AttachmentHandler.swift`
- [Transaction details](https://github.com/sameersyd/expenso-ios/blob/main/Expenso/Screens/ExpenseDetailed/ExpenseDetailedView.swift): `Expenso/Screens/ExpenseDetailed/ExpenseDetailedView.swift`
- [Detail actions](https://github.com/sameersyd/expenso-ios/blob/main/Expenso/Screens/ExpenseDetailed/ExpenseDetailedViewModel.swift): `Expenso/Screens/ExpenseDetailed/ExpenseDetailedViewModel.swift`

### Insights and export

- [Expense filter](https://github.com/sameersyd/expenso-ios/blob/main/Expenso/Screens/ExpenseFilter/ExpenseFilterView.swift): `Expenso/Screens/ExpenseFilter/ExpenseFilterView.swift`
- [Chart display](https://github.com/sameersyd/expenso-ios/blob/main/Expenso/Library/Helpers/ChartView.swift): `Expenso/Library/Helpers/ChartView.swift`
- [Expense settings](https://github.com/sameersyd/expenso-ios/blob/main/Expenso/Screens/ExpenseSettings/ExpenseSettingsView.swift): `Expenso/Screens/ExpenseSettings/ExpenseSettingsView.swift`
- [Settings actions](https://github.com/sameersyd/expenso-ios/blob/main/Expenso/Screens/ExpenseSettings/ExpenseSettingsViewModel.swift): `Expenso/Screens/ExpenseSettings/ExpenseSettingsViewModel.swift`
- [CSV export](https://github.com/sameersyd/expenso-ios/blob/main/Expenso/Screens/ExpenseSettings/ExpenseCSVModel.swift): `Expenso/Screens/ExpenseSettings/ExpenseCSVModel.swift`

### Authentication and data

- [Auth state](https://github.com/sameersyd/expenso-ios/blob/main/Expenso/Screens/Authenticate/AuthenticationViewModel.swift): `Expenso/Screens/Authenticate/AuthenticationViewModel.swift`
- [Biometric auth](https://github.com/sameersyd/expenso-ios/blob/main/Expenso/Library/Utilities/BiometricAuthUtility.swift): `Expenso/Library/Utilities/BiometricAuthUtility.swift`
- [Expense record](https://github.com/sameersyd/expenso-ios/blob/main/Expenso/Library/CoreData/ExpenseCD.swift): `Expenso/Library/CoreData/ExpenseCD.swift`
- [Text styling](https://github.com/sameersyd/expenso-ios/blob/main/Expenso/Library/Helpers/TextView.swift): `Expenso/Library/Helpers/TextView.swift`

### Other components

- **User**

## Connections

- User → App root: opens (evidence: `README.md`)
- App root → Unlock screen: starts (evidence: `Expenso/ExpensoApp.swift`)
- App root → Dashboard: shows (evidence: `Expenso/ExpensoApp.swift`)
- Unlock screen → Auth state: invokes (evidence: `Expenso/Screens/Authenticate/AuthenticateView.swift`)
- Auth state → Biometric auth: authenticates (evidence: `Expenso/Screens/Authenticate/AuthenticationViewModel.swift`)
- Unlock screen → Dashboard: navigates (evidence: `Expenso/Screens/Authenticate/AuthenticateView.swift`)
- Dashboard → Expense record: fetches (evidence: `Expenso/Screens/Expense/ExpenseView.swift`)
- Dashboard → Add transaction: opens (evidence: `Expenso/Screens/Expense/ExpenseView.swift`)
- Dashboard → Expense filter: opens (evidence: `Expenso/Screens/Expense/ExpenseView.swift`)
- Dashboard → Transaction details: opens (evidence: `Expenso/Screens/Expense/ExpenseView.swift`)
- Dashboard → Expense settings: opens (evidence: `Expenso/Screens/Expense/ExpenseView.swift`)
- Dashboard → About screen: opens (evidence: `Expenso/Screens/Expense/ExpenseView.swift`)
- Add transaction → Transaction editor: binds (evidence: `Expenso/Screens/AddExpense/AddExpenseView.swift`)
- Add transaction → Image attachment: selects image
- Add transaction → Expense record: saves transaction
- Transaction details → Detail actions: uses actions (evidence: `Expenso/Screens/ExpenseDetailed/ExpenseDetailedView.swift`)
- Transaction details → Add transaction: opens editor (evidence: `Expenso/Screens/ExpenseDetailed/ExpenseDetailedView.swift`)
- Detail actions → Expense record: updates record
- Expense filter → Expense record: filters records (evidence: `Expenso/Screens/ExpenseFilter/ExpenseFilterView.swift`)
- Expense filter → Chart display: renders charts (evidence: `Expenso/Screens/ExpenseFilter/ExpenseFilterView.swift`)
- Expense filter → Transaction details: opens details (evidence: `Expenso/Screens/ExpenseFilter/ExpenseFilterView.swift`)
- Expense settings → Settings actions: uses actions (evidence: `Expenso/Screens/ExpenseSettings/ExpenseSettingsView.swift`)
- Expense settings → CSV export: exports CSV (evidence: `README.md`)
- Dashboard → Text styling: styles text (evidence: `Expenso/Screens/Expense/ExpenseView.swift`)
- Unlock screen → Text styling: styles text (evidence: `Expenso/Screens/Authenticate/AuthenticateView.swift`)
- Add transaction → Text styling: styles text (evidence: `Expenso/Screens/AddExpense/AddExpenseView.swift`)
