# morttare/evabudjetti architecture

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

- Interactive diagram: https://gitdiagram.com/morttare/evabudjetti
- Repository: https://github.com/morttare/evabudjetti

## Overview

EVA MyBudget is a cross-platform personal budgeting and expense-tracking app. The main workflow starts on the home screen, where a user records an initial balance and enters the budget wizard, then manages planned and ad-hoc transactions and views balances, usable funds, and summaries. Finance hooks coordinate month-based occurrence and balance caches, with versioning for invalidation and query modules for persistence. The README documents budgeting, transaction tracking, analytics, localization, and web fallback state. Several screen and query implementations were not sampled, so uncertain screen-to-screen and query wiring is omitted.

Main entry points: [`src/finance/hook`](https://github.com/morttare/evabudjetti/tree/main/src/finance/hook) (Finance hooks), [`app/(tabs)/index.tsx`](https://github.com/morttare/evabudjetti/blob/main/app/(tabs)/index.tsx) (Home dashboard), [`src/finance/logic`](https://github.com/morttare/evabudjetti/tree/main/src/finance/logic) (Finance calculations), [`src/db/client.ts`](https://github.com/morttare/evabudjetti/blob/main/src/db/client.ts) (Database client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["App experience"]
  node_home["Home dashboard<br/>[index.tsx]"]
  node_wizard["Budget setup<br/>[budget_wizard.tsx]"]
  node_transaction_ui["Transaction screens"]
  node_budget_views["Budget views<br/>[index.tsx]"]
  node_summary_views["Summary views<br/>[index.tsx]"]
  node_funds_view["Funds view<br/>[funds.tsx]"]
  node_settings["Settings and language<br/>[settings.tsx]"]
end

subgraph group_finance["Finance domain"]
  node_finance_hooks["Finance hooks"]
  node_query_layer["Finance queries"]
  node_logic["Finance calculations"]
  node_occurrences_cache["Occurrence cache"]
  node_balance_cache["Balance cache<br/>[balanceCache.ts]"]
  node_summary_cache["Summary cache"]
  node_combined_cache["Combined cache"]
  node_versioning["Month versioning"]
  node_model["Finance data model<br/>[index.ts]"]
end

subgraph group_persistence["Persistence"]
  node_db_client["Database client<br/>[client.ts]"]
  node_db_schema["SQLite schema<br/>[schema.ts]"]
  node_sqlite[("SQLite database")]
end

subgraph group_state["App state"]
  node_app_state["Persistent UI state"]
  node_web_fallback["Web transaction fallback"]
end

node_user(("Budget user"))

node_user -->|"opens app"| node_home
node_home -->|"requests balances"| node_finance_hooks
node_finance_hooks -->|"requests usable funds"| node_finance_hooks
node_home -->|"saves reconciliation"| node_finance_hooks
node_home -->|"starts setup"| node_wizard
node_user -->|"records transactions"| node_transaction_ui
node_user -->|"reviews budget"| node_budget_views
node_user -->|"reviews analytics"| node_summary_views
node_user -->|"checks funds"| node_funds_view
node_user -->|"sets preferences"| node_settings
node_budget_views -->|"requests finance data"| node_finance_hooks
node_summary_views -->|"requests summaries"| node_finance_hooks
node_funds_view -->|"requests finance data"| node_finance_hooks
node_transaction_ui -->|"manages transactions"| node_finance_hooks
node_finance_hooks -->|"tracks month versions"| node_versioning
node_finance_hooks -->|"updates occurrences"| node_occurrences_cache
node_finance_hooks -->|"updates balances"| node_balance_cache
node_finance_hooks -->|"builds summaries"| node_summary_cache
node_finance_hooks -->|"combines results"| node_combined_cache
node_finance_hooks -->|"requests persisted data"| node_query_layer
node_occurrences_cache -->|"generates occurrences"| node_logic
node_balance_cache -->|"calculates balances"| node_logic
node_summary_cache -->|"calculates summaries"| node_logic
node_query_layer -->|"reads and writes"| node_db_client
node_db_client -->|"uses schema"| node_db_schema
node_db_client -->|"connects"| node_sqlite
node_finance_hooks -->|"uses timeframe state"| node_app_state
node_web_fallback -.->|"generates occurrences"| node_logic
node_web_fallback -.->|"persists fallback state"| node_app_state

click node_home "https://github.com/morttare/evabudjetti/blob/main/app/(tabs)/index.tsx"
click node_wizard "https://github.com/morttare/evabudjetti/blob/main/app/budget_wizard.tsx"
click node_transaction_ui "https://github.com/morttare/evabudjetti/blob/main/app/add_transaction2.tsx"
click node_budget_views "https://github.com/morttare/evabudjetti/blob/main/app/(tabs)/budget/index.tsx"
click node_summary_views "https://github.com/morttare/evabudjetti/blob/main/app/(tabs)/summary/index.tsx"
click node_funds_view "https://github.com/morttare/evabudjetti/blob/main/app/(tabs)/funds.tsx"
click node_settings "https://github.com/morttare/evabudjetti/blob/main/app/(tabs)/settings.tsx"
click node_finance_hooks "https://github.com/morttare/evabudjetti/tree/main/src/finance/hook"
click node_query_layer "https://github.com/morttare/evabudjetti/tree/main/src/finance/query"
click node_logic "https://github.com/morttare/evabudjetti/tree/main/src/finance/logic"
click node_occurrences_cache "https://github.com/morttare/evabudjetti/blob/main/src/finance/cache/transactionOccurrencesCache.ts"
click node_balance_cache "https://github.com/morttare/evabudjetti/blob/main/src/finance/cache/balanceCache.ts"
click node_summary_cache "https://github.com/morttare/evabudjetti/blob/main/src/finance/cache/transactionSummariesCache.ts"
click node_combined_cache "https://github.com/morttare/evabudjetti/blob/main/src/finance/cache/occurrencesAndBalanceCache.ts"
click node_versioning "https://github.com/morttare/evabudjetti/tree/main/src/finance/versioning"
click node_model "https://github.com/morttare/evabudjetti/blob/main/src/dataModel/index.ts"
click node_db_client "https://github.com/morttare/evabudjetti/blob/main/src/db/client.ts"
click node_db_schema "https://github.com/morttare/evabudjetti/blob/main/src/db/schema.ts"
click node_app_state "https://github.com/morttare/evabudjetti/tree/main/src/store"
click node_web_fallback "https://github.com/morttare/evabudjetti/blob/main/src/store/useWebFallbackPlannedTransactionsStore.ts"

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_home,node_wizard,node_transaction_ui,node_budget_views,node_summary_views,node_funds_view,node_settings,node_user toneBlue
class node_finance_hooks,node_query_layer,node_logic,node_occurrences_cache,node_balance_cache,node_summary_cache,node_combined_cache,node_versioning,node_model toneAmber
class node_db_client,node_db_schema,node_sqlite toneMint
class node_app_state,node_web_fallback toneRose
```

## Components

### App experience

- [Home dashboard](https://github.com/morttare/evabudjetti/blob/main/app/(tabs)/index.tsx): `app/(tabs)/index.tsx`
- [Budget setup](https://github.com/morttare/evabudjetti/blob/main/app/budget_wizard.tsx): `app/budget_wizard.tsx`
- [Transaction screens](https://github.com/morttare/evabudjetti/blob/main/app/add_transaction2.tsx): `app/add_transaction2.tsx`
- [Budget views](https://github.com/morttare/evabudjetti/blob/main/app/(tabs)/budget/index.tsx): `app/(tabs)/budget/index.tsx`
- [Summary views](https://github.com/morttare/evabudjetti/blob/main/app/(tabs)/summary/index.tsx): `app/(tabs)/summary/index.tsx`
- [Funds view](https://github.com/morttare/evabudjetti/blob/main/app/(tabs)/funds.tsx): `app/(tabs)/funds.tsx`
- [Settings and language](https://github.com/morttare/evabudjetti/blob/main/app/(tabs)/settings.tsx): `app/(tabs)/settings.tsx`

### Finance domain

- [Finance hooks](https://github.com/morttare/evabudjetti/tree/main/src/finance/hook): `src/finance/hook`
- [Finance queries](https://github.com/morttare/evabudjetti/tree/main/src/finance/query): `src/finance/query`
- [Finance calculations](https://github.com/morttare/evabudjetti/tree/main/src/finance/logic): `src/finance/logic`
- [Occurrence cache](https://github.com/morttare/evabudjetti/blob/main/src/finance/cache/transactionOccurrencesCache.ts): `src/finance/cache/transactionOccurrencesCache.ts`
- [Balance cache](https://github.com/morttare/evabudjetti/blob/main/src/finance/cache/balanceCache.ts): `src/finance/cache/balanceCache.ts`
- [Summary cache](https://github.com/morttare/evabudjetti/blob/main/src/finance/cache/transactionSummariesCache.ts): `src/finance/cache/transactionSummariesCache.ts`
- [Combined cache](https://github.com/morttare/evabudjetti/blob/main/src/finance/cache/occurrencesAndBalanceCache.ts): `src/finance/cache/occurrencesAndBalanceCache.ts`
- [Month versioning](https://github.com/morttare/evabudjetti/tree/main/src/finance/versioning): `src/finance/versioning`
- [Finance data model](https://github.com/morttare/evabudjetti/blob/main/src/dataModel/index.ts): `src/dataModel/index.ts`

### Persistence

- [Database client](https://github.com/morttare/evabudjetti/blob/main/src/db/client.ts): `src/db/client.ts`
- [SQLite schema](https://github.com/morttare/evabudjetti/blob/main/src/db/schema.ts): `src/db/schema.ts`
- **SQLite database**

### App state

- [Persistent UI state](https://github.com/morttare/evabudjetti/tree/main/src/store): `src/store`
- [Web transaction fallback](https://github.com/morttare/evabudjetti/blob/main/src/store/useWebFallbackPlannedTransactionsStore.ts): `src/store/useWebFallbackPlannedTransactionsStore.ts`

### Other components

- **Budget user**

## Connections

- Budget user → Home dashboard: opens app
- Home dashboard → Finance hooks: requests balances
- Finance hooks → Finance hooks: requests usable funds
- Home dashboard → Finance hooks: saves reconciliation
- Home dashboard → Budget setup: starts setup
- Budget user → Transaction screens: records transactions
- Budget user → Budget views: reviews budget
- Budget user → Summary views: reviews analytics
- Budget user → Funds view: checks funds
- Budget user → Settings and language: sets preferences
- Budget views → Finance hooks: requests finance data
- Summary views → Finance hooks: requests summaries
- Funds view → Finance hooks: requests finance data
- Transaction screens → Finance hooks: manages transactions
- Finance hooks → Month versioning: tracks month versions
- Finance hooks → Occurrence cache: updates occurrences
- Finance hooks → Balance cache: updates balances
- Finance hooks → Summary cache: builds summaries
- Finance hooks → Combined cache: combines results
- Finance hooks → Finance queries: requests persisted data
- Occurrence cache → Finance calculations: generates occurrences
- Balance cache → Finance calculations: calculates balances
- Summary cache → Finance calculations: calculates summaries
- Finance queries → Database client: reads and writes
- Database client → SQLite schema: uses schema
- Database client → SQLite database: connects
- Finance hooks → Persistent UI state: uses timeframe state
- Web transaction fallback → Finance calculations: generates occurrences
- Web transaction fallback → Persistent UI state: persists fallback state
