# foamnr/jodtang-personal-finance architecture

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

- Interactive diagram: https://gitdiagram.com/foamnr/jodtang-personal-finance
- Repository: https://github.com/foamnr/jodtang-personal-finance

## Overview

Jod Tang is an offline Flutter personal-finance app. Users manage wallets and categories, record income, expenses, transfers and receipts, then review dashboard and monthly analytics; recurring transactions, PIN protection, and backup/export extend that workflow. The graph preserves these documented capabilities and the MVVM/repository structure, but Dart implementation excerpts were not provided, so runtime links are dashed and unverified. SQLite and local notifications are documented capabilities; their detailed wiring is not shown.

Main entry points: [`lib/data/services/database_service.dart`](https://github.com/foamnr/jodtang-personal-finance/blob/main/lib/data/services/database_service.dart) (SQLite database), [`lib/main.dart`](https://github.com/foamnr/jodtang-personal-finance/blob/main/lib/main.dart) (Flutter app), [`lib/ui/features/transactions`](https://github.com/foamnr/jodtang-personal-finance/tree/main/lib/ui/features/transactions) (Transaction management), [`lib/ui/features/recurring`](https://github.com/foamnr/jodtang-personal-finance/tree/main/lib/ui/features/recurring) (Recurring transactions)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App shell"]
  node_application["Flutter app<br/>[main.dart]"]
  node_lock_screen["PIN lock screen<br/>[pin_screen.dart]"]
  node_settings["Settings"]
  node_splash["Animated splash<br/>[splash_screen.dart]"]
end

subgraph group_finance["Finance records"]
  node_transactions["Transaction management"]
  node_transaction_repo["Transaction repository"]
  node_wallets["Wallet management"]
  node_wallet_repo["Wallet repository"]
  node_categories["Category management"]
  node_category_repo["Category repository"]
  node_receipts["Receipt attachments"]
  node_recurring["Recurring transactions"]
  node_recurring_repo["Recurring repository"]
end

subgraph group_insights["Insights"]
  node_dashboard["Dashboard"]
  node_analytics["Spending analytics"]
end

subgraph group_services["Local services"]
  node_database[("SQLite database")]
  node_security["PIN protection"]
  node_backup["Backup and export"]
  node_notifications["Scheduled notifications"]
end

subgraph group_presentation["Shared UI"]
  node_theme["Theme and shared UI"]
end

node_person(("User"))

node_person -->|"uses"| node_application
node_application -.->|"starts with"| node_splash
node_application -.->|"may require PIN"| node_lock_screen
node_person -->|"records activity"| node_transactions
node_transactions -.->|"delegates to"| node_transaction_repo
node_transactions -.->|"attaches photos"| node_receipts
node_person -->|"manages wallets"| node_wallets
node_wallets -.->|"delegates to"| node_wallet_repo
node_person -.->|"manages categories"| node_categories
node_categories -.->|"delegates to"| node_category_repo
node_person -->|"sets schedules"| node_recurring
node_recurring -.->|"delegates to"| node_recurring_repo
node_recurring -.->|"schedules alerts"| node_notifications
node_person -->|"reviews balances"| node_dashboard
node_person -->|"reviews spending"| node_analytics
node_person -->|"exports or restores"| node_backup
node_person -.->|"configures app"| node_settings
node_person -->|"uses interface"| node_theme
node_transaction_repo -.->|"stores locally"| node_database
node_wallet_repo -.->|"stores locally"| node_database
node_category_repo -.->|"stores locally"| node_database
node_recurring_repo -.->|"stores locally"| node_database
node_backup -.->|"backs up data"| node_database
node_lock_screen -.->|"checks PIN"| node_security

click node_application "https://github.com/foamnr/jodtang-personal-finance/blob/main/lib/main.dart"
click node_database "https://github.com/foamnr/jodtang-personal-finance/blob/main/lib/data/services/database_service.dart"
click node_transactions "https://github.com/foamnr/jodtang-personal-finance/tree/main/lib/ui/features/transactions"
click node_transaction_repo "https://github.com/foamnr/jodtang-personal-finance/blob/main/lib/data/repositories/transaction_repository.dart"
click node_wallets "https://github.com/foamnr/jodtang-personal-finance/tree/main/lib/ui/features/wallets"
click node_wallet_repo "https://github.com/foamnr/jodtang-personal-finance/blob/main/lib/data/repositories/wallet_repository.dart"
click node_categories "https://github.com/foamnr/jodtang-personal-finance/tree/main/lib/ui/features/categories"
click node_category_repo "https://github.com/foamnr/jodtang-personal-finance/blob/main/lib/data/repositories/category_repository.dart"
click node_receipts "https://github.com/foamnr/jodtang-personal-finance/blob/main/lib/data/services/receipt_storage_service.dart"
click node_recurring "https://github.com/foamnr/jodtang-personal-finance/tree/main/lib/ui/features/recurring"
click node_recurring_repo "https://github.com/foamnr/jodtang-personal-finance/blob/main/lib/data/repositories/recurring_repository.dart"
click node_dashboard "https://github.com/foamnr/jodtang-personal-finance/tree/main/lib/ui/features/dashboard"
click node_analytics "https://github.com/foamnr/jodtang-personal-finance/tree/main/lib/ui/features/analytics"
click node_security "https://github.com/foamnr/jodtang-personal-finance/blob/main/lib/data/services/security_service.dart"
click node_lock_screen "https://github.com/foamnr/jodtang-personal-finance/blob/main/lib/ui/features/security/views/pin_screen.dart"
click node_backup "https://github.com/foamnr/jodtang-personal-finance/blob/main/lib/data/services/backup_export_service.dart"
click node_notifications "https://github.com/foamnr/jodtang-personal-finance/blob/main/lib/data/services/notification_service.dart"
click node_settings "https://github.com/foamnr/jodtang-personal-finance/tree/main/lib/ui/features/settings"
click node_splash "https://github.com/foamnr/jodtang-personal-finance/blob/main/lib/ui/features/splash/views/splash_screen.dart"
click node_theme "https://github.com/foamnr/jodtang-personal-finance/tree/main/lib/ui/core"

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_application,node_lock_screen,node_settings,node_splash,node_person toneBlue
class node_transactions,node_transaction_repo,node_wallets,node_wallet_repo,node_categories,node_category_repo,node_receipts,node_recurring,node_recurring_repo toneAmber
class node_dashboard,node_analytics toneMint
class node_database,node_security,node_backup,node_notifications toneRose
class node_theme toneIndigo
```

## Components

### App shell

- [Flutter app](https://github.com/foamnr/jodtang-personal-finance/blob/main/lib/main.dart): `lib/main.dart`
- [PIN lock screen](https://github.com/foamnr/jodtang-personal-finance/blob/main/lib/ui/features/security/views/pin_screen.dart): `lib/ui/features/security/views/pin_screen.dart`
- [Settings](https://github.com/foamnr/jodtang-personal-finance/tree/main/lib/ui/features/settings): `lib/ui/features/settings`
- [Animated splash](https://github.com/foamnr/jodtang-personal-finance/blob/main/lib/ui/features/splash/views/splash_screen.dart): `lib/ui/features/splash/views/splash_screen.dart`

### Finance records

- [Transaction management](https://github.com/foamnr/jodtang-personal-finance/tree/main/lib/ui/features/transactions): `lib/ui/features/transactions`
- [Transaction repository](https://github.com/foamnr/jodtang-personal-finance/blob/main/lib/data/repositories/transaction_repository.dart): `lib/data/repositories/transaction_repository.dart`
- [Wallet management](https://github.com/foamnr/jodtang-personal-finance/tree/main/lib/ui/features/wallets): `lib/ui/features/wallets`
- [Wallet repository](https://github.com/foamnr/jodtang-personal-finance/blob/main/lib/data/repositories/wallet_repository.dart): `lib/data/repositories/wallet_repository.dart`
- [Category management](https://github.com/foamnr/jodtang-personal-finance/tree/main/lib/ui/features/categories): `lib/ui/features/categories`
- [Category repository](https://github.com/foamnr/jodtang-personal-finance/blob/main/lib/data/repositories/category_repository.dart): `lib/data/repositories/category_repository.dart`
- [Receipt attachments](https://github.com/foamnr/jodtang-personal-finance/blob/main/lib/data/services/receipt_storage_service.dart): `lib/data/services/receipt_storage_service.dart`
- [Recurring transactions](https://github.com/foamnr/jodtang-personal-finance/tree/main/lib/ui/features/recurring): `lib/ui/features/recurring`
- [Recurring repository](https://github.com/foamnr/jodtang-personal-finance/blob/main/lib/data/repositories/recurring_repository.dart): `lib/data/repositories/recurring_repository.dart`

### Insights

- [Dashboard](https://github.com/foamnr/jodtang-personal-finance/tree/main/lib/ui/features/dashboard): `lib/ui/features/dashboard`
- [Spending analytics](https://github.com/foamnr/jodtang-personal-finance/tree/main/lib/ui/features/analytics): `lib/ui/features/analytics`

### Local services

- [SQLite database](https://github.com/foamnr/jodtang-personal-finance/blob/main/lib/data/services/database_service.dart): `lib/data/services/database_service.dart`
- [PIN protection](https://github.com/foamnr/jodtang-personal-finance/blob/main/lib/data/services/security_service.dart): `lib/data/services/security_service.dart`
- [Backup and export](https://github.com/foamnr/jodtang-personal-finance/blob/main/lib/data/services/backup_export_service.dart): `lib/data/services/backup_export_service.dart`
- [Scheduled notifications](https://github.com/foamnr/jodtang-personal-finance/blob/main/lib/data/services/notification_service.dart): `lib/data/services/notification_service.dart`

### Shared UI

- [Theme and shared UI](https://github.com/foamnr/jodtang-personal-finance/tree/main/lib/ui/core): `lib/ui/core`

### Other components

- **User**

## Connections

- User → Flutter app: uses (evidence: `README.md`)
- Flutter app → Animated splash: starts with
- Flutter app → PIN lock screen: may require PIN
- User → Transaction management: records activity (evidence: `README.md`)
- Transaction management → Transaction repository: delegates to
- Transaction management → Receipt attachments: attaches photos
- User → Wallet management: manages wallets (evidence: `README.md`)
- Wallet management → Wallet repository: delegates to
- User → Category management: manages categories
- Category management → Category repository: delegates to
- User → Recurring transactions: sets schedules (evidence: `README.md`)
- Recurring transactions → Recurring repository: delegates to
- Recurring transactions → Scheduled notifications: schedules alerts
- User → Dashboard: reviews balances (evidence: `README.md`)
- User → Spending analytics: reviews spending (evidence: `README.md`)
- User → Backup and export: exports or restores (evidence: `README.md`)
- User → Settings: configures app
- User → Theme and shared UI: uses interface (evidence: `README.md`)
- Transaction repository → SQLite database: stores locally
- Wallet repository → SQLite database: stores locally
- Category repository → SQLite database: stores locally
- Recurring repository → SQLite database: stores locally
- Backup and export → SQLite database: backs up data
- PIN lock screen → PIN protection: checks PIN
