# ganesan2006/finsight architecture

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

- Interactive diagram: https://gitdiagram.com/ganesan2006/finsight
- Repository: https://github.com/ganesan2006/finsight

## Overview

Finance Copilot is an Expo personal-finance tracker. Users sign in or create an account, load a finance workspace, and manage spending, dues, investments, goals, and bills; the app calculates portfolio and budget summaries in its UI. The sampled code shows App.tsx calling financeApi for workspace loading and bill/goal updates, with financeApi using the configured Supabase client. The README documents authentication, profile storage, row-level security, and database-side transaction and bill-payment functions. Feature screen files were not substantively sampled, so their internal calls and wiring are not inferred.

Main entry points: [`App.tsx`](https://github.com/ganesan2006/finsight/blob/main/App.tsx) (App and summaries), [`src/lib/financeApi.ts`](https://github.com/ganesan2006/finsight/blob/main/src/lib/financeApi.ts) (Finance API), [`src/lib/supabase.ts`](https://github.com/ganesan2006/finsight/blob/main/src/lib/supabase.ts) (Supabase client), [`supabase/schema.sql`](https://github.com/ganesan2006/finsight/blob/main/supabase/schema.sql) (Finance schema)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application"]
  node_app_ui["App and summaries<br/>[App.tsx]"]
end

subgraph group_features["Finance features"]
  node_spend["Spend<br/>[SpendScreen.tsx]"]
  node_due["Due<br/>[DueScreen.tsx]"]
  node_invest["Invest<br/>[InvestScreen.tsx]"]
  node_goal["Goal<br/>[GoalScreen.tsx]"]
  node_bill["Bill<br/>[BillScreen.tsx]"]
end

subgraph group_data["Data access"]
  node_finance_api["Finance API<br/>[financeApi.ts]"]
  node_supabase_client["Supabase client<br/>[supabase.ts]"]
end

subgraph group_backend["Supabase backend"]
  node_schema["Finance schema<br/>[schema.sql]"]
  node_supabase[("Supabase service")]
end

node_user(("Finance user"))

node_user -->|"uses"| node_app_ui
node_app_ui -->|"loads workspace"| node_finance_api
node_app_ui -->|"updates bills and goals"| node_finance_api
node_app_ui -->|"offers tab"| node_spend
node_app_ui -->|"offers tab"| node_due
node_app_ui -->|"offers tab"| node_invest
node_app_ui -->|"offers tab"| node_goal
node_app_ui -->|"offers tab"| node_bill
node_finance_api -->|"uses client"| node_supabase_client
node_supabase_client -->|"connects to"| node_supabase
node_schema -->|"defines tables and functions"| node_supabase

click node_app_ui "https://github.com/ganesan2006/finsight/blob/main/App.tsx"
click node_spend "https://github.com/ganesan2006/finsight/blob/main/src/components/spend/SpendScreen.tsx"
click node_due "https://github.com/ganesan2006/finsight/blob/main/src/components/due/DueScreen.tsx"
click node_invest "https://github.com/ganesan2006/finsight/blob/main/src/components/invest/InvestScreen.tsx"
click node_goal "https://github.com/ganesan2006/finsight/blob/main/src/components/goal/GoalScreen.tsx"
click node_bill "https://github.com/ganesan2006/finsight/blob/main/src/components/bill/BillScreen.tsx"
click node_finance_api "https://github.com/ganesan2006/finsight/blob/main/src/lib/financeApi.ts"
click node_supabase_client "https://github.com/ganesan2006/finsight/blob/main/src/lib/supabase.ts"
click node_schema "https://github.com/ganesan2006/finsight/blob/main/supabase/schema.sql"

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_app_ui,node_user toneBlue
class node_spend,node_due,node_invest,node_goal,node_bill toneAmber
class node_finance_api,node_supabase_client toneMint
class node_schema,node_supabase toneRose
```

## Components

### Application

- [App and summaries](https://github.com/ganesan2006/finsight/blob/main/App.tsx): `App.tsx`

### Finance features

- [Spend](https://github.com/ganesan2006/finsight/blob/main/src/components/spend/SpendScreen.tsx): `src/components/spend/SpendScreen.tsx`
- [Due](https://github.com/ganesan2006/finsight/blob/main/src/components/due/DueScreen.tsx): `src/components/due/DueScreen.tsx`
- [Invest](https://github.com/ganesan2006/finsight/blob/main/src/components/invest/InvestScreen.tsx): `src/components/invest/InvestScreen.tsx`
- [Goal](https://github.com/ganesan2006/finsight/blob/main/src/components/goal/GoalScreen.tsx): `src/components/goal/GoalScreen.tsx`
- [Bill](https://github.com/ganesan2006/finsight/blob/main/src/components/bill/BillScreen.tsx): `src/components/bill/BillScreen.tsx`

### Data access

- [Finance API](https://github.com/ganesan2006/finsight/blob/main/src/lib/financeApi.ts): `src/lib/financeApi.ts`
- [Supabase client](https://github.com/ganesan2006/finsight/blob/main/src/lib/supabase.ts): `src/lib/supabase.ts`

### Supabase backend

- [Finance schema](https://github.com/ganesan2006/finsight/blob/main/supabase/schema.sql): `supabase/schema.sql`
- **Supabase service**

### Other components

- **Finance user**

## Connections

- Finance user → App and summaries: uses (evidence: `README.md`)
- App and summaries → Finance API: loads workspace (evidence: `App.tsx`)
- App and summaries → Finance API: updates bills and goals (evidence: `App.tsx`)
- App and summaries → Spend: offers tab (evidence: `README.md`)
- App and summaries → Due: offers tab (evidence: `README.md`)
- App and summaries → Invest: offers tab (evidence: `README.md`)
- App and summaries → Goal: offers tab (evidence: `README.md`)
- App and summaries → Bill: offers tab (evidence: `README.md`)
- Finance API → Supabase client: uses client (evidence: `src/lib/financeApi.ts`)
- Supabase client → Supabase service: connects to (evidence: `src/lib/supabase.ts`)
- Finance schema → Supabase service: defines tables and functions (evidence: `README.md`)
