# rohan28107/blinkmoney_assignment- architecture

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

- Interactive diagram: https://gitdiagram.com/rohan28107/blinkmoney_assignment-
- Repository: https://github.com/rohan28107/blinkmoney_assignment-

## Overview

BlinkMoney is an Expo app for creating shared savings vaults, contributing toward goals, inviting friends, and tracking growth and milestones. The visible workflow runs from the tabbed home/vault views into vault creation or details, then contribution and collaboration actions; local Zustand state persists vault data. Borrow and Grow are distinct tab capabilities in the route tree, but their implementations were not sampled. Connections are limited to shown imports, the Home excerpt, and explicit persistence calls; unsampled route behavior is not inferred.

Main entry points: [`src/store/useVaultStore.ts`](https://github.com/rohan28107/blinkmoney_assignment-/blob/master/src/store/useVaultStore.ts) (Vault state), [`app/(tabs)/index.tsx`](https://github.com/rohan28107/blinkmoney_assignment-/blob/master/app/(tabs)/index.tsx) (Home dashboard), [`src/components/vault`](https://github.com/rohan28107/blinkmoney_assignment-/tree/master/src/components/vault) (Vault visuals), [`app/(tabs)/_layout.tsx`](https://github.com/rohan28107/blinkmoney_assignment-/blob/master/app/(tabs)/_layout.tsx) (Tab navigation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_product["App screens"]
  node_tabs["Tab navigation<br/>[_layout.tsx]"]
  node_home["Home dashboard<br/>[index.tsx]"]
  node_borrow["Borrow tab<br/>[borrow.tsx]"]
  node_grow["Grow tab<br/>[grow.tsx]"]
  node_profile["Profile<br/>[profile.tsx]"]
  node_vaults["Vault list<br/>[vaults.tsx]"]
  node_app_shell["App shell<br/>[_layout.tsx]"]
end

subgraph group_vault["Vault experience"]
  node_create["Create vault<br/>[create.tsx]"]
  node_detail["Vault details<br/>[index.tsx]"]
  node_contribute["Contribute<br/>[contribute.tsx]"]
  node_invite["Invite friends<br/>[invite.tsx]"]
  node_share["Share card<br/>[share-card.tsx]"]
  node_preview["Vault preview<br/>[&#91;id&#93;.tsx]"]
end

subgraph group_state["State and domain"]
  node_vault_store["Vault state<br/>[useVaultStore.ts]"]
  node_async_storage[("Device storage")]
  node_growth["Growth calculation<br/>[growth.ts]"]
  node_milestones["Milestone rules<br/>[milestones.ts]"]
  node_friends["Mock friends<br/>[mockFriends.ts]"]
  node_models["Domain models<br/>[models.ts]"]
  node_ui_store["UI state<br/>[useUiStore.ts]"]
  node_theme_store["Theme state<br/>[useThemeStore.ts]"]
end

subgraph group_presentation["Shared presentation"]
  node_theme_colors["Theme colors<br/>[useThemeColors.ts]"]
  node_tokens["Design tokens<br/>[tokens.ts]"]
  node_ui_components["UI components"]
  node_vault_components["Vault visuals"]
  node_currency["Currency formatting<br/>[currency.ts]"]
  node_dates["Date formatting<br/>[dates.ts]"]
  node_progress["Progress helpers<br/>[progress.ts]"]
  node_portfolio["Portfolio mock<br/>[mockPortfolio.ts]"]
end

node_user(("App user"))

node_user -->|"opens app"| node_tabs
node_tabs -->|"routes"| node_home
node_tabs -->|"routes"| node_borrow
node_tabs -->|"routes"| node_grow
node_tabs -->|"routes"| node_profile
node_tabs -->|"routes"| node_vaults
node_home -->|"reads vault state"| node_vault_store
node_home -->|"renders vault cards"| node_vault_components
node_home -->|"routes to create"| node_create
node_home -->|"opens vault"| node_detail
node_home -->|"formats amounts"| node_currency
node_home -->|"formats activity time"| node_dates
node_home -->|"shows mock portfolio"| node_portfolio
node_vaults -->|"uses vault state"| node_vault_store
node_vaults -->|"renders vault cards"| node_vault_components
node_profile -->|"uses vault state"| node_vault_store
node_profile -->|"uses UI state"| node_ui_store
node_profile -->|"uses theme state"| node_theme_store
node_create -->|"creates vault"| node_vault_store
node_detail -->|"reads and updates"| node_vault_store
node_detail -->|"uses UI state"| node_ui_store
node_detail -->|"uses progress helpers"| node_progress
node_detail -->|"renders progress ring"| node_vault_components
node_contribute -->|"records contribution"| node_vault_store
node_contribute -->|"uses UI state"| node_ui_store
node_invite -->|"invites members"| node_vault_store
node_invite -->|"uses UI state"| node_ui_store
node_invite -->|"uses friend personas"| node_friends
node_share -->|"reads vault state"| node_vault_store
node_share -->|"uses UI state"| node_ui_store
node_preview -->|"reads vault state"| node_vault_store
node_app_shell -->|"initializes state"| node_vault_store
node_app_shell -->|"initializes theme"| node_theme_store
node_app_shell -->|"shows toast UI"| node_ui_store
node_app_shell -->|"shows celebrations"| node_vault_components
node_vault_store -->|"persists state"| node_async_storage
node_vault_store -->|"calculates growth"| node_growth
node_vault_store -->|"checks milestone tiers"| node_milestones
node_vault_store -->|"simulates friend activity"| node_friends
node_vault_store -->|"stores domain records"| node_models
node_theme_colors -->|"reads theme mode"| node_theme_store
node_theme_colors -->|"selects palette"| node_tokens
node_ui_components -->|"reads colors"| node_theme_colors
node_ui_components -->|"uses design tokens"| node_tokens
node_vault_components -->|"composes UI pieces"| node_ui_components
node_vault_components -->|"uses progress helpers"| node_progress
node_vault_components -->|"formats amounts"| node_currency
node_vault_components -->|"formats dates"| node_dates

click node_tabs "https://github.com/rohan28107/blinkmoney_assignment-/blob/master/app/(tabs)/_layout.tsx"
click node_home "https://github.com/rohan28107/blinkmoney_assignment-/blob/master/app/(tabs)/index.tsx"
click node_borrow "https://github.com/rohan28107/blinkmoney_assignment-/blob/master/app/(tabs)/borrow.tsx"
click node_grow "https://github.com/rohan28107/blinkmoney_assignment-/blob/master/app/(tabs)/grow.tsx"
click node_profile "https://github.com/rohan28107/blinkmoney_assignment-/blob/master/app/(tabs)/profile.tsx"
click node_vaults "https://github.com/rohan28107/blinkmoney_assignment-/blob/master/app/(tabs)/vaults.tsx"
click node_app_shell "https://github.com/rohan28107/blinkmoney_assignment-/blob/master/app/_layout.tsx"
click node_create "https://github.com/rohan28107/blinkmoney_assignment-/blob/master/app/vault/create.tsx"
click node_detail "https://github.com/rohan28107/blinkmoney_assignment-/blob/master/app/vault/%5Bid%5D/index.tsx"
click node_contribute "https://github.com/rohan28107/blinkmoney_assignment-/blob/master/app/vault/%5Bid%5D/contribute.tsx"
click node_invite "https://github.com/rohan28107/blinkmoney_assignment-/blob/master/app/vault/%5Bid%5D/invite.tsx"
click node_share "https://github.com/rohan28107/blinkmoney_assignment-/blob/master/app/vault/%5Bid%5D/share-card.tsx"
click node_preview "https://github.com/rohan28107/blinkmoney_assignment-/blob/master/app/preview/%5Bid%5D.tsx"
click node_vault_store "https://github.com/rohan28107/blinkmoney_assignment-/blob/master/src/store/useVaultStore.ts"
click node_growth "https://github.com/rohan28107/blinkmoney_assignment-/blob/master/src/lib/growth.ts"
click node_milestones "https://github.com/rohan28107/blinkmoney_assignment-/blob/master/src/lib/milestones.ts"
click node_friends "https://github.com/rohan28107/blinkmoney_assignment-/blob/master/src/lib/mockFriends.ts"
click node_models "https://github.com/rohan28107/blinkmoney_assignment-/blob/master/src/types/models.ts"
click node_ui_store "https://github.com/rohan28107/blinkmoney_assignment-/blob/master/src/store/useUiStore.ts"
click node_theme_store "https://github.com/rohan28107/blinkmoney_assignment-/blob/master/src/store/useThemeStore.ts"
click node_theme_colors "https://github.com/rohan28107/blinkmoney_assignment-/blob/master/src/theme/useThemeColors.ts"
click node_tokens "https://github.com/rohan28107/blinkmoney_assignment-/blob/master/src/theme/tokens.ts"
click node_ui_components "https://github.com/rohan28107/blinkmoney_assignment-/tree/master/src/components/ui"
click node_vault_components "https://github.com/rohan28107/blinkmoney_assignment-/tree/master/src/components/vault"
click node_currency "https://github.com/rohan28107/blinkmoney_assignment-/blob/master/src/lib/currency.ts"
click node_dates "https://github.com/rohan28107/blinkmoney_assignment-/blob/master/src/lib/dates.ts"
click node_progress "https://github.com/rohan28107/blinkmoney_assignment-/blob/master/src/lib/progress.ts"
click node_portfolio "https://github.com/rohan28107/blinkmoney_assignment-/blob/master/src/lib/mockPortfolio.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_tabs,node_home,node_borrow,node_grow,node_profile,node_vaults,node_app_shell,node_user toneBlue
class node_create,node_detail,node_contribute,node_invite,node_share,node_preview toneAmber
class node_vault_store,node_async_storage,node_growth,node_milestones,node_friends,node_models,node_ui_store,node_theme_store toneMint
class node_theme_colors,node_tokens,node_ui_components,node_vault_components,node_currency,node_dates,node_progress,node_portfolio toneRose
```

## Components

### App screens

- [Tab navigation](https://github.com/rohan28107/blinkmoney_assignment-/blob/master/app/(tabs)/_layout.tsx): `app/(tabs)/_layout.tsx`
- [Home dashboard](https://github.com/rohan28107/blinkmoney_assignment-/blob/master/app/(tabs)/index.tsx): `app/(tabs)/index.tsx`
- [Borrow tab](https://github.com/rohan28107/blinkmoney_assignment-/blob/master/app/(tabs)/borrow.tsx): `app/(tabs)/borrow.tsx`
- [Grow tab](https://github.com/rohan28107/blinkmoney_assignment-/blob/master/app/(tabs)/grow.tsx): `app/(tabs)/grow.tsx`
- [Profile](https://github.com/rohan28107/blinkmoney_assignment-/blob/master/app/(tabs)/profile.tsx): `app/(tabs)/profile.tsx`
- [Vault list](https://github.com/rohan28107/blinkmoney_assignment-/blob/master/app/(tabs)/vaults.tsx): `app/(tabs)/vaults.tsx`
- [App shell](https://github.com/rohan28107/blinkmoney_assignment-/blob/master/app/_layout.tsx): `app/_layout.tsx`

### Vault experience

- [Create vault](https://github.com/rohan28107/blinkmoney_assignment-/blob/master/app/vault/create.tsx): `app/vault/create.tsx`
- [Vault details](https://github.com/rohan28107/blinkmoney_assignment-/blob/master/app/vault/%5Bid%5D/index.tsx): `app/vault/[id]/index.tsx`
- [Contribute](https://github.com/rohan28107/blinkmoney_assignment-/blob/master/app/vault/%5Bid%5D/contribute.tsx): `app/vault/[id]/contribute.tsx`
- [Invite friends](https://github.com/rohan28107/blinkmoney_assignment-/blob/master/app/vault/%5Bid%5D/invite.tsx): `app/vault/[id]/invite.tsx`
- [Share card](https://github.com/rohan28107/blinkmoney_assignment-/blob/master/app/vault/%5Bid%5D/share-card.tsx): `app/vault/[id]/share-card.tsx`
- [Vault preview](https://github.com/rohan28107/blinkmoney_assignment-/blob/master/app/preview/%5Bid%5D.tsx): `app/preview/[id].tsx`

### State and domain

- [Vault state](https://github.com/rohan28107/blinkmoney_assignment-/blob/master/src/store/useVaultStore.ts): `src/store/useVaultStore.ts`
- **Device storage**
- [Growth calculation](https://github.com/rohan28107/blinkmoney_assignment-/blob/master/src/lib/growth.ts): `src/lib/growth.ts`
- [Milestone rules](https://github.com/rohan28107/blinkmoney_assignment-/blob/master/src/lib/milestones.ts): `src/lib/milestones.ts`
- [Mock friends](https://github.com/rohan28107/blinkmoney_assignment-/blob/master/src/lib/mockFriends.ts): `src/lib/mockFriends.ts`
- [Domain models](https://github.com/rohan28107/blinkmoney_assignment-/blob/master/src/types/models.ts): `src/types/models.ts`
- [UI state](https://github.com/rohan28107/blinkmoney_assignment-/blob/master/src/store/useUiStore.ts): `src/store/useUiStore.ts`
- [Theme state](https://github.com/rohan28107/blinkmoney_assignment-/blob/master/src/store/useThemeStore.ts): `src/store/useThemeStore.ts`

### Shared presentation

- [Theme colors](https://github.com/rohan28107/blinkmoney_assignment-/blob/master/src/theme/useThemeColors.ts): `src/theme/useThemeColors.ts`
- [Design tokens](https://github.com/rohan28107/blinkmoney_assignment-/blob/master/src/theme/tokens.ts): `src/theme/tokens.ts`
- [UI components](https://github.com/rohan28107/blinkmoney_assignment-/tree/master/src/components/ui): `src/components/ui`
- [Vault visuals](https://github.com/rohan28107/blinkmoney_assignment-/tree/master/src/components/vault): `src/components/vault`
- [Currency formatting](https://github.com/rohan28107/blinkmoney_assignment-/blob/master/src/lib/currency.ts): `src/lib/currency.ts`
- [Date formatting](https://github.com/rohan28107/blinkmoney_assignment-/blob/master/src/lib/dates.ts): `src/lib/dates.ts`
- [Progress helpers](https://github.com/rohan28107/blinkmoney_assignment-/blob/master/src/lib/progress.ts): `src/lib/progress.ts`
- [Portfolio mock](https://github.com/rohan28107/blinkmoney_assignment-/blob/master/src/lib/mockPortfolio.ts): `src/lib/mockPortfolio.ts`

### Other components

- **App user**

## Connections

- App user → Tab navigation: opens app (evidence: `README.md`)
- Tab navigation → Home dashboard: routes (evidence: `app/(tabs)/_layout.tsx`)
- Tab navigation → Borrow tab: routes (evidence: `app/(tabs)/_layout.tsx`)
- Tab navigation → Grow tab: routes (evidence: `app/(tabs)/_layout.tsx`)
- Tab navigation → Profile: routes (evidence: `app/(tabs)/_layout.tsx`)
- Tab navigation → Vault list: routes (evidence: `app/(tabs)/_layout.tsx`)
- Home dashboard → Vault state: reads vault state (evidence: `app/(tabs)/index.tsx`)
- Home dashboard → Vault visuals: renders vault cards (evidence: `app/(tabs)/index.tsx`)
- Home dashboard → Create vault: routes to create (evidence: `app/(tabs)/index.tsx`)
- Home dashboard → Vault details: opens vault (evidence: `app/(tabs)/index.tsx`)
- Home dashboard → Currency formatting: formats amounts (evidence: `app/(tabs)/index.tsx`)
- Home dashboard → Date formatting: formats activity time (evidence: `app/(tabs)/index.tsx`)
- Home dashboard → Portfolio mock: shows mock portfolio (evidence: `app/(tabs)/index.tsx`)
- Vault list → Vault state: uses vault state (evidence: `app/(tabs)/vaults.tsx`)
- Vault list → Vault visuals: renders vault cards (evidence: `app/(tabs)/vaults.tsx`)
- Profile → Vault state: uses vault state (evidence: `app/(tabs)/profile.tsx`)
- Profile → UI state: uses UI state (evidence: `app/(tabs)/profile.tsx`)
- Profile → Theme state: uses theme state (evidence: `app/(tabs)/profile.tsx`)
- Create vault → Vault state: creates vault (evidence: `app/vault/create.tsx`)
- Vault details → Vault state: reads and updates (evidence: `app/vault/[id]/index.tsx`)
- Vault details → UI state: uses UI state (evidence: `app/vault/[id]/index.tsx`)
- Vault details → Progress helpers: uses progress helpers (evidence: `app/vault/[id]/index.tsx`)
- Vault details → Vault visuals: renders progress ring (evidence: `app/vault/[id]/index.tsx`)
- Contribute → Vault state: records contribution (evidence: `app/vault/[id]/contribute.tsx`)
- Contribute → UI state: uses UI state (evidence: `app/vault/[id]/contribute.tsx`)
- Invite friends → Vault state: invites members (evidence: `app/vault/[id]/invite.tsx`)
- Invite friends → UI state: uses UI state (evidence: `app/vault/[id]/invite.tsx`)
- Invite friends → Mock friends: uses friend personas (evidence: `app/vault/[id]/invite.tsx`)
- Share card → Vault state: reads vault state (evidence: `app/vault/[id]/share-card.tsx`)
- Share card → UI state: uses UI state (evidence: `app/vault/[id]/share-card.tsx`)
- Vault preview → Vault state: reads vault state (evidence: `app/preview/[id].tsx`)
- App shell → Vault state: initializes state (evidence: `app/_layout.tsx`)
- App shell → Theme state: initializes theme (evidence: `app/_layout.tsx`)
- App shell → UI state: shows toast UI (evidence: `app/_layout.tsx`)
- App shell → Vault visuals: shows celebrations (evidence: `app/_layout.tsx`)
- Vault state → Device storage: persists state (evidence: `src/store/useVaultStore.ts`)
- Vault state → Growth calculation: calculates growth (evidence: `src/store/useVaultStore.ts`)
- Vault state → Milestone rules: checks milestone tiers (evidence: `src/store/useVaultStore.ts`)
- Vault state → Mock friends: simulates friend activity (evidence: `src/store/useVaultStore.ts`)
- Vault state → Domain models: stores domain records (evidence: `src/store/useVaultStore.ts`)
- Theme colors → Theme state: reads theme mode (evidence: `src/theme/useThemeColors.ts`)
- Theme colors → Design tokens: selects palette (evidence: `src/theme/useThemeColors.ts`)
- UI components → Theme colors: reads colors (evidence: `src/components/ui/Screen.tsx`)
- UI components → Design tokens: uses design tokens (evidence: `src/components/ui/Button.tsx`)
- Vault visuals → UI components: composes UI pieces (evidence: `src/components/vault/VaultCard.tsx`)
- Vault visuals → Progress helpers: uses progress helpers (evidence: `src/components/vault/VaultCard.tsx`)
- Vault visuals → Currency formatting: formats amounts (evidence: `src/components/vault/VaultCard.tsx`)
- Vault visuals → Date formatting: formats dates (evidence: `src/components/vault/VaultCard.tsx`)
