# felixdeveloper87/personal-budget-v2 architecture

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

- Interactive diagram: https://gitdiagram.com/felixdeveloper87/personal-budget-v2
- Repository: https://github.com/felixdeveloper87/personal-budget-v2

## Overview

Personal Budget v2 is a personal-finance product with a React web client and a companion Expo/React Native client. Users authenticate, then manage accounts and transactions and explore summaries, budgets, goals, payments, reports, and household finances. The web app’s dashboard data hook loads transactions and period summaries through a shared API client; the README documents JWT-scoped backend access and PostgreSQL persistence. The backend is not present in the supplied tree, so it is represented as an external service. Mobile screen-to-data wiring is not evidenced in the excerpts.

Main entry points: [`frontend/src/pages`](https://github.com/felixdeveloper87/personal-budget-v2/tree/main/frontend/src/pages) (Feature pages), [`frontend/src/api.ts`](https://github.com/felixdeveloper87/personal-budget-v2/blob/main/frontend/src/api.ts) (API client), [`mobile/src/app/_layout.tsx`](https://github.com/felixdeveloper87/personal-budget-v2/blob/main/mobile/src/app/_layout.tsx) (Mobile app shell), [`mobile/src/services/api.ts`](https://github.com/felixdeveloper87/personal-budget-v2/blob/main/mobile/src/services/api.ts) (Mobile API service)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web application"]
  node_web_entry["Web app shell<br/>[App.tsx]"]
  node_web_pages["Feature pages"]
  node_landing["Landing page<br/>[LandingV3.tsx]"]
end

subgraph group_mobile["Mobile application"]
  node_mobile_entry["Mobile app shell<br/>[_layout.tsx]"]
  node_mobile_dashboard["Mobile dashboard"]
  node_mobile_expenses["Mobile expenses<br/>[ExpensesScreen.tsx]"]
  node_mobile_household["Mobile household"]
  node_mobile_api["Mobile API service<br/>[api.ts]"]
end

subgraph group_finance["Finance workflows"]
  node_accounts["Accounts and cards<br/>[AccountsPage.tsx]"]
  node_transactions["Transactions"]
  node_installments["Installment plans"]
  node_installment_drawer["Plan details"]
  node_installment_card["Plan summary card"]
  node_plan_logo["Plan merchant logo<br/>[PlanLogo.tsx]"]
  node_future_installments["Future installments<br/>[installments.ts]"]
  node_household["Household finance<br/>[HouseholdPage.tsx]"]
  node_household_controller["Household controller"]
end

subgraph group_insights["Analysis and planning"]
  node_dashboard["Financial dashboard<br/>[Dashboard.tsx]"]
  node_dashboard_data["Dashboard data hook"]
  node_reports["Reports and export<br/>[ReportsPage.tsx]"]
  node_planning["Budgets and goals<br/>[PlanningPage.tsx]"]
end

subgraph group_platform["Shared client services"]
  node_auth["Authentication state<br/>[AuthContext.tsx]"]
  node_api["API client<br/>[api.ts]"]
  node_toast["User notifications<br/>[toast.tsx]"]
  node_web_bootstrap["Web bootstrap<br/>[main.tsx]"]
end

node_web_user(("Finance user"))
node_mobile_user(("Mobile user"))
node_backend["Finance backend"]
node_postgres[("PostgreSQL")]

node_web_user -.->|"visits"| node_landing
node_web_user -.->|"authenticates"| node_auth
node_web_bootstrap -->|"renders"| node_web_entry
node_web_bootstrap -->|"provides"| node_auth
node_web_entry -->|"renders pages"| node_web_pages
node_web_entry -->|"reads session"| node_auth
node_auth -->|"calls login"| node_api
node_web_pages -.->|"includes"| node_dashboard
node_web_pages -.->|"includes"| node_accounts
node_web_pages -.->|"includes"| node_transactions
node_dashboard -.->|"loads data"| node_dashboard_data
node_dashboard_data -->|"requests data"| node_api
node_household -.->|"uses controller"| node_household_controller
node_household_controller -->|"loads household"| node_api
node_household_controller -->|"reports errors"| node_toast
node_installments -->|"shows plans"| node_installment_card
node_installments -->|"opens details"| node_installment_drawer
node_installment_card -->|"renders logo"| node_plan_logo
node_installment_drawer -->|"deletes plan"| node_api
node_installment_drawer -->|"confirms deletion"| node_toast
node_dashboard_data -->|"requests summaries"| node_backend
node_api -->|"sends JWT requests"| node_backend
node_backend -->|"persists data"| node_postgres
node_mobile_user -.->|"opens app"| node_mobile_entry
node_mobile_entry -.->|"routes to"| node_mobile_dashboard
node_mobile_entry -.->|"routes to"| node_mobile_expenses
node_mobile_entry -.->|"routes to"| node_mobile_household
node_mobile_dashboard -.->|"requests data"| node_mobile_api
node_mobile_expenses -.->|"requests data"| node_mobile_api
node_mobile_household -.->|"requests data"| node_mobile_api
node_mobile_api -.->|"calls API"| node_backend
node_web_pages -.->|"offers reports"| node_reports
node_web_pages -.->|"offers planning"| node_planning
node_web_pages -.->|"offers household"| node_household
node_installments -.->|"uses calculations"| node_future_installments

click node_web_entry "https://github.com/felixdeveloper87/personal-budget-v2/blob/main/frontend/src/App.tsx"
click node_web_pages "https://github.com/felixdeveloper87/personal-budget-v2/tree/main/frontend/src/pages"
click node_landing "https://github.com/felixdeveloper87/personal-budget-v2/blob/main/frontend/src/pages/landing-v3/LandingV3.tsx"
click node_accounts "https://github.com/felixdeveloper87/personal-budget-v2/blob/main/frontend/src/features/accounts/AccountsPage.tsx"
click node_transactions "https://github.com/felixdeveloper87/personal-budget-v2/blob/main/frontend/src/features/transactions/AllTransactionsPage.tsx"
click node_installments "https://github.com/felixdeveloper87/personal-budget-v2/blob/main/frontend/src/features/installments/InstallmentsPage.tsx"
click node_installment_drawer "https://github.com/felixdeveloper87/personal-budget-v2/blob/main/frontend/src/components/installments/InstallmentPlanDrawer.tsx"
click node_installment_card "https://github.com/felixdeveloper87/personal-budget-v2/blob/main/frontend/src/components/installments/InstallmentPlanCard.tsx"
click node_plan_logo "https://github.com/felixdeveloper87/personal-budget-v2/blob/main/frontend/src/components/installments/PlanLogo.tsx"
click node_future_installments "https://github.com/felixdeveloper87/personal-budget-v2/blob/main/frontend/src/utils/installments.ts"
click node_dashboard "https://github.com/felixdeveloper87/personal-budget-v2/blob/main/frontend/src/features/dashboard/Dashboard.tsx"
click node_dashboard_data "https://github.com/felixdeveloper87/personal-budget-v2/blob/main/frontend/src/hooks/useDashboardData.ts"
click node_reports "https://github.com/felixdeveloper87/personal-budget-v2/blob/main/frontend/src/features/reports/ReportsPage.tsx"
click node_planning "https://github.com/felixdeveloper87/personal-budget-v2/blob/main/frontend/src/features/planning/PlanningPage.tsx"
click node_household "https://github.com/felixdeveloper87/personal-budget-v2/blob/main/frontend/src/features/household/HouseholdPage.tsx"
click node_household_controller "https://github.com/felixdeveloper87/personal-budget-v2/blob/main/frontend/src/features/household/hooks/useHouseholdPageController.ts"
click node_auth "https://github.com/felixdeveloper87/personal-budget-v2/blob/main/frontend/src/contexts/AuthContext.tsx"
click node_api "https://github.com/felixdeveloper87/personal-budget-v2/blob/main/frontend/src/api.ts"
click node_toast "https://github.com/felixdeveloper87/personal-budget-v2/blob/main/frontend/src/services/toast.tsx"
click node_web_bootstrap "https://github.com/felixdeveloper87/personal-budget-v2/blob/main/frontend/src/main.tsx"
click node_mobile_entry "https://github.com/felixdeveloper87/personal-budget-v2/blob/main/mobile/src/app/_layout.tsx"
click node_mobile_dashboard "https://github.com/felixdeveloper87/personal-budget-v2/blob/main/mobile/src/features/dashboard/DashboardScreen.tsx"
click node_mobile_expenses "https://github.com/felixdeveloper87/personal-budget-v2/blob/main/mobile/src/features/expenses/ExpensesScreen.tsx"
click node_mobile_household "https://github.com/felixdeveloper87/personal-budget-v2/blob/main/mobile/src/features/household/HouseholdScreen.tsx"
click node_mobile_api "https://github.com/felixdeveloper87/personal-budget-v2/blob/main/mobile/src/services/api.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_web_entry,node_web_pages,node_landing,node_web_user,node_mobile_user toneBlue
class node_mobile_entry,node_mobile_dashboard,node_mobile_expenses,node_mobile_household,node_mobile_api,node_postgres toneAmber
class node_accounts,node_transactions,node_installments,node_installment_drawer,node_installment_card,node_plan_logo,node_future_installments,node_household,node_household_controller toneMint
class node_dashboard,node_dashboard_data,node_reports,node_planning toneRose
class node_auth,node_api,node_toast,node_web_bootstrap,node_backend toneIndigo
```

## Components

### Web application

- [Web app shell](https://github.com/felixdeveloper87/personal-budget-v2/blob/main/frontend/src/App.tsx): `frontend/src/App.tsx`
- [Feature pages](https://github.com/felixdeveloper87/personal-budget-v2/tree/main/frontend/src/pages): `frontend/src/pages`
- [Landing page](https://github.com/felixdeveloper87/personal-budget-v2/blob/main/frontend/src/pages/landing-v3/LandingV3.tsx): `frontend/src/pages/landing-v3/LandingV3.tsx`

### Mobile application

- [Mobile app shell](https://github.com/felixdeveloper87/personal-budget-v2/blob/main/mobile/src/app/_layout.tsx): `mobile/src/app/_layout.tsx`
- [Mobile dashboard](https://github.com/felixdeveloper87/personal-budget-v2/blob/main/mobile/src/features/dashboard/DashboardScreen.tsx): `mobile/src/features/dashboard/DashboardScreen.tsx`
- [Mobile expenses](https://github.com/felixdeveloper87/personal-budget-v2/blob/main/mobile/src/features/expenses/ExpensesScreen.tsx): `mobile/src/features/expenses/ExpensesScreen.tsx`
- [Mobile household](https://github.com/felixdeveloper87/personal-budget-v2/blob/main/mobile/src/features/household/HouseholdScreen.tsx): `mobile/src/features/household/HouseholdScreen.tsx`
- [Mobile API service](https://github.com/felixdeveloper87/personal-budget-v2/blob/main/mobile/src/services/api.ts): `mobile/src/services/api.ts`

### Finance workflows

- [Accounts and cards](https://github.com/felixdeveloper87/personal-budget-v2/blob/main/frontend/src/features/accounts/AccountsPage.tsx): `frontend/src/features/accounts/AccountsPage.tsx`
- [Transactions](https://github.com/felixdeveloper87/personal-budget-v2/blob/main/frontend/src/features/transactions/AllTransactionsPage.tsx): `frontend/src/features/transactions/AllTransactionsPage.tsx`
- [Installment plans](https://github.com/felixdeveloper87/personal-budget-v2/blob/main/frontend/src/features/installments/InstallmentsPage.tsx): `frontend/src/features/installments/InstallmentsPage.tsx`
- [Plan details](https://github.com/felixdeveloper87/personal-budget-v2/blob/main/frontend/src/components/installments/InstallmentPlanDrawer.tsx): `frontend/src/components/installments/InstallmentPlanDrawer.tsx`
- [Plan summary card](https://github.com/felixdeveloper87/personal-budget-v2/blob/main/frontend/src/components/installments/InstallmentPlanCard.tsx): `frontend/src/components/installments/InstallmentPlanCard.tsx`
- [Plan merchant logo](https://github.com/felixdeveloper87/personal-budget-v2/blob/main/frontend/src/components/installments/PlanLogo.tsx): `frontend/src/components/installments/PlanLogo.tsx`
- [Future installments](https://github.com/felixdeveloper87/personal-budget-v2/blob/main/frontend/src/utils/installments.ts): `frontend/src/utils/installments.ts`
- [Household finance](https://github.com/felixdeveloper87/personal-budget-v2/blob/main/frontend/src/features/household/HouseholdPage.tsx): `frontend/src/features/household/HouseholdPage.tsx`
- [Household controller](https://github.com/felixdeveloper87/personal-budget-v2/blob/main/frontend/src/features/household/hooks/useHouseholdPageController.ts): `frontend/src/features/household/hooks/useHouseholdPageController.ts`

### Analysis and planning

- [Financial dashboard](https://github.com/felixdeveloper87/personal-budget-v2/blob/main/frontend/src/features/dashboard/Dashboard.tsx): `frontend/src/features/dashboard/Dashboard.tsx`
- [Dashboard data hook](https://github.com/felixdeveloper87/personal-budget-v2/blob/main/frontend/src/hooks/useDashboardData.ts): `frontend/src/hooks/useDashboardData.ts`
- [Reports and export](https://github.com/felixdeveloper87/personal-budget-v2/blob/main/frontend/src/features/reports/ReportsPage.tsx): `frontend/src/features/reports/ReportsPage.tsx`
- [Budgets and goals](https://github.com/felixdeveloper87/personal-budget-v2/blob/main/frontend/src/features/planning/PlanningPage.tsx): `frontend/src/features/planning/PlanningPage.tsx`

### Shared client services

- [Authentication state](https://github.com/felixdeveloper87/personal-budget-v2/blob/main/frontend/src/contexts/AuthContext.tsx): `frontend/src/contexts/AuthContext.tsx`
- [API client](https://github.com/felixdeveloper87/personal-budget-v2/blob/main/frontend/src/api.ts): `frontend/src/api.ts`
- [User notifications](https://github.com/felixdeveloper87/personal-budget-v2/blob/main/frontend/src/services/toast.tsx): `frontend/src/services/toast.tsx`
- [Web bootstrap](https://github.com/felixdeveloper87/personal-budget-v2/blob/main/frontend/src/main.tsx): `frontend/src/main.tsx`

### Other components

- **Finance user**
- **Mobile user**
- **Finance backend**
- **PostgreSQL**

## Connections

- Finance user → Landing page: visits (evidence: `README.md`)
- Finance user → Authentication state: authenticates (evidence: `README.md`)
- Web bootstrap → Web app shell: renders (evidence: `frontend/src/main.tsx`)
- Web bootstrap → Authentication state: provides (evidence: `frontend/src/main.tsx`)
- Web app shell → Feature pages: renders pages (evidence: `frontend/src/App.tsx`)
- Web app shell → Authentication state: reads session (evidence: `frontend/src/App.tsx`)
- Authentication state → API client: calls login (evidence: `frontend/src/contexts/AuthContext.tsx`)
- Feature pages → Financial dashboard: includes
- Feature pages → Accounts and cards: includes
- Feature pages → Transactions: includes
- Financial dashboard → Dashboard data hook: loads data (evidence: `frontend/src/hooks/useDashboardData.ts`)
- Dashboard data hook → API client: requests data (evidence: `frontend/src/hooks/useDashboardData.ts`)
- Household finance → Household controller: uses controller (evidence: `frontend/src/features/household/hooks/useHouseholdPageController.ts`)
- Household controller → API client: loads household (evidence: `frontend/src/features/household/hooks/useHouseholdPageController.ts`)
- Household controller → User notifications: reports errors (evidence: `frontend/src/features/household/hooks/useHouseholdPageController.ts`)
- Installment plans → Plan summary card: shows plans (evidence: `frontend/src/features/installments/InstallmentsPage.tsx`)
- Installment plans → Plan details: opens details (evidence: `frontend/src/features/installments/InstallmentsPage.tsx`)
- Plan summary card → Plan merchant logo: renders logo (evidence: `frontend/src/components/installments/InstallmentPlanCard.tsx`)
- Plan details → API client: deletes plan (evidence: `frontend/src/components/installments/InstallmentPlanDrawer.tsx`)
- Plan details → User notifications: confirms deletion (evidence: `frontend/src/components/installments/InstallmentPlanDrawer.tsx`)
- Dashboard data hook → Finance backend: requests summaries (evidence: `frontend/src/hooks/useDashboardData.ts`)
- API client → Finance backend: sends JWT requests (evidence: `README.md`)
- Finance backend → PostgreSQL: persists data (evidence: `README.md`)
- Mobile user → Mobile app shell: opens app
- Mobile app shell → Mobile dashboard: routes to
- Mobile app shell → Mobile expenses: routes to
- Mobile app shell → Mobile household: routes to
- Mobile dashboard → Mobile API service: requests data
- Mobile expenses → Mobile API service: requests data
- Mobile household → Mobile API service: requests data
- Mobile API service → Finance backend: calls API
- Feature pages → Reports and export: offers reports (evidence: `README.md`)
- Feature pages → Budgets and goals: offers planning (evidence: `README.md`)
- Feature pages → Household finance: offers household
- Installment plans → Future installments: uses calculations (evidence: `frontend/src/features/installments/InstallmentsPage.tsx`)
