# lukemorales/bancointer architecture

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

- Interactive diagram: https://gitdiagram.com/lukemorales/bancointer
- Repository: https://github.com/lukemorales/bancointer

## Overview

Banco Inter Internet Banking is a React redesign centered on a sign-in-to-dashboard experience: users enter through Welcome, authentication gates the dashboard, and the dashboard presents account, statement, investment, banking-product, and navigation views. Account data is generated locally for the signed-in user; theme and account preferences are stored in browser local storage. The graph preserves the major visible product areas and key data-generation layers. Some component wiring is omitted where the sampled source does not show the caller.

Main entry points: [`src/contexts/auth.tsx`](https://github.com/lukemorales/bancointer/blob/staging/src/contexts/auth.tsx) (Authentication state), [`src/pages/Dashboard/MainContent/AccountSummary`](https://github.com/lukemorales/bancointer/tree/staging/src/pages/Dashboard/MainContent/AccountSummary) (Account summary), [`src/routes/index.tsx`](https://github.com/lukemorales/bancointer/blob/staging/src/routes/index.tsx) (Route dispatch), [`src/utils/generate-investments.ts`](https://github.com/lukemorales/bancointer/blob/staging/src/utils/generate-investments.ts) (Investment generator)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App and Routing"]
  node_app["Application shell<br/>[App.tsx]"]
  node_routes["Route dispatch<br/>[index.tsx]"]
  node_private["Private route gate<br/>[PrivateRoute.tsx]"]
end

subgraph group_identity["Identity and Preferences"]
  node_welcome["Welcome sign-in<br/>[index.tsx]"]
  node_auth["Authentication state<br/>[auth.tsx]"]
  node_theme["Theme preferences<br/>[theme.tsx]"]
  node_dropdown["Account menu<br/>[index.tsx]"]
end

subgraph group_dashboard["Banking Dashboard"]
  node_dashboard["Dashboard layout<br/>[index.tsx]"]
  node_sidebar["Sidebar navigation"]
  node_main["Main content layout"]
  node_summary["Account summary"]
  node_products["Bank products"]
  node_navcards["Navigation cards"]
  node_constants["Dashboard content config"]
end

subgraph group_data["Account Data"]
  node_accountdata["Account data builder"]
  node_statements["Statement generator"]
  node_investments["Investment generator"]
  node_months["Month intervals"]
  node_currency["Currency formatter<br/>[format-currency.ts]"]
end

node_user(("Banking user"))
node_storage[("Browser local storage")]

node_user -->|"starts at"| node_welcome
node_app -->|"renders"| node_routes
node_routes -->|"routes to"| node_welcome
node_routes -->|"guards dashboard"| node_private
node_private -->|"checks sign-in"| node_auth
node_routes -->|"routes to"| node_dashboard
node_welcome -->|"signs in"| node_auth
node_auth -->|"builds account"| node_accountdata
node_auth -->|"reads and writes"| node_storage
node_theme -->|"reads and writes"| node_storage
node_app -->|"selects active theme"| node_theme
node_dashboard -->|"renders"| node_sidebar
node_dashboard -->|"renders"| node_main
node_summary -->|"reads account"| node_auth
node_summary -->|"uses hidden data"| node_statements
node_summary -->|"uses hidden data"| node_investments
node_summary -->|"formats amounts"| node_currency
node_summary -->|"uses transitions"| node_constants
node_products -->|"reads product config"| node_constants
node_accountdata -->|"generates statements"| node_statements
node_accountdata -->|"generates investments"| node_investments
node_statements -->|"uses month intervals"| node_months
node_investments -->|"uses month intervals"| node_months
node_investments -->|"formats values"| node_currency
node_dropdown -->|"signs out"| node_auth
node_dropdown -->|"toggles theme"| node_theme

click node_app "https://github.com/lukemorales/bancointer/blob/staging/src/App.tsx"
click node_routes "https://github.com/lukemorales/bancointer/blob/staging/src/routes/index.tsx"
click node_private "https://github.com/lukemorales/bancointer/blob/staging/src/routes/PrivateRoute.tsx"
click node_welcome "https://github.com/lukemorales/bancointer/blob/staging/src/pages/Welcome/index.tsx"
click node_auth "https://github.com/lukemorales/bancointer/blob/staging/src/contexts/auth.tsx"
click node_theme "https://github.com/lukemorales/bancointer/blob/staging/src/contexts/theme.tsx"
click node_dropdown "https://github.com/lukemorales/bancointer/blob/staging/src/components/Header/AccountDropdown/index.tsx"
click node_dashboard "https://github.com/lukemorales/bancointer/blob/staging/src/pages/Dashboard/index.tsx"
click node_sidebar "https://github.com/lukemorales/bancointer/tree/staging/src/pages/Dashboard/SideBar"
click node_main "https://github.com/lukemorales/bancointer/tree/staging/src/pages/Dashboard/MainContent"
click node_summary "https://github.com/lukemorales/bancointer/tree/staging/src/pages/Dashboard/MainContent/AccountSummary"
click node_products "https://github.com/lukemorales/bancointer/tree/staging/src/pages/Dashboard/MainContent/BankProducts"
click node_navcards "https://github.com/lukemorales/bancointer/tree/staging/src/pages/Dashboard/MainContent/NavigationCards"
click node_constants "https://github.com/lukemorales/bancointer/tree/staging/src/constants"
click node_accountdata "https://github.com/lukemorales/bancointer/blob/staging/src/utils/generate-account-data.ts"
click node_statements "https://github.com/lukemorales/bancointer/blob/staging/src/utils/generate-statements.ts"
click node_investments "https://github.com/lukemorales/bancointer/blob/staging/src/utils/generate-investments.ts"
click node_months "https://github.com/lukemorales/bancointer/blob/staging/src/utils/generate-months-interval.ts"
click node_currency "https://github.com/lukemorales/bancointer/blob/staging/src/utils/format-currency.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_routes,node_private,node_user toneBlue
class node_welcome,node_auth,node_theme,node_dropdown,node_storage toneAmber
class node_dashboard,node_sidebar,node_main,node_summary,node_products,node_navcards,node_constants toneMint
class node_accountdata,node_statements,node_investments,node_months,node_currency toneRose
```

## Components

### App and Routing

- [Application shell](https://github.com/lukemorales/bancointer/blob/staging/src/App.tsx): `src/App.tsx`
- [Route dispatch](https://github.com/lukemorales/bancointer/blob/staging/src/routes/index.tsx): `src/routes/index.tsx`
- [Private route gate](https://github.com/lukemorales/bancointer/blob/staging/src/routes/PrivateRoute.tsx): `src/routes/PrivateRoute.tsx`

### Identity and Preferences

- [Welcome sign-in](https://github.com/lukemorales/bancointer/blob/staging/src/pages/Welcome/index.tsx): `src/pages/Welcome/index.tsx`
- [Authentication state](https://github.com/lukemorales/bancointer/blob/staging/src/contexts/auth.tsx): `src/contexts/auth.tsx`
- [Theme preferences](https://github.com/lukemorales/bancointer/blob/staging/src/contexts/theme.tsx): `src/contexts/theme.tsx`
- [Account menu](https://github.com/lukemorales/bancointer/blob/staging/src/components/Header/AccountDropdown/index.tsx): `src/components/Header/AccountDropdown/index.tsx`

### Banking Dashboard

- [Dashboard layout](https://github.com/lukemorales/bancointer/blob/staging/src/pages/Dashboard/index.tsx): `src/pages/Dashboard/index.tsx`
- [Sidebar navigation](https://github.com/lukemorales/bancointer/tree/staging/src/pages/Dashboard/SideBar): `src/pages/Dashboard/SideBar`
- [Main content layout](https://github.com/lukemorales/bancointer/tree/staging/src/pages/Dashboard/MainContent): `src/pages/Dashboard/MainContent`
- [Account summary](https://github.com/lukemorales/bancointer/tree/staging/src/pages/Dashboard/MainContent/AccountSummary): `src/pages/Dashboard/MainContent/AccountSummary`
- [Bank products](https://github.com/lukemorales/bancointer/tree/staging/src/pages/Dashboard/MainContent/BankProducts): `src/pages/Dashboard/MainContent/BankProducts`
- [Navigation cards](https://github.com/lukemorales/bancointer/tree/staging/src/pages/Dashboard/MainContent/NavigationCards): `src/pages/Dashboard/MainContent/NavigationCards`
- [Dashboard content config](https://github.com/lukemorales/bancointer/tree/staging/src/constants): `src/constants`

### Account Data

- [Account data builder](https://github.com/lukemorales/bancointer/blob/staging/src/utils/generate-account-data.ts): `src/utils/generate-account-data.ts`
- [Statement generator](https://github.com/lukemorales/bancointer/blob/staging/src/utils/generate-statements.ts): `src/utils/generate-statements.ts`
- [Investment generator](https://github.com/lukemorales/bancointer/blob/staging/src/utils/generate-investments.ts): `src/utils/generate-investments.ts`
- [Month intervals](https://github.com/lukemorales/bancointer/blob/staging/src/utils/generate-months-interval.ts): `src/utils/generate-months-interval.ts`
- [Currency formatter](https://github.com/lukemorales/bancointer/blob/staging/src/utils/format-currency.ts): `src/utils/format-currency.ts`

### Other components

- **Banking user**
- **Browser local storage**

## Connections

- Banking user → Welcome sign-in: starts at (evidence: `README.md`)
- Application shell → Route dispatch: renders (evidence: `src/App.tsx`)
- Route dispatch → Welcome sign-in: routes to (evidence: `src/routes/index.tsx`)
- Route dispatch → Private route gate: guards dashboard (evidence: `src/routes/index.tsx`)
- Private route gate → Authentication state: checks sign-in (evidence: `src/routes/PrivateRoute.tsx`)
- Route dispatch → Dashboard layout: routes to (evidence: `src/routes/index.tsx`)
- Welcome sign-in → Authentication state: signs in (evidence: `src/pages/Welcome/index.tsx`)
- Authentication state → Account data builder: builds account (evidence: `src/contexts/auth.tsx`)
- Authentication state → Browser local storage: reads and writes (evidence: `src/contexts/auth.tsx`)
- Theme preferences → Browser local storage: reads and writes (evidence: `src/contexts/theme.tsx`)
- Application shell → Theme preferences: selects active theme (evidence: `src/App.tsx`)
- Dashboard layout → Sidebar navigation: renders (evidence: `src/pages/Dashboard/index.tsx`)
- Dashboard layout → Main content layout: renders (evidence: `src/pages/Dashboard/index.tsx`)
- Account summary → Authentication state: reads account (evidence: `src/pages/Dashboard/MainContent/AccountSummary/index.tsx`)
- Account summary → Statement generator: uses hidden data (evidence: `src/pages/Dashboard/MainContent/AccountSummary/index.tsx`)
- Account summary → Investment generator: uses hidden data (evidence: `src/pages/Dashboard/MainContent/AccountSummary/index.tsx`)
- Account summary → Currency formatter: formats amounts (evidence: `src/pages/Dashboard/MainContent/AccountSummary/index.tsx`)
- Account summary → Dashboard content config: uses transitions (evidence: `src/pages/Dashboard/MainContent/AccountSummary/index.tsx`)
- Bank products → Dashboard content config: reads product config (evidence: `src/pages/Dashboard/MainContent/BankProducts/index.tsx`)
- Account data builder → Statement generator: generates statements (evidence: `src/utils/generate-account-data.ts`)
- Account data builder → Investment generator: generates investments (evidence: `src/utils/generate-account-data.ts`)
- Statement generator → Month intervals: uses month intervals (evidence: `src/utils/generate-statements.ts`)
- Investment generator → Month intervals: uses month intervals (evidence: `src/utils/generate-investments.ts`)
- Investment generator → Currency formatter: formats values (evidence: `src/utils/generate-investments.ts`)
- Account menu → Authentication state: signs out (evidence: `src/components/Header/AccountDropdown/index.tsx`)
- Account menu → Theme preferences: toggles theme (evidence: `src/components/Header/AccountDropdown/index.tsx`)
