# j700070/stock-analyzer-python architecture

> Architecture diagram of the GitHub repository j700070/stock-analyzer-python, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/j700070/stock-analyzer-python
- Repository: https://github.com/j700070/stock-analyzer-python

## Overview

Stock-Analyzer-Python is a Streamlit stock-analysis dashboard. A user views a ticker’s market and company information, returns, financial statements and analysis, and valuation including a DCF model. The main app coordinates dashboard rendering and requests fundamental data from the scraper; the scraper obtains company and financial data from roic.ai, then cleans and calculates fundamentals through aux_functions.py. The README documents dashboard capabilities beyond the sampled excerpts; those are represented as views, but their individual implementation details are not independently verified.

Main entry points: [`main.py`](https://github.com/j700070/stock-analyzer-python/blob/main/main.py) (Streamlit app), [`scrapper.py`](https://github.com/j700070/stock-analyzer-python/blob/main/scrapper.py) (Stock scraper), [`aux_functions.py`](https://github.com/j700070/stock-analyzer-python/blob/main/aux_functions.py) (Fundamentals cleaning)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Dashboard"]
  node_app["Streamlit app<br/>[main.py]"]
  node_price["Price history<br/>[main.py]"]
  node_company["Company overview<br/>[main.py]"]
  node_returns["Share returns<br/>[main.py]"]
  node_earnings["Earnings and growth<br/>[main.py]"]
  node_profitability["Profitability<br/>[main.py]"]
  node_health["Financial health<br/>[main.py]"]
  node_valuation["Valuation ratios<br/>[main.py]"]
  node_dcf["DCF model<br/>[main.py]"]
end

subgraph group_data["Data collection"]
  node_scraper["Stock scraper<br/>[scrapper.py]"]
end

subgraph group_analysis["Financial analysis"]
  node_cleaning["Fundamentals cleaning<br/>[aux_functions.py]"]
  node_calculator["Fundamental metrics<br/>[aux_functions.py]"]
end

node_investor(("Dashboard user"))
node_roic{{"roic.ai"}}

node_investor -->|"views"| node_app
node_app -->|"renders"| node_price
node_app -->|"renders"| node_company
node_app -->|"renders"| node_returns
node_app -->|"renders"| node_earnings
node_app -->|"renders"| node_profitability
node_app -->|"renders"| node_health
node_app -->|"renders"| node_valuation
node_app -->|"renders"| node_dcf
node_app -->|"requests fundamentals"| node_scraper
node_scraper -->|"scrapes"| node_roic
node_scraper -->|"cleans data"| node_cleaning
node_scraper -->|"calculates metrics"| node_calculator

click node_app "https://github.com/j700070/stock-analyzer-python/blob/main/main.py"
click node_price "https://github.com/j700070/stock-analyzer-python/blob/main/main.py"
click node_company "https://github.com/j700070/stock-analyzer-python/blob/main/main.py"
click node_returns "https://github.com/j700070/stock-analyzer-python/blob/main/main.py"
click node_earnings "https://github.com/j700070/stock-analyzer-python/blob/main/main.py"
click node_profitability "https://github.com/j700070/stock-analyzer-python/blob/main/main.py"
click node_health "https://github.com/j700070/stock-analyzer-python/blob/main/main.py"
click node_valuation "https://github.com/j700070/stock-analyzer-python/blob/main/main.py"
click node_dcf "https://github.com/j700070/stock-analyzer-python/blob/main/main.py"
click node_scraper "https://github.com/j700070/stock-analyzer-python/blob/main/scrapper.py"
click node_cleaning "https://github.com/j700070/stock-analyzer-python/blob/main/aux_functions.py"
click node_calculator "https://github.com/j700070/stock-analyzer-python/blob/main/aux_functions.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_app,node_price,node_company,node_returns,node_earnings,node_profitability,node_health,node_valuation,node_dcf,node_investor toneBlue
class node_scraper toneAmber
class node_cleaning,node_calculator toneMint
class node_roic toneIndigo
```

## Components

### Dashboard

- [Streamlit app](https://github.com/j700070/stock-analyzer-python/blob/main/main.py): `main.py`
- [Price history](https://github.com/j700070/stock-analyzer-python/blob/main/main.py): `main.py`
- [Company overview](https://github.com/j700070/stock-analyzer-python/blob/main/main.py): `main.py`
- [Share returns](https://github.com/j700070/stock-analyzer-python/blob/main/main.py): `main.py`
- [Earnings and growth](https://github.com/j700070/stock-analyzer-python/blob/main/main.py): `main.py`
- [Profitability](https://github.com/j700070/stock-analyzer-python/blob/main/main.py): `main.py`
- [Financial health](https://github.com/j700070/stock-analyzer-python/blob/main/main.py): `main.py`
- [Valuation ratios](https://github.com/j700070/stock-analyzer-python/blob/main/main.py): `main.py`
- [DCF model](https://github.com/j700070/stock-analyzer-python/blob/main/main.py): `main.py`

### Data collection

- [Stock scraper](https://github.com/j700070/stock-analyzer-python/blob/main/scrapper.py): `scrapper.py`

### Financial analysis

- [Fundamentals cleaning](https://github.com/j700070/stock-analyzer-python/blob/main/aux_functions.py): `aux_functions.py`
- [Fundamental metrics](https://github.com/j700070/stock-analyzer-python/blob/main/aux_functions.py): `aux_functions.py`

### Other components

- **Dashboard user**
- **roic.ai**

## Connections

- Dashboard user → Streamlit app: views (evidence: `README.md`)
- Streamlit app → Price history: renders (evidence: `main.py`)
- Streamlit app → Company overview: renders (evidence: `README.md`)
- Streamlit app → Share returns: renders (evidence: `README.md`)
- Streamlit app → Earnings and growth: renders (evidence: `main.py`)
- Streamlit app → Profitability: renders (evidence: `main.py`)
- Streamlit app → Financial health: renders (evidence: `main.py`)
- Streamlit app → Valuation ratios: renders (evidence: `main.py`)
- Streamlit app → DCF model: renders (evidence: `README.md`)
- Streamlit app → Stock scraper: requests fundamentals (evidence: `main.py`)
- Stock scraper → roic.ai: scrapes (evidence: `scrapper.py`)
- Stock scraper → Fundamentals cleaning: cleans data (evidence: `scrapper.py`)
- Stock scraper → Fundamental metrics: calculates metrics (evidence: `scrapper.py`)
