# verupakshasharma9/blue-water-capital architecture

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

- Interactive diagram: https://gitdiagram.com/verupakshasharma9/blue-water-capital
- Repository: https://github.com/verupakshasharma9/blue-water-capital

## Overview

Blue Water Capital is a browser-based trading risk/reward planner with a journal and settings screen. Users enter a prospective trade in the planner, which requests strike recommendations from calculation logic; they can also review journal entries and manage journal backups through settings. The app shell switches between these screens and supplies the animated background. The excerpts establish the journal and settings’ calls to local storage, but do not show the planner’s save call, so that relationship is omitted. Evidence is limited to the supplied excerpts and source index.

Main entry points: [`src/App.tsx`](https://github.com/verupakshasharma9/blue-water-capital/blob/main/src/App.tsx) (App shell), [`src/components/Settings.tsx`](https://github.com/verupakshasharma9/blue-water-capital/blob/main/src/components/Settings.tsx) (Journal settings), [`src/utils/db.ts`](https://github.com/verupakshasharma9/blue-water-capital/blob/main/src/utils/db.ts) (Journal storage), [`src/components/Navbar.tsx`](https://github.com/verupakshasharma9/blue-water-capital/blob/main/src/components/Navbar.tsx) (Tab navigation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_shell["App shell"]
  node_app["App shell<br/>[App.tsx]"]
  node_nav["Tab navigation<br/>[Navbar.tsx]"]
  node_background["Animated background<br/>[Background3D.tsx]"]
  node_entry["React entry point<br/>[main.tsx]"]
end

subgraph group_planning["Trade planning"]
  node_planner["Trade planner<br/>[TradePlanner.tsx]"]
  node_calculations["Plan calculations<br/>[calculations.ts]"]
end

subgraph group_records["Journal and settings"]
  node_journal["Trade journal<br/>[Journal.tsx]"]
  node_settings["Journal settings<br/>[Settings.tsx]"]
  node_store[("Journal storage<br/>[db.ts]")]
end

node_trader(("Trader"))
node_indexeddb[("Browser IndexedDB")]

node_trader -->|"uses"| node_app
node_entry -->|"renders"| node_app
node_app -->|"renders"| node_nav
node_app -->|"renders"| node_background
node_app -->|"renders"| node_planner
node_app -->|"renders"| node_journal
node_app -->|"renders"| node_settings
node_nav -->|"changes tab"| node_app
node_planner -->|"gets strikes"| node_calculations
node_journal -->|"fetches entries"| node_store
node_settings -->|"reads, imports, clears"| node_store
node_settings -->|"notifies changes"| node_app
node_store -->|"reads and writes"| node_indexeddb

click node_app "https://github.com/verupakshasharma9/blue-water-capital/blob/main/src/App.tsx"
click node_nav "https://github.com/verupakshasharma9/blue-water-capital/blob/main/src/components/Navbar.tsx"
click node_background "https://github.com/verupakshasharma9/blue-water-capital/blob/main/src/components/Background3D.tsx"
click node_planner "https://github.com/verupakshasharma9/blue-water-capital/blob/main/src/components/TradePlanner.tsx"
click node_calculations "https://github.com/verupakshasharma9/blue-water-capital/blob/main/src/utils/calculations.ts"
click node_journal "https://github.com/verupakshasharma9/blue-water-capital/blob/main/src/components/Journal.tsx"
click node_settings "https://github.com/verupakshasharma9/blue-water-capital/blob/main/src/components/Settings.tsx"
click node_store "https://github.com/verupakshasharma9/blue-water-capital/blob/main/src/utils/db.ts"
click node_entry "https://github.com/verupakshasharma9/blue-water-capital/blob/main/src/main.tsx"

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_nav,node_background,node_entry toneBlue
class node_planner,node_calculations,node_indexeddb toneAmber
class node_journal,node_settings,node_store toneMint
class node_trader toneIndigo
```

## Components

### App shell

- [App shell](https://github.com/verupakshasharma9/blue-water-capital/blob/main/src/App.tsx): `src/App.tsx`
- [Tab navigation](https://github.com/verupakshasharma9/blue-water-capital/blob/main/src/components/Navbar.tsx): `src/components/Navbar.tsx`
- [Animated background](https://github.com/verupakshasharma9/blue-water-capital/blob/main/src/components/Background3D.tsx): `src/components/Background3D.tsx`
- [React entry point](https://github.com/verupakshasharma9/blue-water-capital/blob/main/src/main.tsx): `src/main.tsx`

### Trade planning

- [Trade planner](https://github.com/verupakshasharma9/blue-water-capital/blob/main/src/components/TradePlanner.tsx): `src/components/TradePlanner.tsx`
- [Plan calculations](https://github.com/verupakshasharma9/blue-water-capital/blob/main/src/utils/calculations.ts): `src/utils/calculations.ts`

### Journal and settings

- [Trade journal](https://github.com/verupakshasharma9/blue-water-capital/blob/main/src/components/Journal.tsx): `src/components/Journal.tsx`
- [Journal settings](https://github.com/verupakshasharma9/blue-water-capital/blob/main/src/components/Settings.tsx): `src/components/Settings.tsx`
- [Journal storage](https://github.com/verupakshasharma9/blue-water-capital/blob/main/src/utils/db.ts): `src/utils/db.ts`

### Other components

- **Trader**
- **Browser IndexedDB**

## Connections

- Trader → App shell: uses
- React entry point → App shell: renders (evidence: `src/main.tsx`)
- App shell → Tab navigation: renders (evidence: `src/App.tsx`)
- App shell → Animated background: renders (evidence: `src/App.tsx`)
- App shell → Trade planner: renders (evidence: `src/App.tsx`)
- App shell → Trade journal: renders (evidence: `src/App.tsx`)
- App shell → Journal settings: renders (evidence: `src/App.tsx`)
- Tab navigation → App shell: changes tab (evidence: `src/components/Navbar.tsx`)
- Trade planner → Plan calculations: gets strikes (evidence: `src/components/TradePlanner.tsx`)
- Trade journal → Journal storage: fetches entries (evidence: `src/components/Journal.tsx`)
- Journal settings → Journal storage: reads, imports, clears (evidence: `src/components/Settings.tsx`)
- Journal settings → App shell: notifies changes (evidence: `src/components/Settings.tsx`)
- Journal storage → Browser IndexedDB: reads and writes (evidence: `src/utils/db.ts`)
