# go-obito/largent architecture

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

- Interactive diagram: https://gitdiagram.com/go-obito/largent
- Repository: https://github.com/go-obito/largent

## Overview

This is an Expo personal-finance app for recording income and expenses, setting budgets, reviewing spending, and importing CSV transactions. The principal workflow runs from a user action in a screen or form through a Zustand store to locally persisted finance records; dashboard and report screens derive summaries from those records. CSV import has a separate parsing/API stage. The tree and excerpts support these main paths, but do not establish how cloud-finance is invoked or connected to a remote service.

Main entry points: [`src/store/transactions.ts`](https://github.com/go-obito/largent/blob/main/src/store/transactions.ts) (Transaction store), [`src/app/(tabs)/index.tsx`](https://github.com/go-obito/largent/blob/main/src/app/(tabs)/index.tsx) (Dashboard), [`src/store/budgets.ts`](https://github.com/go-obito/largent/blob/main/src/store/budgets.ts) (Budget store), [`src/lib/currency.ts`](https://github.com/go-obito/largent/blob/main/src/lib/currency.ts) (Currency utilities)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["App experience"]
  node_auth["Onboarding and auth<br/>[onboarding.tsx]"]
  node_dashboard["Dashboard<br/>[index.tsx]"]
  node_transaction_form["Transaction form"]
  node_budget_form["Budget form<br/>[budget-form.tsx]"]
  node_transaction_list["Transaction screens<br/>[transactions.tsx]"]
  node_budget_screen["Budget screens<br/>[budgets.tsx]"]
end

subgraph group_finance["Finance records"]
  node_transaction_store["Transaction store<br/>[transactions.ts]"]
  node_budget_store["Budget store<br/>[budgets.ts]"]
  node_needs_store["Needs store<br/>[needs.ts]"]
  node_finance_ops["Finance operations"]
  node_needs_ops["Needs operations"]
  node_local_storage[("Local persistence")]
  node_currency["Currency utilities<br/>[currency.ts]"]
  node_categories["Categories<br/>[categories.ts]"]
  node_finance_types["Finance types<br/>[finance.ts]"]
  node_cloud_finance["Cloud finance integration<br/>[cloud-finance.ts]"]
  node_supabase["Supabase client<br/>[supabase.ts]"]
end

subgraph group_insights["Spending insights"]
  node_report_screen["Reports<br/>[reports.tsx]"]
  node_finance_calculations["Finance calculations<br/>[finance.ts]"]
end

subgraph group_import["CSV import"]
  node_csv_screen["Import screen<br/>[import.tsx]"]
  node_csv_api["CSV import API<br/>[import-csv+api.ts]"]
  node_csv_parser["CSV parser<br/>[csv.ts]"]
end

node_user(("User"))

node_user -->|"starts onboarding"| node_auth
node_user -->|"opens app"| node_dashboard
node_dashboard -->|"opens entry"| node_transaction_form
node_transaction_form -->|"parses amount"| node_currency
node_transaction_form -->|"adds or edits"| node_transaction_store
node_transaction_store -->|"validates and updates"| node_finance_ops
node_budget_form -->|"parses limit"| node_currency
node_budget_form -->|"adds or edits"| node_budget_store
node_budget_store -->|"validates and updates"| node_finance_ops
node_transaction_store -->|"persists records"| node_local_storage
node_budget_store -->|"persists records"| node_local_storage
node_needs_store -->|"delegates updates"| node_needs_ops
node_dashboard -->|"reads transactions"| node_transaction_store
node_dashboard -->|"reads budgets"| node_budget_store
node_dashboard -->|"reads and updates needs"| node_needs_store
node_dashboard -->|"calculates spending"| node_finance_calculations
node_budget_screen -->|"reads budgets"| node_budget_store
node_budget_screen -->|"reads transactions"| node_transaction_store
node_budget_screen -->|"calculates spend"| node_finance_calculations
node_transaction_list -.->|"reads transactions"| node_transaction_store
node_report_screen -->|"reads transactions"| node_transaction_store
node_report_screen -->|"builds summaries"| node_finance_calculations
node_csv_screen -->|"parses amounts"| node_currency
node_csv_screen -->|"saves imported records"| node_transaction_store
node_csv_screen -.->|"requests CSV parsing"| node_csv_api
node_csv_api -->|"parses CSV"| node_csv_parser
node_csv_api -->|"parses amounts"| node_currency
node_cloud_finance -->|"uses client"| node_supabase

click node_auth "https://github.com/go-obito/largent/blob/main/src/app/(auth)/onboarding.tsx"
click node_dashboard "https://github.com/go-obito/largent/blob/main/src/app/(tabs)/index.tsx"
click node_transaction_form "https://github.com/go-obito/largent/blob/main/src/components/transactions/transaction-form.tsx"
click node_budget_form "https://github.com/go-obito/largent/blob/main/src/components/budgets/budget-form.tsx"
click node_transaction_list "https://github.com/go-obito/largent/blob/main/src/app/(tabs)/transactions.tsx"
click node_budget_screen "https://github.com/go-obito/largent/blob/main/src/app/(tabs)/budgets.tsx"
click node_report_screen "https://github.com/go-obito/largent/blob/main/src/app/(tabs)/reports.tsx"
click node_transaction_store "https://github.com/go-obito/largent/blob/main/src/store/transactions.ts"
click node_budget_store "https://github.com/go-obito/largent/blob/main/src/store/budgets.ts"
click node_needs_store "https://github.com/go-obito/largent/blob/main/src/store/needs.ts"
click node_finance_ops "https://github.com/go-obito/largent/blob/main/src/store/finance-operations.ts"
click node_needs_ops "https://github.com/go-obito/largent/blob/main/src/store/needs-operations.ts"
click node_finance_calculations "https://github.com/go-obito/largent/blob/main/src/lib/finance.ts"
click node_currency "https://github.com/go-obito/largent/blob/main/src/lib/currency.ts"
click node_categories "https://github.com/go-obito/largent/blob/main/src/data/categories.ts"
click node_finance_types "https://github.com/go-obito/largent/blob/main/src/types/finance.ts"
click node_csv_screen "https://github.com/go-obito/largent/blob/main/src/app/import.tsx"
click node_csv_api "https://github.com/go-obito/largent/blob/main/src/app/api/import-csv%2Bapi.ts"
click node_csv_parser "https://github.com/go-obito/largent/blob/main/src/lib/csv.ts"
click node_cloud_finance "https://github.com/go-obito/largent/blob/main/src/lib/cloud-finance.ts"
click node_supabase "https://github.com/go-obito/largent/blob/main/src/lib/supabase.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_auth,node_dashboard,node_transaction_form,node_budget_form,node_transaction_list,node_budget_screen,node_user toneBlue
class node_transaction_store,node_budget_store,node_needs_store,node_finance_ops,node_needs_ops,node_local_storage,node_currency,node_categories,node_finance_types,node_cloud_finance,node_supabase toneAmber
class node_report_screen,node_finance_calculations toneMint
class node_csv_screen,node_csv_api,node_csv_parser toneRose
```

## Components

### App experience

- [Onboarding and auth](https://github.com/go-obito/largent/blob/main/src/app/(auth)/onboarding.tsx): `src/app/(auth)/onboarding.tsx`
- [Dashboard](https://github.com/go-obito/largent/blob/main/src/app/(tabs)/index.tsx): `src/app/(tabs)/index.tsx`
- [Transaction form](https://github.com/go-obito/largent/blob/main/src/components/transactions/transaction-form.tsx): `src/components/transactions/transaction-form.tsx`
- [Budget form](https://github.com/go-obito/largent/blob/main/src/components/budgets/budget-form.tsx): `src/components/budgets/budget-form.tsx`
- [Transaction screens](https://github.com/go-obito/largent/blob/main/src/app/(tabs)/transactions.tsx): `src/app/(tabs)/transactions.tsx`
- [Budget screens](https://github.com/go-obito/largent/blob/main/src/app/(tabs)/budgets.tsx): `src/app/(tabs)/budgets.tsx`

### Finance records

- [Transaction store](https://github.com/go-obito/largent/blob/main/src/store/transactions.ts): `src/store/transactions.ts`
- [Budget store](https://github.com/go-obito/largent/blob/main/src/store/budgets.ts): `src/store/budgets.ts`
- [Needs store](https://github.com/go-obito/largent/blob/main/src/store/needs.ts): `src/store/needs.ts`
- [Finance operations](https://github.com/go-obito/largent/blob/main/src/store/finance-operations.ts): `src/store/finance-operations.ts`
- [Needs operations](https://github.com/go-obito/largent/blob/main/src/store/needs-operations.ts): `src/store/needs-operations.ts`
- **Local persistence**
- [Currency utilities](https://github.com/go-obito/largent/blob/main/src/lib/currency.ts): `src/lib/currency.ts`
- [Categories](https://github.com/go-obito/largent/blob/main/src/data/categories.ts): `src/data/categories.ts`
- [Finance types](https://github.com/go-obito/largent/blob/main/src/types/finance.ts): `src/types/finance.ts`
- [Cloud finance integration](https://github.com/go-obito/largent/blob/main/src/lib/cloud-finance.ts): `src/lib/cloud-finance.ts`
- [Supabase client](https://github.com/go-obito/largent/blob/main/src/lib/supabase.ts): `src/lib/supabase.ts`

### Spending insights

- [Reports](https://github.com/go-obito/largent/blob/main/src/app/(tabs)/reports.tsx): `src/app/(tabs)/reports.tsx`
- [Finance calculations](https://github.com/go-obito/largent/blob/main/src/lib/finance.ts): `src/lib/finance.ts`

### CSV import

- [Import screen](https://github.com/go-obito/largent/blob/main/src/app/import.tsx): `src/app/import.tsx`
- [CSV import API](https://github.com/go-obito/largent/blob/main/src/app/api/import-csv%2Bapi.ts): `src/app/api/import-csv+api.ts`
- [CSV parser](https://github.com/go-obito/largent/blob/main/src/lib/csv.ts): `src/lib/csv.ts`

### Other components

- **User**

## Connections

- User → Onboarding and auth: starts onboarding (evidence: `src/app/(auth)/onboarding.tsx`)
- User → Dashboard: opens app (evidence: `src/app/(tabs)/index.tsx`)
- Dashboard → Transaction form: opens entry (evidence: `src/app/(tabs)/index.tsx`)
- Transaction form → Currency utilities: parses amount (evidence: `src/components/transactions/transaction-form.tsx`)
- Transaction form → Transaction store: adds or edits (evidence: `src/components/transactions/transaction-form.tsx`)
- Transaction store → Finance operations: validates and updates (evidence: `src/store/transactions.ts`)
- Budget form → Currency utilities: parses limit (evidence: `src/components/budgets/budget-form.tsx`)
- Budget form → Budget store: adds or edits (evidence: `src/components/budgets/budget-form.tsx`)
- Budget store → Finance operations: validates and updates (evidence: `src/store/budgets.ts`)
- Transaction store → Local persistence: persists records (evidence: `src/store/transactions.ts`)
- Budget store → Local persistence: persists records (evidence: `src/store/budgets.ts`)
- Needs store → Needs operations: delegates updates (evidence: `src/store/needs.ts`)
- Dashboard → Transaction store: reads transactions (evidence: `src/app/(tabs)/index.tsx`)
- Dashboard → Budget store: reads budgets (evidence: `src/app/(tabs)/index.tsx`)
- Dashboard → Needs store: reads and updates needs (evidence: `src/app/(tabs)/index.tsx`)
- Dashboard → Finance calculations: calculates spending (evidence: `src/app/(tabs)/index.tsx`)
- Budget screens → Budget store: reads budgets (evidence: `src/app/(tabs)/budgets.tsx`)
- Budget screens → Transaction store: reads transactions (evidence: `src/app/(tabs)/budgets.tsx`)
- Budget screens → Finance calculations: calculates spend (evidence: `src/app/(tabs)/budgets.tsx`)
- Transaction screens → Transaction store: reads transactions
- Reports → Transaction store: reads transactions (evidence: `src/app/(tabs)/reports.tsx`)
- Reports → Finance calculations: builds summaries (evidence: `src/app/(tabs)/reports.tsx`)
- Import screen → Currency utilities: parses amounts (evidence: `src/app/import.tsx`)
- Import screen → Transaction store: saves imported records (evidence: `src/app/import.tsx`)
- Import screen → CSV import API: requests CSV parsing (evidence: `README.md`)
- CSV import API → CSV parser: parses CSV (evidence: `src/app/api/import-csv+api.ts`)
- CSV import API → Currency utilities: parses amounts (evidence: `src/app/api/import-csv+api.ts`)
- Cloud finance integration → Supabase client: uses client (evidence: `src/lib/cloud-finance.ts`)
