# nehakul2/stock-insights-app-1 architecture

> Architecture diagram of the GitHub repository nehakul2/stock-insights-app-1, 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/nehakul2/stock-insights-app-1
- Repository: https://github.com/nehakul2/stock-insights-app-1

## Overview

The repository contains a Streamlit stock-insights app alongside a separate starter screen; the README documents only the starter. The stock app’s source describes profiles with watchlists and alerts, ticker details, charts, news, and an SMA report. Since the app is largely in one file and excerpts omit substantial sections, the graph groups its responsibilities by function and shows only relationships supported by the excerpts; persistence and several feature wirings are not inferred.

Main entry points: [`stock_app.py`](https://github.com/nehakul2/stock-insights-app-1/blob/main/stock_app.py) (Stock app UI), [`streamlit_app.py`](https://github.com/nehakul2/stock-insights-app-1/blob/main/streamlit_app.py) (Starter screen)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["App interface"]
  node_starter["Starter screen<br/>[streamlit_app.py]"]
  node_stock_ui["Stock app UI<br/>[stock_app.py]"]
end

subgraph group_market["Market insights"]
  node_ticker_details["Ticker details<br/>[stock_app.py]"]
  node_market_data["Market data<br/>[stock_app.py]"]
  node_charts["Charts<br/>[stock_app.py]"]
  node_sma_report["SMA report<br/>[stock_app.py]"]
  node_news_earnings["News and earnings<br/>[stock_app.py]"]
end

subgraph group_profiles["Profiles and alerts"]
  node_profiles["Watchlist profiles<br/>[stock_app.py]"]
  node_alerts["Alert checking<br/>[stock_app.py]"]
  node_alert_history["Alert history<br/>[stock_app.py]"]
end

node_user(("User"))
node_yfinance["Yahoo Finance"]

node_user -->|"opens"| node_starter
node_user -->|"uses"| node_stock_ui
node_stock_ui -->|"requests ticker data"| node_yfinance
node_ticker_details -->|"reads ticker info"| node_yfinance
node_news_earnings -->|"requests calendar"| node_yfinance
node_stock_ui -->|"selects profile"| node_profiles
node_stock_ui -->|"checks alerts"| node_alerts
node_profiles -->|"provides configured alerts"| node_alerts
node_alerts -->|"records triggers"| node_alert_history
node_stock_ui -->|"shows ticker"| node_ticker_details
node_stock_ui -->|"renders charts"| node_charts
node_stock_ui -->|"shows SMA report"| node_sma_report
node_stock_ui -->|"shows news and dates"| node_news_earnings

click node_starter "https://github.com/nehakul2/stock-insights-app-1/blob/main/streamlit_app.py"
click node_stock_ui "https://github.com/nehakul2/stock-insights-app-1/blob/main/stock_app.py"
click node_ticker_details "https://github.com/nehakul2/stock-insights-app-1/blob/main/stock_app.py"
click node_market_data "https://github.com/nehakul2/stock-insights-app-1/blob/main/stock_app.py"
click node_charts "https://github.com/nehakul2/stock-insights-app-1/blob/main/stock_app.py"
click node_sma_report "https://github.com/nehakul2/stock-insights-app-1/blob/main/stock_app.py"
click node_news_earnings "https://github.com/nehakul2/stock-insights-app-1/blob/main/stock_app.py"
click node_profiles "https://github.com/nehakul2/stock-insights-app-1/blob/main/stock_app.py"
click node_alerts "https://github.com/nehakul2/stock-insights-app-1/blob/main/stock_app.py"
click node_alert_history "https://github.com/nehakul2/stock-insights-app-1/blob/main/stock_app.py"

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_starter,node_stock_ui,node_user toneBlue
class node_ticker_details,node_market_data,node_charts,node_sma_report,node_news_earnings toneAmber
class node_profiles,node_alerts,node_alert_history toneMint
class node_yfinance toneIndigo
```

## Components

### App interface

- [Starter screen](https://github.com/nehakul2/stock-insights-app-1/blob/main/streamlit_app.py): `streamlit_app.py`
- [Stock app UI](https://github.com/nehakul2/stock-insights-app-1/blob/main/stock_app.py): `stock_app.py`

### Market insights

- [Ticker details](https://github.com/nehakul2/stock-insights-app-1/blob/main/stock_app.py): `stock_app.py`
- [Market data](https://github.com/nehakul2/stock-insights-app-1/blob/main/stock_app.py): `stock_app.py`
- [Charts](https://github.com/nehakul2/stock-insights-app-1/blob/main/stock_app.py): `stock_app.py`
- [SMA report](https://github.com/nehakul2/stock-insights-app-1/blob/main/stock_app.py): `stock_app.py`
- [News and earnings](https://github.com/nehakul2/stock-insights-app-1/blob/main/stock_app.py): `stock_app.py`

### Profiles and alerts

- [Watchlist profiles](https://github.com/nehakul2/stock-insights-app-1/blob/main/stock_app.py): `stock_app.py`
- [Alert checking](https://github.com/nehakul2/stock-insights-app-1/blob/main/stock_app.py): `stock_app.py`
- [Alert history](https://github.com/nehakul2/stock-insights-app-1/blob/main/stock_app.py): `stock_app.py`

### Other components

- **User**
- **Yahoo Finance**

## Connections

- User → Starter screen: opens
- User → Stock app UI: uses
- Stock app UI → Yahoo Finance: requests ticker data
- Ticker details → Yahoo Finance: reads ticker info
- News and earnings → Yahoo Finance: requests calendar
- Stock app UI → Watchlist profiles: selects profile
- Stock app UI → Alert checking: checks alerts
- Watchlist profiles → Alert checking: provides configured alerts
- Alert checking → Alert history: records triggers
- Stock app UI → Ticker details: shows ticker
- Stock app UI → Charts: renders charts
- Stock app UI → SMA report: shows SMA report
- Stock app UI → News and earnings: shows news and dates
