# mayurp375/finance_tracker architecture

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

- Interactive diagram: https://gitdiagram.com/mayurp375/finance_tracker
- Repository: https://github.com/mayurp375/finance_tracker

## Overview

This is a Flutter personal-finance tracker. Its documented workflow is to enter income and expenses, store them locally, then review monthly totals, category trends, savings progress, and history. The graph reflects the README’s capabilities and the Dart paths in the tree; Dart source excerpts were not provided, so implementation-level calls among the app layers cannot be verified. Savings goals and smart insights are documented features but have no distinct implementation path visible in the tree.

Main entry points: [`lib/provider/provider.dart`](https://github.com/mayurp375/finance_tracker/blob/master/lib/provider/provider.dart) (Finance state), [`lib/pages/dashboard.dart`](https://github.com/mayurp375/finance_tracker/blob/master/lib/pages/dashboard.dart) (Monthly dashboard), [`lib/main.dart`](https://github.com/mayurp375/finance_tracker/blob/master/lib/main.dart) (App entry), [`lib/pages/add_expence.dart`](https://github.com/mayurp375/finance_tracker/blob/master/lib/pages/add_expence.dart) (Add expense)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App entry and state"]
  node_entry["App entry<br/>[main.dart]"]
  node_state["Finance state<br/>[provider.dart]"]
  node_model["Finance records<br/>[model.dart]"]
end

subgraph group_finance["Finance workflows"]
  node_dashboard["Monthly dashboard<br/>[dashboard.dart]"]
  node_expense["Add expense<br/>[add_expence.dart]"]
  node_income["Add income<br/>[add_income.dart]"]
  node_history["Data manager<br/>[data_manager.dart]"]
  node_goals["Savings goals"]
  node_insights["Smart insights"]
end

subgraph group_storage["Local persistence"]
  node_dbservice["Database service"]
  node_localdb[("On-device database")]
end

node_user(("User"))

node_user -->|"opens app"| node_entry
node_entry -.->|"opens dashboard"| node_dashboard
node_user -->|"records spending"| node_expense
node_user -->|"records income"| node_income
node_user -->|"reviews history"| node_history
node_user -->|"tracks goals"| node_goals
node_user -->|"reviews trends"| node_insights
node_user -->|"reviews monthly totals"| node_dashboard
node_expense -.->|"updates state"| node_state
node_income -.->|"updates state"| node_state
node_state -.->|"uses records"| node_model
node_state -.->|"persists data"| node_dbservice
node_dbservice -->|"reads and writes"| node_localdb
node_dashboard -.->|"shows summaries"| node_state
node_history -.->|"shows history"| node_state

click node_entry "https://github.com/mayurp375/finance_tracker/blob/master/lib/main.dart"
click node_state "https://github.com/mayurp375/finance_tracker/blob/master/lib/provider/provider.dart"
click node_model "https://github.com/mayurp375/finance_tracker/blob/master/lib/model/model.dart"
click node_dashboard "https://github.com/mayurp375/finance_tracker/blob/master/lib/pages/dashboard.dart"
click node_expense "https://github.com/mayurp375/finance_tracker/blob/master/lib/pages/add_expence.dart"
click node_income "https://github.com/mayurp375/finance_tracker/blob/master/lib/pages/add_income.dart"
click node_history "https://github.com/mayurp375/finance_tracker/blob/master/lib/pages/data_manager.dart"
click node_goals "https://github.com/mayurp375/finance_tracker/tree/master/lib/pages"
click node_insights "https://github.com/mayurp375/finance_tracker/tree/master/lib/pages"
click node_dbservice "https://github.com/mayurp375/finance_tracker/blob/master/lib/service/database_service.dart"

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_entry,node_state,node_model,node_user toneBlue
class node_dashboard,node_expense,node_income,node_history,node_goals,node_insights toneAmber
class node_dbservice,node_localdb toneMint
```

## Components

### App entry and state

- [App entry](https://github.com/mayurp375/finance_tracker/blob/master/lib/main.dart): `lib/main.dart`
- [Finance state](https://github.com/mayurp375/finance_tracker/blob/master/lib/provider/provider.dart): `lib/provider/provider.dart`
- [Finance records](https://github.com/mayurp375/finance_tracker/blob/master/lib/model/model.dart): `lib/model/model.dart`

### Finance workflows

- [Monthly dashboard](https://github.com/mayurp375/finance_tracker/blob/master/lib/pages/dashboard.dart): `lib/pages/dashboard.dart`
- [Add expense](https://github.com/mayurp375/finance_tracker/blob/master/lib/pages/add_expence.dart): `lib/pages/add_expence.dart`
- [Add income](https://github.com/mayurp375/finance_tracker/blob/master/lib/pages/add_income.dart): `lib/pages/add_income.dart`
- [Data manager](https://github.com/mayurp375/finance_tracker/blob/master/lib/pages/data_manager.dart): `lib/pages/data_manager.dart`
- [Savings goals](https://github.com/mayurp375/finance_tracker/tree/master/lib/pages): `lib/pages`
- [Smart insights](https://github.com/mayurp375/finance_tracker/tree/master/lib/pages): `lib/pages`

### Local persistence

- [Database service](https://github.com/mayurp375/finance_tracker/blob/master/lib/service/database_service.dart): `lib/service/database_service.dart`
- **On-device database**

### Other components

- **User**

## Connections

- User → App entry: opens app (evidence: `README.md`)
- App entry → Monthly dashboard: opens dashboard
- User → Add expense: records spending (evidence: `README.md`)
- User → Add income: records income (evidence: `README.md`)
- User → Data manager: reviews history (evidence: `README.md`)
- User → Savings goals: tracks goals (evidence: `README.md`)
- User → Smart insights: reviews trends (evidence: `README.md`)
- User → Monthly dashboard: reviews monthly totals (evidence: `README.md`)
- Add expense → Finance state: updates state
- Add income → Finance state: updates state
- Finance state → Finance records: uses records
- Finance state → Database service: persists data
- Database service → On-device database: reads and writes (evidence: `README.md`)
- Monthly dashboard → Finance state: shows summaries
- Data manager → Finance state: shows history
