# nkuppan/expensemanager architecture

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

- Interactive diagram: https://gitdiagram.com/nkuppan/expensemanager
- Repository: https://github.com/nkuppan/expensemanager

## Overview

Expense Manager is an Android personal-finance app. Users record income, expenses, and transfers, organize them with accounts and categories, track budgets, and review spending summaries or export transactions. The graph preserves the README’s major feature branches and the clean-architecture persistence layers. Source excerpts are limited, so links from screens into domain and data operations are shown as unverified rather than asserted as inspected call paths.

Main entry points: [`app/src/main/kotlin/com/naveenapps/expensemanager/ui/MainScreen.kt`](https://github.com/nkuppan/expensemanager/blob/main/app/src/main/kotlin/com/naveenapps/expensemanager/ui/MainScreen.kt) (Main navigation), [`core/domain/src/main/kotlin/com/naveenapps/expensemanager/core/domain/usecase/transaction/GetAverageDataUseCase.kt`](https://github.com/nkuppan/expensemanager/blob/main/core/domain/src/main/kotlin/com/naveenapps/expensemanager/core/domain/usecase/transaction/GetAverageDataUseCase.kt) (Transaction use cases), [`core/data/src/main/kotlin/com/naveenapps/expensemanager/core/data/repository/TransactionRepositoryImpl.kt`](https://github.com/nkuppan/expensemanager/blob/main/core/data/src/main/kotlin/com/naveenapps/expensemanager/core/data/repository/TransactionRepositoryImpl.kt) (Repository implementations), [`app/src/main/kotlin/com/naveenapps/expensemanager/MainActivity.kt`](https://github.com/nkuppan/expensemanager/blob/main/app/src/main/kotlin/com/naveenapps/expensemanager/MainActivity.kt) (App entry)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app_ui["App and features"]
  node_activity["App entry<br/>[MainActivity.kt]"]
  node_main_screen["Main navigation<br/>[MainScreen.kt]"]
  node_transaction_ui["Transactions"]
  node_account_ui["Accounts"]
  node_budget_ui["Budgets"]
  node_category_ui["Categories"]
  node_dashboard_ui["Dashboard<br/>[DashboardScreen.kt]"]
  node_analysis_ui["Analysis"]
  node_export_ui["Export screen<br/>[ExportScreen.kt]"]
  node_reminder_ui["Reminders<br/>[ReminderScreen.kt]"]
end

subgraph group_domain_data["Domain and data"]
  node_transaction_domain["Transaction use cases"]
  node_repos["Repository implementations"]
  node_export_repo["CSV and PDF export"]
end

subgraph group_persistence["Local persistence"]
  node_database[("Room database")]
  node_datastore[("Preferences")]
end

subgraph group_insights_work["Insights and background work"]
  node_budget_worker["Budget alerts"]
  node_weekly_worker["Weekly summary"]
end

node_user(("User"))

node_user -->|"opens"| node_activity
node_activity -->|"renders"| node_main_screen
node_main_screen -.->|"routes to"| node_transaction_ui
node_main_screen -.->|"routes to"| node_account_ui
node_main_screen -.->|"routes to"| node_budget_ui
node_main_screen -.->|"routes to"| node_category_ui
node_main_screen -.->|"routes to"| node_dashboard_ui
node_main_screen -.->|"routes to"| node_analysis_ui
node_main_screen -.->|"routes to"| node_export_ui
node_main_screen -.->|"routes to"| node_reminder_ui
node_transaction_ui -.->|"uses"| node_transaction_domain
node_transaction_domain -.->|"reads transactions"| node_repos
node_repos -.->|"persists data"| node_database
node_export_ui -.->|"requests export"| node_export_repo
node_export_repo -.->|"exports transactions"| node_repos
node_budget_worker -.->|"reads budgets"| node_database
node_weekly_worker -->|"reads transactions"| node_repos
node_dashboard_ui -.->|"summarizes spending"| node_transaction_domain
node_analysis_ui -.->|"analyzes trends"| node_transaction_domain

click node_activity "https://github.com/nkuppan/expensemanager/blob/main/app/src/main/kotlin/com/naveenapps/expensemanager/MainActivity.kt"
click node_main_screen "https://github.com/nkuppan/expensemanager/blob/main/app/src/main/kotlin/com/naveenapps/expensemanager/ui/MainScreen.kt"
click node_transaction_ui "https://github.com/nkuppan/expensemanager/blob/main/feature/transaction/src/main/kotlin/com/naveenapps/expensemanager/feature/transaction/list/TransactionListScreen.kt"
click node_account_ui "https://github.com/nkuppan/expensemanager/blob/main/feature/account/src/main/kotlin/com/naveenapps/expensemanager/feature/account/list/AccountListScreen.kt"
click node_budget_ui "https://github.com/nkuppan/expensemanager/blob/main/feature/budget/src/main/kotlin/com/naveenapps/expensemanager/feature/budget/list/BudgetListScreen.kt"
click node_category_ui "https://github.com/nkuppan/expensemanager/blob/main/feature/category/src/main/kotlin/com/naveenapps/expensemanager/feature/category/details/CategoryDetailScreen.kt"
click node_dashboard_ui "https://github.com/nkuppan/expensemanager/blob/main/feature/dashboard/src/main/kotlin/com/naveenapps/expensemanager/feature/dashboard/DashboardScreen.kt"
click node_analysis_ui "https://github.com/nkuppan/expensemanager/blob/main/feature/analysis/src/main/kotlin/com/naveenapps/expensemanager/feature/analysis/AnalysisInsights.kt"
click node_export_ui "https://github.com/nkuppan/expensemanager/blob/main/feature/export/src/main/kotlin/com/naveenapps/expensemanager/feature/export/ExportScreen.kt"
click node_reminder_ui "https://github.com/nkuppan/expensemanager/blob/main/feature/reminder/src/main/java/com/naveenapps/expensemanager/feature/reminder/ReminderScreen.kt"
click node_transaction_domain "https://github.com/nkuppan/expensemanager/blob/main/core/domain/src/main/kotlin/com/naveenapps/expensemanager/core/domain/usecase/transaction/GetAverageDataUseCase.kt"
click node_repos "https://github.com/nkuppan/expensemanager/blob/main/core/data/src/main/kotlin/com/naveenapps/expensemanager/core/data/repository/TransactionRepositoryImpl.kt"
click node_export_repo "https://github.com/nkuppan/expensemanager/blob/main/core/data/src/main/kotlin/com/naveenapps/expensemanager/core/data/repository/export/CsvExportStrategy.kt"
click node_database "https://github.com/nkuppan/expensemanager/blob/main/core/database/src/main/kotlin/com/naveenapps/expensemanager/core/database/ExpenseManagerDatabase.kt"
click node_datastore "https://github.com/nkuppan/expensemanager/blob/main/core/datastore/src/main/kotlin/com/naveenapps/expensemanager/core/datastore/SettingsDataStore.kt"
click node_budget_worker "https://github.com/nkuppan/expensemanager/blob/main/core/notification/src/main/kotlin/com/naveenapps/expensemanager/core/notification/BudgetAlertWorker.kt"
click node_weekly_worker "https://github.com/nkuppan/expensemanager/blob/main/core/notification/src/main/kotlin/com/naveenapps/expensemanager/core/notification/WeeklySummaryWorker.kt"

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_activity,node_main_screen,node_transaction_ui,node_account_ui,node_budget_ui,node_category_ui,node_dashboard_ui,node_analysis_ui,node_export_ui,node_reminder_ui,node_user toneBlue
class node_transaction_domain,node_repos,node_export_repo toneAmber
class node_database,node_datastore toneMint
class node_budget_worker,node_weekly_worker toneRose
```

## Components

### App and features

- [App entry](https://github.com/nkuppan/expensemanager/blob/main/app/src/main/kotlin/com/naveenapps/expensemanager/MainActivity.kt): `app/src/main/kotlin/com/naveenapps/expensemanager/MainActivity.kt`
- [Main navigation](https://github.com/nkuppan/expensemanager/blob/main/app/src/main/kotlin/com/naveenapps/expensemanager/ui/MainScreen.kt): `app/src/main/kotlin/com/naveenapps/expensemanager/ui/MainScreen.kt`
- [Transactions](https://github.com/nkuppan/expensemanager/blob/main/feature/transaction/src/main/kotlin/com/naveenapps/expensemanager/feature/transaction/list/TransactionListScreen.kt): `feature/transaction/src/main/kotlin/com/naveenapps/expensemanager/feature/transaction/list/TransactionListScreen.kt`
- [Accounts](https://github.com/nkuppan/expensemanager/blob/main/feature/account/src/main/kotlin/com/naveenapps/expensemanager/feature/account/list/AccountListScreen.kt): `feature/account/src/main/kotlin/com/naveenapps/expensemanager/feature/account/list/AccountListScreen.kt`
- [Budgets](https://github.com/nkuppan/expensemanager/blob/main/feature/budget/src/main/kotlin/com/naveenapps/expensemanager/feature/budget/list/BudgetListScreen.kt): `feature/budget/src/main/kotlin/com/naveenapps/expensemanager/feature/budget/list/BudgetListScreen.kt`
- [Categories](https://github.com/nkuppan/expensemanager/blob/main/feature/category/src/main/kotlin/com/naveenapps/expensemanager/feature/category/details/CategoryDetailScreen.kt): `feature/category/src/main/kotlin/com/naveenapps/expensemanager/feature/category/details/CategoryDetailScreen.kt`
- [Dashboard](https://github.com/nkuppan/expensemanager/blob/main/feature/dashboard/src/main/kotlin/com/naveenapps/expensemanager/feature/dashboard/DashboardScreen.kt): `feature/dashboard/src/main/kotlin/com/naveenapps/expensemanager/feature/dashboard/DashboardScreen.kt`
- [Analysis](https://github.com/nkuppan/expensemanager/blob/main/feature/analysis/src/main/kotlin/com/naveenapps/expensemanager/feature/analysis/AnalysisInsights.kt): `feature/analysis/src/main/kotlin/com/naveenapps/expensemanager/feature/analysis/AnalysisInsights.kt`
- [Export screen](https://github.com/nkuppan/expensemanager/blob/main/feature/export/src/main/kotlin/com/naveenapps/expensemanager/feature/export/ExportScreen.kt): `feature/export/src/main/kotlin/com/naveenapps/expensemanager/feature/export/ExportScreen.kt`
- [Reminders](https://github.com/nkuppan/expensemanager/blob/main/feature/reminder/src/main/java/com/naveenapps/expensemanager/feature/reminder/ReminderScreen.kt): `feature/reminder/src/main/java/com/naveenapps/expensemanager/feature/reminder/ReminderScreen.kt`

### Domain and data

- [Transaction use cases](https://github.com/nkuppan/expensemanager/blob/main/core/domain/src/main/kotlin/com/naveenapps/expensemanager/core/domain/usecase/transaction/GetAverageDataUseCase.kt): `core/domain/src/main/kotlin/com/naveenapps/expensemanager/core/domain/usecase/transaction/GetAverageDataUseCase.kt`
- [Repository implementations](https://github.com/nkuppan/expensemanager/blob/main/core/data/src/main/kotlin/com/naveenapps/expensemanager/core/data/repository/TransactionRepositoryImpl.kt): `core/data/src/main/kotlin/com/naveenapps/expensemanager/core/data/repository/TransactionRepositoryImpl.kt`
- [CSV and PDF export](https://github.com/nkuppan/expensemanager/blob/main/core/data/src/main/kotlin/com/naveenapps/expensemanager/core/data/repository/export/CsvExportStrategy.kt): `core/data/src/main/kotlin/com/naveenapps/expensemanager/core/data/repository/export/CsvExportStrategy.kt`

### Local persistence

- [Room database](https://github.com/nkuppan/expensemanager/blob/main/core/database/src/main/kotlin/com/naveenapps/expensemanager/core/database/ExpenseManagerDatabase.kt): `core/database/src/main/kotlin/com/naveenapps/expensemanager/core/database/ExpenseManagerDatabase.kt`
- [Preferences](https://github.com/nkuppan/expensemanager/blob/main/core/datastore/src/main/kotlin/com/naveenapps/expensemanager/core/datastore/SettingsDataStore.kt): `core/datastore/src/main/kotlin/com/naveenapps/expensemanager/core/datastore/SettingsDataStore.kt`

### Insights and background work

- [Budget alerts](https://github.com/nkuppan/expensemanager/blob/main/core/notification/src/main/kotlin/com/naveenapps/expensemanager/core/notification/BudgetAlertWorker.kt): `core/notification/src/main/kotlin/com/naveenapps/expensemanager/core/notification/BudgetAlertWorker.kt`
- [Weekly summary](https://github.com/nkuppan/expensemanager/blob/main/core/notification/src/main/kotlin/com/naveenapps/expensemanager/core/notification/WeeklySummaryWorker.kt): `core/notification/src/main/kotlin/com/naveenapps/expensemanager/core/notification/WeeklySummaryWorker.kt`

### Other components

- **User**

## Connections

- User → App entry: opens
- App entry → Main navigation: renders (evidence: `app/src/main/kotlin/com/naveenapps/expensemanager/MainActivity.kt`)
- Main navigation → Transactions: routes to
- Main navigation → Accounts: routes to
- Main navigation → Budgets: routes to
- Main navigation → Categories: routes to
- Main navigation → Dashboard: routes to
- Main navigation → Analysis: routes to
- Main navigation → Export screen: routes to
- Main navigation → Reminders: routes to
- Transactions → Transaction use cases: uses
- Transaction use cases → Repository implementations: reads transactions
- Repository implementations → Room database: persists data
- Export screen → CSV and PDF export: requests export
- CSV and PDF export → Repository implementations: exports transactions
- Budget alerts → Room database: reads budgets (evidence: `core/notification/src/main/kotlin/com/naveenapps/expensemanager/core/notification/BudgetAlertWorker.kt`)
- Weekly summary → Repository implementations: reads transactions (evidence: `core/notification/src/main/kotlin/com/naveenapps/expensemanager/core/notification/WeeklySummaryWorker.kt`)
- Dashboard → Transaction use cases: summarizes spending
- Analysis → Transaction use cases: analyzes trends
