# tanjim45/expense_tracker architecture

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

- Interactive diagram: https://gitdiagram.com/tanjim45/expense_tracker
- Repository: https://github.com/tanjim45/expense_tracker

## Overview

This Flutter expense-tracking app appears to let a user record transactions and review spending through home, chart, daily-report, and monthly-report screens. Its Dart tree also identifies a transaction model, a Firestore service, and reusable summary and transaction cards. The README is only a Flutter starter template, and no Dart source was excerpted, so the screen/data relationships below are plausible but unverified; dashed edges mark that limit. Native platform runners and generated plugin registrants are hosting infrastructure, not expense-tracking product components.

Main entry points: [`lib/services/firestore_service.dart`](https://github.com/tanjim45/expense_tracker/blob/main/lib/services/firestore_service.dart) (Firestore service), [`lib/screens/home_screen.dart`](https://github.com/tanjim45/expense_tracker/blob/main/lib/screens/home_screen.dart) (Home screen), [`lib/screens/add_transaction_screen.dart`](https://github.com/tanjim45/expense_tracker/blob/main/lib/screens/add_transaction_screen.dart) (Add transaction), [`lib/widgets/transaction_card.dart`](https://github.com/tanjim45/expense_tracker/blob/main/lib/widgets/transaction_card.dart) (Transaction card)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App navigation"]
  node_entry["App entry<br/>[main.dart]"]
  node_home["Home screen<br/>[home_screen.dart]"]
end

subgraph group_transactions["Transaction management"]
  node_add["Add transaction"]
  node_txmodel["Transaction model"]
  node_firestore["Firestore service"]
  node_store[("Firestore")]
  node_txcard["Transaction card"]
end

subgraph group_insights["Spending insights"]
  node_summary["Summary card<br/>[summary_card.dart]"]
  node_chart["Chart screen<br/>[chart_screen.dart]"]
  node_daily["Daily report"]
  node_monthly["Monthly report"]
end

node_user(("User"))

node_user -.->|"launches"| node_entry
node_entry -.->|"opens"| node_home
node_user -.->|"records spending"| node_add
node_add -.->|"saves transaction"| node_firestore
node_firestore -.->|"reads and writes"| node_store
node_home -.->|"loads transactions"| node_firestore
node_home -.->|"shows transactions"| node_txcard
node_home -.->|"shows summary"| node_summary
node_chart -.->|"loads transactions"| node_firestore
node_daily -.->|"loads transactions"| node_firestore
node_monthly -.->|"loads transactions"| node_firestore
node_chart -.->|"renders summary"| node_summary
node_daily -.->|"shows transactions"| node_txcard
node_monthly -.->|"shows transactions"| node_txcard
node_add -.->|"creates model"| node_txmodel
node_firestore -.->|"uses model"| node_txmodel

click node_entry "https://github.com/tanjim45/expense_tracker/blob/main/lib/main.dart"
click node_home "https://github.com/tanjim45/expense_tracker/blob/main/lib/screens/home_screen.dart"
click node_add "https://github.com/tanjim45/expense_tracker/blob/main/lib/screens/add_transaction_screen.dart"
click node_txmodel "https://github.com/tanjim45/expense_tracker/blob/main/lib/models/transaction_model.dart"
click node_firestore "https://github.com/tanjim45/expense_tracker/blob/main/lib/services/firestore_service.dart"
click node_txcard "https://github.com/tanjim45/expense_tracker/blob/main/lib/widgets/transaction_card.dart"
click node_summary "https://github.com/tanjim45/expense_tracker/blob/main/lib/widgets/summary_card.dart"
click node_chart "https://github.com/tanjim45/expense_tracker/blob/main/lib/screens/chart_screen.dart"
click node_daily "https://github.com/tanjim45/expense_tracker/blob/main/lib/screens/daily_report_screen.dart"
click node_monthly "https://github.com/tanjim45/expense_tracker/blob/main/lib/screens/monthly_report_screen.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_home,node_user toneBlue
class node_add,node_txmodel,node_firestore,node_store,node_txcard toneAmber
class node_summary,node_chart,node_daily,node_monthly toneMint
```

## Components

### App navigation

- [App entry](https://github.com/tanjim45/expense_tracker/blob/main/lib/main.dart): `lib/main.dart`
- [Home screen](https://github.com/tanjim45/expense_tracker/blob/main/lib/screens/home_screen.dart): `lib/screens/home_screen.dart`

### Transaction management

- [Add transaction](https://github.com/tanjim45/expense_tracker/blob/main/lib/screens/add_transaction_screen.dart): `lib/screens/add_transaction_screen.dart`
- [Transaction model](https://github.com/tanjim45/expense_tracker/blob/main/lib/models/transaction_model.dart): `lib/models/transaction_model.dart`
- [Firestore service](https://github.com/tanjim45/expense_tracker/blob/main/lib/services/firestore_service.dart): `lib/services/firestore_service.dart`
- **Firestore**
- [Transaction card](https://github.com/tanjim45/expense_tracker/blob/main/lib/widgets/transaction_card.dart): `lib/widgets/transaction_card.dart`

### Spending insights

- [Summary card](https://github.com/tanjim45/expense_tracker/blob/main/lib/widgets/summary_card.dart): `lib/widgets/summary_card.dart`
- [Chart screen](https://github.com/tanjim45/expense_tracker/blob/main/lib/screens/chart_screen.dart): `lib/screens/chart_screen.dart`
- [Daily report](https://github.com/tanjim45/expense_tracker/blob/main/lib/screens/daily_report_screen.dart): `lib/screens/daily_report_screen.dart`
- [Monthly report](https://github.com/tanjim45/expense_tracker/blob/main/lib/screens/monthly_report_screen.dart): `lib/screens/monthly_report_screen.dart`

### Other components

- **User**

## Connections

- User → App entry: launches
- App entry → Home screen: opens
- User → Add transaction: records spending
- Add transaction → Firestore service: saves transaction
- Firestore service → Firestore: reads and writes
- Home screen → Firestore service: loads transactions
- Home screen → Transaction card: shows transactions
- Home screen → Summary card: shows summary
- Chart screen → Firestore service: loads transactions
- Daily report → Firestore service: loads transactions
- Monthly report → Firestore service: loads transactions
- Chart screen → Summary card: renders summary
- Daily report → Transaction card: shows transactions
- Monthly report → Transaction card: shows transactions
- Add transaction → Transaction model: creates model
- Firestore service → Transaction model: uses model
