# flowlogdev/finflowadvisor architecture

> Architecture diagram of the GitHub repository flowlogdev/finflowadvisor, 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/flowlogdev/finflowadvisor
- Repository: https://github.com/flowlogdev/finflowadvisor

## Overview

FinFlow is a personal-finance app for tracking cash flow and goals, analyzing spending, and exploring investments and markets. Users enter through authentication or guest access, then reach a dashboard; feature screens use API clients to request data or actions from a FastAPI backend, which persists user and financial records in MongoDB. The tree and excerpts establish several feature areas, but the backend excerpt is partial, so uncertain endpoint-to-provider wiring is omitted.

Main entry points: [`frontend/src/api.ts`](https://github.com/flowlogdev/finflowadvisor/blob/main/frontend/src/api.ts) (Finance API), [`backend/server.py`](https://github.com/flowlogdev/finflowadvisor/blob/main/backend/server.py) (Finance service), [`frontend/src/auth.ts`](https://github.com/flowlogdev/finflowadvisor/blob/main/frontend/src/auth.ts) (Authentication), [`frontend/app/(tabs)/dashboard.tsx`](https://github.com/flowlogdev/finflowadvisor/blob/main/frontend/app/(tabs)/dashboard.tsx) (Dashboard)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Mobile app"]
  node_entry["App entry<br/>[index.tsx]"]
  node_auth["Authentication<br/>[auth.ts]"]
  node_premium["Premium billing<br/>[revenueCat.ts]"]
end

subgraph group_finance["Cash flow"]
  node_dashboard["Dashboard<br/>[dashboard.tsx]"]
  node_expenses["Expenses<br/>[expenses.tsx]"]
  node_bills["Bills<br/>[bills.tsx]"]
end

subgraph group_insights["Insights and planning"]
  node_insightspanel["Smart insights<br/>[InsightsPanel.tsx]"]
  node_simulator["Future simulator<br/>[simulator.tsx]"]
  node_advisor["AI advisor<br/>[advisor.tsx]"]
end

subgraph group_markets["Markets and investing"]
  node_investments["Investment planner<br/>[investments.tsx]"]
  node_investapi["Investment API<br/>[investmentsApi.ts]"]
  node_marketcards["Market cards<br/>[MarketsCards.tsx]"]
end

subgraph group_server["Backend and data"]
  node_api["Finance API<br/>[api.ts]"]
  node_backend["Finance service<br/>[server.py]"]
  node_mongo[("MongoDB")]
end

node_person(("User"))
node_plaid["Plaid"]

node_person -->|"opens"| node_entry
node_entry -->|"checks session"| node_auth
node_entry -->|"routes"| node_dashboard
node_person -->|"signs in"| node_auth
node_auth -->|"auth requests"| node_backend
node_auth -->|"routes signed-in"| node_dashboard
node_dashboard -->|"requests finance data"| node_api
node_expenses -->|"manages expenses"| node_api
node_bills -->|"manages bills"| node_api
node_dashboard -->|"shows insights"| node_insightspanel
node_insightspanel -->|"fetches insights"| node_api
node_simulator -->|"loads settings"| node_api
node_advisor -->|"sends chat and history requests"| node_api
node_investments -->|"loads investment data"| node_investapi
node_investments -->|"checks billing"| node_api
node_marketcards -->|"requests quotes and watchlist"| node_api
node_api -->|"HTTP requests"| node_backend
node_investapi -->|"investment requests"| node_backend
node_backend -->|"reads and writes"| node_mongo
node_backend -.->|"uses Plaid API"| node_plaid
node_investments -.->|"premium integration"| node_premium

click node_entry "https://github.com/flowlogdev/finflowadvisor/blob/main/frontend/app/index.tsx"
click node_auth "https://github.com/flowlogdev/finflowadvisor/blob/main/frontend/src/auth.ts"
click node_dashboard "https://github.com/flowlogdev/finflowadvisor/blob/main/frontend/app/(tabs)/dashboard.tsx"
click node_expenses "https://github.com/flowlogdev/finflowadvisor/blob/main/frontend/app/(tabs)/expenses.tsx"
click node_bills "https://github.com/flowlogdev/finflowadvisor/blob/main/frontend/app/(tabs)/bills.tsx"
click node_api "https://github.com/flowlogdev/finflowadvisor/blob/main/frontend/src/api.ts"
click node_insightspanel "https://github.com/flowlogdev/finflowadvisor/blob/main/frontend/src/components/InsightsPanel.tsx"
click node_simulator "https://github.com/flowlogdev/finflowadvisor/blob/main/frontend/app/simulator.tsx"
click node_advisor "https://github.com/flowlogdev/finflowadvisor/blob/main/frontend/app/(tabs)/advisor.tsx"
click node_investments "https://github.com/flowlogdev/finflowadvisor/blob/main/frontend/app/(tabs)/investments.tsx"
click node_investapi "https://github.com/flowlogdev/finflowadvisor/blob/main/frontend/src/investmentsApi.ts"
click node_marketcards "https://github.com/flowlogdev/finflowadvisor/blob/main/frontend/src/components/MarketsCards.tsx"
click node_backend "https://github.com/flowlogdev/finflowadvisor/blob/main/backend/server.py"
click node_premium "https://github.com/flowlogdev/finflowadvisor/blob/main/frontend/src/revenueCat.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_entry,node_auth,node_premium,node_person toneBlue
class node_dashboard,node_expenses,node_bills toneAmber
class node_insightspanel,node_simulator,node_advisor toneMint
class node_investments,node_investapi,node_marketcards toneRose
class node_api,node_backend,node_mongo,node_plaid toneIndigo
```

## Components

### Mobile app

- [App entry](https://github.com/flowlogdev/finflowadvisor/blob/main/frontend/app/index.tsx): `frontend/app/index.tsx`
- [Authentication](https://github.com/flowlogdev/finflowadvisor/blob/main/frontend/src/auth.ts): `frontend/src/auth.ts`
- [Premium billing](https://github.com/flowlogdev/finflowadvisor/blob/main/frontend/src/revenueCat.ts): `frontend/src/revenueCat.ts`

### Cash flow

- [Dashboard](https://github.com/flowlogdev/finflowadvisor/blob/main/frontend/app/(tabs)/dashboard.tsx): `frontend/app/(tabs)/dashboard.tsx`
- [Expenses](https://github.com/flowlogdev/finflowadvisor/blob/main/frontend/app/(tabs)/expenses.tsx): `frontend/app/(tabs)/expenses.tsx`
- [Bills](https://github.com/flowlogdev/finflowadvisor/blob/main/frontend/app/(tabs)/bills.tsx): `frontend/app/(tabs)/bills.tsx`

### Insights and planning

- [Smart insights](https://github.com/flowlogdev/finflowadvisor/blob/main/frontend/src/components/InsightsPanel.tsx): `frontend/src/components/InsightsPanel.tsx`
- [Future simulator](https://github.com/flowlogdev/finflowadvisor/blob/main/frontend/app/simulator.tsx): `frontend/app/simulator.tsx`
- [AI advisor](https://github.com/flowlogdev/finflowadvisor/blob/main/frontend/app/(tabs)/advisor.tsx): `frontend/app/(tabs)/advisor.tsx`

### Markets and investing

- [Investment planner](https://github.com/flowlogdev/finflowadvisor/blob/main/frontend/app/(tabs)/investments.tsx): `frontend/app/(tabs)/investments.tsx`
- [Investment API](https://github.com/flowlogdev/finflowadvisor/blob/main/frontend/src/investmentsApi.ts): `frontend/src/investmentsApi.ts`
- [Market cards](https://github.com/flowlogdev/finflowadvisor/blob/main/frontend/src/components/MarketsCards.tsx): `frontend/src/components/MarketsCards.tsx`

### Backend and data

- [Finance API](https://github.com/flowlogdev/finflowadvisor/blob/main/frontend/src/api.ts): `frontend/src/api.ts`
- [Finance service](https://github.com/flowlogdev/finflowadvisor/blob/main/backend/server.py): `backend/server.py`
- **MongoDB**

### Other components

- **User**
- **Plaid**

## Connections

- User → App entry: opens
- App entry → Authentication: checks session
- App entry → Dashboard: routes
- User → Authentication: signs in
- Authentication → Finance service: auth requests
- Authentication → Dashboard: routes signed-in
- Dashboard → Finance API: requests finance data
- Expenses → Finance API: manages expenses
- Bills → Finance API: manages bills
- Dashboard → Smart insights: shows insights
- Smart insights → Finance API: fetches insights
- Future simulator → Finance API: loads settings
- AI advisor → Finance API: sends chat and history requests
- Investment planner → Investment API: loads investment data
- Investment planner → Finance API: checks billing
- Market cards → Finance API: requests quotes and watchlist
- Finance API → Finance service: HTTP requests
- Investment API → Finance service: investment requests
- Finance service → MongoDB: reads and writes
- Finance service → Plaid: uses Plaid API
- Investment planner → Premium billing: premium integration
