# lht1321/shouldersofgiants architecture

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

- Interactive diagram: https://gitdiagram.com/lht1321/shouldersofgiants
- Repository: https://github.com/lht1321/shouldersofgiants

## Overview

Shoulders of Giants is a Korean-language 13F research site. Users explore benchmark-relative portfolio performance, search and inspect investor profiles, simulate integer-share allocations from a chosen investor or regime consensus, and compare quarter-to-quarter position changes. The graph follows those page entry points through the supplied components and calculation modules into the shared site data. It also retains the documented investor archive and reporting capabilities. Some relationships are supported only by the README or SOURCE INDEX; unsampled implementations and deployment details are not inferred.

Main entry points: [`components/site-header.tsx`](https://github.com/lht1321/shouldersofgiants/blob/main/components/site-header.tsx) (Site navigation), [`lib/site-data.ts`](https://github.com/lht1321/shouldersofgiants/blob/main/lib/site-data.ts) (Site data access), [`app/investors/[id]/page.tsx`](https://github.com/lht1321/shouldersofgiants/blob/main/app/investors/%5Bid%5D/page.tsx) (Investor detail page), [`app/page.tsx`](https://github.com/lht1321/shouldersofgiants/blob/main/app/page.tsx) (Performance page)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_navigation["Navigation"]
  node_header["Site navigation<br/>[site-header.tsx]"]
  node_picker["Investor picker"]
end

subgraph group_research["Investor research"]
  node_home["Performance page<br/>[page.tsx]"]
  node_dashboard["Performance dashboard"]
  node_archivepage["Investor archive page<br/>[page.tsx]"]
  node_archive["Investor archive"]
  node_detailpage["Investor detail page<br/>[page.tsx]"]
  node_detailcharts["Detail charts"]
  node_portrait["Investor portrait"]
end

subgraph group_allocation["Budget allocation"]
  node_allocpage["Allocator page<br/>[page.tsx]"]
  node_allocator["Allocation controls"]
  node_allocationcalc["Share allocation<br/>[allocation.ts]"]
  node_budgetparse["Budget parsing<br/>[budget-input.ts]"]
end

subgraph group_changes["Position changes"]
  node_changespage["Changes page<br/>[page.tsx]"]
  node_changes["Change explorer"]
  node_change_logic["Change classification"]
end

subgraph group_shared["Shared data and logic"]
  node_directory["Search and sorting"]
  node_data_access["Site data access<br/>[site-data.ts]"]
  node_site_data["Generated site dataset<br/>[site-data.json]"]
  node_types["Domain types<br/>[types.ts]"]
end

node_visitor(("Site visitor"))

node_visitor -->|"opens"| node_home
node_visitor -->|"opens"| node_archivepage
node_visitor -->|"opens"| node_allocpage
node_visitor -->|"opens"| node_changespage
node_home -->|"renders"| node_dashboard
node_archivepage -->|"renders"| node_archive
node_detailpage -->|"renders"| node_detailcharts
node_detailpage -->|"renders"| node_portrait
node_allocpage -->|"renders"| node_allocator
node_changespage -->|"renders"| node_changes
node_home -->|"renders"| node_header
node_archivepage -->|"renders"| node_header
node_detailpage -->|"renders"| node_header
node_allocpage -->|"renders"| node_header
node_changespage -->|"renders"| node_header
node_dashboard -->|"links to report"| node_detailpage
node_dashboard -->|"uses"| node_picker
node_allocator -->|"uses"| node_picker
node_changes -->|"uses"| node_picker
node_header -->|"searches and sorts"| node_directory
node_picker -->|"searches and sorts"| node_directory
node_allocator -->|"parses budget"| node_budgetparse
node_allocator -->|"calculates shares"| node_allocationcalc
node_changes -->|"classifies changes"| node_change_logic
node_home -->|"receives data"| node_data_access
node_archivepage -->|"receives data"| node_data_access
node_detailpage -->|"reads investor"| node_data_access
node_allocpage -->|"receives data"| node_data_access
node_changespage -->|"receives data"| node_data_access
node_data_access -->|"loads"| node_site_data

click node_home "https://github.com/lht1321/shouldersofgiants/blob/main/app/page.tsx"
click node_dashboard "https://github.com/lht1321/shouldersofgiants/blob/main/components/performance-dashboard.tsx"
click node_archivepage "https://github.com/lht1321/shouldersofgiants/blob/main/app/investors/page.tsx"
click node_archive "https://github.com/lht1321/shouldersofgiants/blob/main/components/investor-archive.tsx"
click node_detailpage "https://github.com/lht1321/shouldersofgiants/blob/main/app/investors/%5Bid%5D/page.tsx"
click node_detailcharts "https://github.com/lht1321/shouldersofgiants/blob/main/components/investor-detail-charts.tsx"
click node_portrait "https://github.com/lht1321/shouldersofgiants/blob/main/components/investor-portrait.tsx"
click node_allocpage "https://github.com/lht1321/shouldersofgiants/blob/main/app/allocator/page.tsx"
click node_allocator "https://github.com/lht1321/shouldersofgiants/blob/main/components/allocator-client.tsx"
click node_allocationcalc "https://github.com/lht1321/shouldersofgiants/blob/main/lib/allocation.ts"
click node_budgetparse "https://github.com/lht1321/shouldersofgiants/blob/main/lib/budget-input.ts"
click node_changespage "https://github.com/lht1321/shouldersofgiants/blob/main/app/changes/page.tsx"
click node_changes "https://github.com/lht1321/shouldersofgiants/blob/main/components/changes-explorer.tsx"
click node_change_logic "https://github.com/lht1321/shouldersofgiants/blob/main/lib/position-changes.ts"
click node_header "https://github.com/lht1321/shouldersofgiants/blob/main/components/site-header.tsx"
click node_picker "https://github.com/lht1321/shouldersofgiants/blob/main/components/investor-picker.tsx"
click node_directory "https://github.com/lht1321/shouldersofgiants/blob/main/lib/investor-directory.ts"
click node_data_access "https://github.com/lht1321/shouldersofgiants/blob/main/lib/site-data.ts"
click node_site_data "https://github.com/lht1321/shouldersofgiants/blob/main/lib/site-data.json"
click node_types "https://github.com/lht1321/shouldersofgiants/blob/main/lib/types.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_header,node_picker toneBlue
class node_home,node_dashboard,node_archivepage,node_archive,node_detailpage,node_detailcharts,node_portrait toneAmber
class node_allocpage,node_allocator,node_allocationcalc,node_budgetparse toneMint
class node_changespage,node_changes,node_change_logic toneRose
class node_directory,node_data_access,node_site_data,node_types,node_visitor toneIndigo
```

## Components

### Navigation

- [Site navigation](https://github.com/lht1321/shouldersofgiants/blob/main/components/site-header.tsx): `components/site-header.tsx`
- [Investor picker](https://github.com/lht1321/shouldersofgiants/blob/main/components/investor-picker.tsx): `components/investor-picker.tsx`

### Investor research

- [Performance page](https://github.com/lht1321/shouldersofgiants/blob/main/app/page.tsx): `app/page.tsx`
- [Performance dashboard](https://github.com/lht1321/shouldersofgiants/blob/main/components/performance-dashboard.tsx): `components/performance-dashboard.tsx`
- [Investor archive page](https://github.com/lht1321/shouldersofgiants/blob/main/app/investors/page.tsx): `app/investors/page.tsx`
- [Investor archive](https://github.com/lht1321/shouldersofgiants/blob/main/components/investor-archive.tsx): `components/investor-archive.tsx`
- [Investor detail page](https://github.com/lht1321/shouldersofgiants/blob/main/app/investors/%5Bid%5D/page.tsx): `app/investors/[id]/page.tsx`
- [Detail charts](https://github.com/lht1321/shouldersofgiants/blob/main/components/investor-detail-charts.tsx): `components/investor-detail-charts.tsx`
- [Investor portrait](https://github.com/lht1321/shouldersofgiants/blob/main/components/investor-portrait.tsx): `components/investor-portrait.tsx`

### Budget allocation

- [Allocator page](https://github.com/lht1321/shouldersofgiants/blob/main/app/allocator/page.tsx): `app/allocator/page.tsx`
- [Allocation controls](https://github.com/lht1321/shouldersofgiants/blob/main/components/allocator-client.tsx): `components/allocator-client.tsx`
- [Share allocation](https://github.com/lht1321/shouldersofgiants/blob/main/lib/allocation.ts): `lib/allocation.ts`
- [Budget parsing](https://github.com/lht1321/shouldersofgiants/blob/main/lib/budget-input.ts): `lib/budget-input.ts`

### Position changes

- [Changes page](https://github.com/lht1321/shouldersofgiants/blob/main/app/changes/page.tsx): `app/changes/page.tsx`
- [Change explorer](https://github.com/lht1321/shouldersofgiants/blob/main/components/changes-explorer.tsx): `components/changes-explorer.tsx`
- [Change classification](https://github.com/lht1321/shouldersofgiants/blob/main/lib/position-changes.ts): `lib/position-changes.ts`

### Shared data and logic

- [Search and sorting](https://github.com/lht1321/shouldersofgiants/blob/main/lib/investor-directory.ts): `lib/investor-directory.ts`
- [Site data access](https://github.com/lht1321/shouldersofgiants/blob/main/lib/site-data.ts): `lib/site-data.ts`
- [Generated site dataset](https://github.com/lht1321/shouldersofgiants/blob/main/lib/site-data.json): `lib/site-data.json`
- [Domain types](https://github.com/lht1321/shouldersofgiants/blob/main/lib/types.ts): `lib/types.ts`

### Other components

- **Site visitor**

## Connections

- Site visitor → Performance page: opens (evidence: `README.md`)
- Site visitor → Investor archive page: opens (evidence: `README.md`)
- Site visitor → Allocator page: opens (evidence: `README.md`)
- Site visitor → Changes page: opens (evidence: `README.md`)
- Performance page → Performance dashboard: renders (evidence: `app/page.tsx`)
- Investor archive page → Investor archive: renders (evidence: `app/investors/page.tsx`)
- Investor detail page → Detail charts: renders (evidence: `app/investors/[id]/page.tsx`)
- Investor detail page → Investor portrait: renders (evidence: `app/investors/[id]/page.tsx`)
- Allocator page → Allocation controls: renders (evidence: `app/allocator/page.tsx`)
- Changes page → Change explorer: renders (evidence: `app/changes/page.tsx`)
- Performance page → Site navigation: renders (evidence: `app/page.tsx`)
- Investor archive page → Site navigation: renders (evidence: `app/investors/page.tsx`)
- Investor detail page → Site navigation: renders (evidence: `app/investors/[id]/page.tsx`)
- Allocator page → Site navigation: renders (evidence: `app/allocator/page.tsx`)
- Changes page → Site navigation: renders (evidence: `app/changes/page.tsx`)
- Performance dashboard → Investor detail page: links to report (evidence: `components/performance-dashboard.tsx`)
- Performance dashboard → Investor picker: uses (evidence: `components/performance-dashboard.tsx`)
- Allocation controls → Investor picker: uses (evidence: `components/allocator-client.tsx`)
- Change explorer → Investor picker: uses (evidence: `components/changes-explorer.tsx`)
- Site navigation → Search and sorting: searches and sorts (evidence: `components/site-header.tsx`)
- Investor picker → Search and sorting: searches and sorts (evidence: `components/investor-picker.tsx`)
- Allocation controls → Budget parsing: parses budget (evidence: `components/allocator-client.tsx`)
- Allocation controls → Share allocation: calculates shares (evidence: `components/allocator-client.tsx`)
- Change explorer → Change classification: classifies changes (evidence: `components/changes-explorer.tsx`)
- Performance page → Site data access: receives data (evidence: `app/page.tsx`)
- Investor archive page → Site data access: receives data (evidence: `app/investors/page.tsx`)
- Investor detail page → Site data access: reads investor (evidence: `app/investors/[id]/page.tsx`)
- Allocator page → Site data access: receives data (evidence: `app/allocator/page.tsx`)
- Changes page → Site data access: receives data (evidence: `app/changes/page.tsx`)
- Site data access → Generated site dataset: loads (evidence: `lib/site-data.ts`)
