# tarangpatel03/equisplit architecture

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

- Interactive diagram: https://gitdiagram.com/tarangpatel03/equisplit
- Repository: https://github.com/tarangpatel03/equisplit

## Overview

EquiSplit is an offline-first group expense tracker. Users add members and record expenses with payer contributions and equal, exact, shares-based, or itemized splits; the app persists data locally and presents group and pairwise balances, settlement recommendations, expense details, and spending analytics. The graph follows the sampled app initialization, home and member hooks, expense-save hook, category manager, and SQLite service. Other documented features are retained at their supported screen or subsystem paths; their internal wiring was not sampled.

Main entry points: [`src/navigation/RootNavigation.tsx`](https://github.com/tarangpatel03/equisplit/blob/main/src/navigation/RootNavigation.tsx) (App navigation), [`src/services/database/database.service.ts`](https://github.com/tarangpatel03/equisplit/blob/main/src/services/database/database.service.ts) (SQLite database), [`src/screens/Home/hooks/useHomeScreen.ts`](https://github.com/tarangpatel03/equisplit/blob/main/src/screens/Home/hooks/useHomeScreen.ts) (Home data hook), [`src/screens/Members/hooks/useMembersScreen.ts`](https://github.com/tarangpatel03/equisplit/blob/main/src/screens/Members/hooks/useMembersScreen.ts) (Member data hook)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App experience"]
  node_app["App bootstrap<br/>[App.tsx]"]
  node_navigation["App navigation<br/>[RootNavigation.tsx]"]
  node_home["Home dashboard<br/>[index.tsx]"]
  node_homehook["Home data hook<br/>[useHomeScreen.ts]"]
end

subgraph group_expenses["Expense workflows"]
  node_expenseform["Expense editor<br/>[index.tsx]"]
  node_expensehook["Expense save hook"]
  node_splitdetails["Expense details<br/>[index.tsx]"]
  node_categorymanager["Category manager"]
end

subgraph group_insights["Balances and insights"]
  node_members["Member management<br/>[index.tsx]"]
  node_membershook["Member data hook"]
  node_analytics["Spending analytics<br/>[index.tsx]"]
  node_analyticshook["Analytics hook<br/>[useAnalytics.ts]"]
  node_balance["Balance calculations<br/>[balance.ts]"]
end

subgraph group_data["Local data"]
  node_store["Redux state<br/>[store.ts]"]
  node_database[("SQLite database")]
  node_categories["Category defaults"]
end

node_user(("App user"))

node_user -->|"opens screens"| node_navigation
node_app -->|"initializes"| node_database
node_app -->|"renders"| node_navigation
node_navigation -->|"routes to"| node_home
node_navigation -->|"routes to"| node_expenseform
node_navigation -->|"routes to"| node_splitdetails
node_navigation -->|"routes to"| node_members
node_navigation -->|"routes to"| node_analytics
node_home -->|"uses"| node_homehook
node_homehook -->|"loads and writes"| node_database
node_homehook -->|"dispatches state"| node_store
node_homehook -->|"computes balances"| node_balance
node_expenseform -->|"uses"| node_expensehook
node_expensehook -->|"saves expenses"| node_database
node_expensehook -->|"dispatches updates"| node_store
node_members -->|"uses"| node_membershook
node_membershook -->|"adds and removes"| node_database
node_membershook -->|"dispatches updates"| node_store
node_membershook -->|"computes balances"| node_balance
node_analytics -->|"uses"| node_analyticshook
node_categorymanager -->|"manages categories"| node_database
node_categorymanager -->|"dispatches updates"| node_store
node_categorymanager -->|"reloads expenses"| node_database
node_database -->|"seeds defaults"| node_categories

click node_app "https://github.com/tarangpatel03/equisplit/blob/main/App.tsx"
click node_navigation "https://github.com/tarangpatel03/equisplit/blob/main/src/navigation/RootNavigation.tsx"
click node_home "https://github.com/tarangpatel03/equisplit/blob/main/src/screens/Home/index.tsx"
click node_homehook "https://github.com/tarangpatel03/equisplit/blob/main/src/screens/Home/hooks/useHomeScreen.ts"
click node_expenseform "https://github.com/tarangpatel03/equisplit/blob/main/src/screens/AddEditExpense/index.tsx"
click node_expensehook "https://github.com/tarangpatel03/equisplit/blob/main/src/screens/AddEditExpense/hooks/useAddEditExpense.ts"
click node_splitdetails "https://github.com/tarangpatel03/equisplit/blob/main/src/screens/SplitDetails/index.tsx"
click node_categorymanager "https://github.com/tarangpatel03/equisplit/blob/main/src/components/common/CategoryManagerModal.tsx"
click node_members "https://github.com/tarangpatel03/equisplit/blob/main/src/screens/Members/index.tsx"
click node_membershook "https://github.com/tarangpatel03/equisplit/blob/main/src/screens/Members/hooks/useMembersScreen.ts"
click node_analytics "https://github.com/tarangpatel03/equisplit/blob/main/src/screens/Analytics/index.tsx"
click node_analyticshook "https://github.com/tarangpatel03/equisplit/blob/main/src/screens/Analytics/hooks/useAnalytics.ts"
click node_balance "https://github.com/tarangpatel03/equisplit/blob/main/src/utils/balance.ts"
click node_store "https://github.com/tarangpatel03/equisplit/blob/main/src/store/store.ts"
click node_database "https://github.com/tarangpatel03/equisplit/blob/main/src/services/database/database.service.ts"
click node_categories "https://github.com/tarangpatel03/equisplit/blob/main/src/config/categories.config.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_app,node_navigation,node_home,node_homehook,node_user toneBlue
class node_expenseform,node_expensehook,node_splitdetails,node_categorymanager toneAmber
class node_members,node_membershook,node_analytics,node_analyticshook,node_balance toneMint
class node_store,node_database,node_categories toneRose
```

## Components

### App experience

- [App bootstrap](https://github.com/tarangpatel03/equisplit/blob/main/App.tsx): `App.tsx`
- [App navigation](https://github.com/tarangpatel03/equisplit/blob/main/src/navigation/RootNavigation.tsx): `src/navigation/RootNavigation.tsx`
- [Home dashboard](https://github.com/tarangpatel03/equisplit/blob/main/src/screens/Home/index.tsx): `src/screens/Home/index.tsx`
- [Home data hook](https://github.com/tarangpatel03/equisplit/blob/main/src/screens/Home/hooks/useHomeScreen.ts): `src/screens/Home/hooks/useHomeScreen.ts`

### Expense workflows

- [Expense editor](https://github.com/tarangpatel03/equisplit/blob/main/src/screens/AddEditExpense/index.tsx): `src/screens/AddEditExpense/index.tsx`
- [Expense save hook](https://github.com/tarangpatel03/equisplit/blob/main/src/screens/AddEditExpense/hooks/useAddEditExpense.ts): `src/screens/AddEditExpense/hooks/useAddEditExpense.ts`
- [Expense details](https://github.com/tarangpatel03/equisplit/blob/main/src/screens/SplitDetails/index.tsx): `src/screens/SplitDetails/index.tsx`
- [Category manager](https://github.com/tarangpatel03/equisplit/blob/main/src/components/common/CategoryManagerModal.tsx): `src/components/common/CategoryManagerModal.tsx`

### Balances and insights

- [Member management](https://github.com/tarangpatel03/equisplit/blob/main/src/screens/Members/index.tsx): `src/screens/Members/index.tsx`
- [Member data hook](https://github.com/tarangpatel03/equisplit/blob/main/src/screens/Members/hooks/useMembersScreen.ts): `src/screens/Members/hooks/useMembersScreen.ts`
- [Spending analytics](https://github.com/tarangpatel03/equisplit/blob/main/src/screens/Analytics/index.tsx): `src/screens/Analytics/index.tsx`
- [Analytics hook](https://github.com/tarangpatel03/equisplit/blob/main/src/screens/Analytics/hooks/useAnalytics.ts): `src/screens/Analytics/hooks/useAnalytics.ts`
- [Balance calculations](https://github.com/tarangpatel03/equisplit/blob/main/src/utils/balance.ts): `src/utils/balance.ts`

### Local data

- [Redux state](https://github.com/tarangpatel03/equisplit/blob/main/src/store/store.ts): `src/store/store.ts`
- [SQLite database](https://github.com/tarangpatel03/equisplit/blob/main/src/services/database/database.service.ts): `src/services/database/database.service.ts`
- [Category defaults](https://github.com/tarangpatel03/equisplit/blob/main/src/config/categories.config.ts): `src/config/categories.config.ts`

### Other components

- **App user**

## Connections

- App user → App navigation: opens screens
- App bootstrap → SQLite database: initializes
- App bootstrap → App navigation: renders
- App navigation → Home dashboard: routes to
- App navigation → Expense editor: routes to
- App navigation → Expense details: routes to
- App navigation → Member management: routes to
- App navigation → Spending analytics: routes to
- Home dashboard → Home data hook: uses
- Home data hook → SQLite database: loads and writes
- Home data hook → Redux state: dispatches state
- Home data hook → Balance calculations: computes balances
- Expense editor → Expense save hook: uses
- Expense save hook → SQLite database: saves expenses
- Expense save hook → Redux state: dispatches updates
- Member management → Member data hook: uses
- Member data hook → SQLite database: adds and removes
- Member data hook → Redux state: dispatches updates
- Member data hook → Balance calculations: computes balances
- Spending analytics → Analytics hook: uses
- Category manager → SQLite database: manages categories
- Category manager → Redux state: dispatches updates
- Category manager → SQLite database: reloads expenses
- SQLite database → Category defaults: seeds defaults
