# tryorfry/growth_invest_plan architecture

> Architecture diagram of the GitHub repository tryorfry/growth_invest_plan, 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/tryorfry/growth_invest_plan
- Repository: https://github.com/tryorfry/growth_invest_plan

## Overview

This is a growth-stock research and portfolio-analysis product. Users submit tickers through the CLI or Streamlit dashboard; the analyzer gathers market, fundamental, earnings, macro, and news data, applies trading-style and scoring logic, then presents or persists results. Dashboard capabilities extend into alerts, watchlists, portfolios, screening, backtesting, and reporting. Source excerpts and the index establish the main analysis and persistence links; several feature-page implementations were not sampled, so their internal connections are not asserted.

Main entry points: [`src/analyzer.py`](https://github.com/tryorfry/growth_invest_plan/blob/main/src/analyzer.py) (Stock analyzer), [`src/dashboard.py`](https://github.com/tryorfry/growth_invest_plan/blob/main/src/dashboard.py) (Web dashboard), [`src/database.py`](https://github.com/tryorfry/growth_invest_plan/blob/main/src/database.py) (Database), [`app.py`](https://github.com/tryorfry/growth_invest_plan/blob/main/app.py) (CLI analysis)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["User workflows"]
  node_cli["CLI analysis<br/>[app.py]"]
  node_dashboard["Web dashboard<br/>[dashboard.py]"]
  node_home["Ticker analysis view<br/>[home.py]"]
end

subgraph group_analysis["Analysis engine"]
  node_analyzer["Stock analyzer<br/>[analyzer.py]"]
  node_styles["Trading styles"]
  node_scorer["Checklist scoring<br/>[scorer.py]"]
  node_patterns["Pattern recognition"]
end

subgraph group_sources["Market data"]
  node_technical["Price and technical data<br/>[yfinance_source.py]"]
  node_fundamentals["Fundamental data<br/>[finviz_source.py]"]
  node_news["News sentiment<br/>[news_source.py]"]
  node_earnings["Earnings data<br/>[earnings_source.py]"]
  node_macro["Macro data<br/>[macro_source.py]"]
  node_moredata["Analyst and valuation sources"]
end

subgraph group_features["Research features"]
  node_advanced["Advanced analytics"]
  node_watchlists["Watchlists<br/>[watchlist.py]"]
  node_alerts["Alert evaluation<br/>[alert_engine.py]"]
  node_portfolio["Portfolio tracking"]
  node_screening["Screener<br/>[screener.py]"]
  node_backtest["Backtesting<br/>[backtest.py]"]
  node_reports["Automated reports"]
end

subgraph group_state["Persistence and delivery"]
  node_models["Analysis and user records<br/>[models.py]"]
  node_database[("Database<br/>[database.py]")]
  node_excel["Excel export<br/>[excel_exporter.py]"]
  node_email["Email notifications<br/>[notifiers.py]"]
end

node_investor(("Investor"))

node_investor -->|"submits tickers"| node_cli
node_investor -->|"opens dashboard"| node_dashboard
node_dashboard -->|"routes to"| node_home
node_home -->|"requests analysis"| node_analyzer
node_cli -->|"runs analysis"| node_analyzer
node_analyzer -->|"fetches prices"| node_technical
node_analyzer -->|"fetches fundamentals"| node_fundamentals
node_analyzer -->|"fetches sentiment"| node_news
node_analyzer -->|"fetches earnings"| node_earnings
node_analyzer -->|"fetches macro data"| node_macro
node_analyzer -->|"fetches other inputs"| node_moredata
node_analyzer -->|"selects strategy"| node_styles
node_analyzer -->|"calculates score"| node_scorer
node_technical -->|"detects patterns"| node_patterns
node_home -->|"saves analysis"| node_database
node_cli -->|"stores results"| node_database
node_database -->|"maps records"| node_models
node_dashboard -->|"offers analytics"| node_advanced
node_dashboard -->|"offers watchlists"| node_watchlists
node_dashboard -->|"offers alerts"| node_alerts
node_dashboard -->|"offers tracking"| node_portfolio
node_dashboard -->|"offers screening"| node_screening
node_dashboard -->|"offers backtesting"| node_backtest
node_dashboard -->|"offers reporting"| node_reports
node_alerts -->|"reads alert records"| node_models
node_alerts -->|"notifies by email"| node_email
node_portfolio -->|"manages portfolios"| node_database
node_reports -->|"reads records"| node_database
node_advanced -.->|"exports workbooks"| node_excel

click node_cli "https://github.com/tryorfry/growth_invest_plan/blob/main/app.py"
click node_dashboard "https://github.com/tryorfry/growth_invest_plan/blob/main/src/dashboard.py"
click node_home "https://github.com/tryorfry/growth_invest_plan/blob/main/src/views/home.py"
click node_analyzer "https://github.com/tryorfry/growth_invest_plan/blob/main/src/analyzer.py"
click node_styles "https://github.com/tryorfry/growth_invest_plan/tree/main/src/trading_styles"
click node_scorer "https://github.com/tryorfry/growth_invest_plan/blob/main/src/logic/scorer.py"
click node_patterns "https://github.com/tryorfry/growth_invest_plan/blob/main/src/pattern_recognition.py"
click node_technical "https://github.com/tryorfry/growth_invest_plan/blob/main/src/data_sources/yfinance_source.py"
click node_fundamentals "https://github.com/tryorfry/growth_invest_plan/blob/main/src/data_sources/finviz_source.py"
click node_news "https://github.com/tryorfry/growth_invest_plan/blob/main/src/data_sources/news_source.py"
click node_earnings "https://github.com/tryorfry/growth_invest_plan/blob/main/src/data_sources/earnings_source.py"
click node_macro "https://github.com/tryorfry/growth_invest_plan/blob/main/src/data_sources/macro_source.py"
click node_moredata "https://github.com/tryorfry/growth_invest_plan/tree/main/src/data_sources"
click node_advanced "https://github.com/tryorfry/growth_invest_plan/blob/main/src/views/advanced_analytics.py"
click node_watchlists "https://github.com/tryorfry/growth_invest_plan/blob/main/src/views/watchlist.py"
click node_alerts "https://github.com/tryorfry/growth_invest_plan/blob/main/src/alerts/alert_engine.py"
click node_portfolio "https://github.com/tryorfry/growth_invest_plan/blob/main/src/views/portfolio_tracker.py"
click node_screening "https://github.com/tryorfry/growth_invest_plan/blob/main/src/views/screener.py"
click node_backtest "https://github.com/tryorfry/growth_invest_plan/blob/main/src/views/backtest.py"
click node_reports "https://github.com/tryorfry/growth_invest_plan/blob/main/src/views/automated_reports.py"
click node_models "https://github.com/tryorfry/growth_invest_plan/blob/main/src/models.py"
click node_database "https://github.com/tryorfry/growth_invest_plan/blob/main/src/database.py"
click node_excel "https://github.com/tryorfry/growth_invest_plan/blob/main/src/exporters/excel_exporter.py"
click node_email "https://github.com/tryorfry/growth_invest_plan/blob/main/src/alerts/notifiers.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_cli,node_dashboard,node_home toneBlue
class node_analyzer,node_styles,node_scorer,node_patterns toneAmber
class node_technical,node_fundamentals,node_news,node_earnings,node_macro,node_moredata toneMint
class node_advanced,node_watchlists,node_alerts,node_portfolio,node_screening,node_backtest,node_reports toneRose
class node_models,node_database,node_excel,node_email,node_investor toneIndigo
```

## Components

### User workflows

- [CLI analysis](https://github.com/tryorfry/growth_invest_plan/blob/main/app.py): `app.py`
- [Web dashboard](https://github.com/tryorfry/growth_invest_plan/blob/main/src/dashboard.py): `src/dashboard.py`
- [Ticker analysis view](https://github.com/tryorfry/growth_invest_plan/blob/main/src/views/home.py): `src/views/home.py`

### Analysis engine

- [Stock analyzer](https://github.com/tryorfry/growth_invest_plan/blob/main/src/analyzer.py): `src/analyzer.py`
- [Trading styles](https://github.com/tryorfry/growth_invest_plan/tree/main/src/trading_styles): `src/trading_styles`
- [Checklist scoring](https://github.com/tryorfry/growth_invest_plan/blob/main/src/logic/scorer.py): `src/logic/scorer.py`
- [Pattern recognition](https://github.com/tryorfry/growth_invest_plan/blob/main/src/pattern_recognition.py): `src/pattern_recognition.py`

### Market data

- [Price and technical data](https://github.com/tryorfry/growth_invest_plan/blob/main/src/data_sources/yfinance_source.py): `src/data_sources/yfinance_source.py`
- [Fundamental data](https://github.com/tryorfry/growth_invest_plan/blob/main/src/data_sources/finviz_source.py): `src/data_sources/finviz_source.py`
- [News sentiment](https://github.com/tryorfry/growth_invest_plan/blob/main/src/data_sources/news_source.py): `src/data_sources/news_source.py`
- [Earnings data](https://github.com/tryorfry/growth_invest_plan/blob/main/src/data_sources/earnings_source.py): `src/data_sources/earnings_source.py`
- [Macro data](https://github.com/tryorfry/growth_invest_plan/blob/main/src/data_sources/macro_source.py): `src/data_sources/macro_source.py`
- [Analyst and valuation sources](https://github.com/tryorfry/growth_invest_plan/tree/main/src/data_sources): `src/data_sources`

### Research features

- [Advanced analytics](https://github.com/tryorfry/growth_invest_plan/blob/main/src/views/advanced_analytics.py): `src/views/advanced_analytics.py`
- [Watchlists](https://github.com/tryorfry/growth_invest_plan/blob/main/src/views/watchlist.py): `src/views/watchlist.py`
- [Alert evaluation](https://github.com/tryorfry/growth_invest_plan/blob/main/src/alerts/alert_engine.py): `src/alerts/alert_engine.py`
- [Portfolio tracking](https://github.com/tryorfry/growth_invest_plan/blob/main/src/views/portfolio_tracker.py): `src/views/portfolio_tracker.py`
- [Screener](https://github.com/tryorfry/growth_invest_plan/blob/main/src/views/screener.py): `src/views/screener.py`
- [Backtesting](https://github.com/tryorfry/growth_invest_plan/blob/main/src/views/backtest.py): `src/views/backtest.py`
- [Automated reports](https://github.com/tryorfry/growth_invest_plan/blob/main/src/views/automated_reports.py): `src/views/automated_reports.py`

### Persistence and delivery

- [Analysis and user records](https://github.com/tryorfry/growth_invest_plan/blob/main/src/models.py): `src/models.py`
- [Database](https://github.com/tryorfry/growth_invest_plan/blob/main/src/database.py): `src/database.py`
- [Excel export](https://github.com/tryorfry/growth_invest_plan/blob/main/src/exporters/excel_exporter.py): `src/exporters/excel_exporter.py`
- [Email notifications](https://github.com/tryorfry/growth_invest_plan/blob/main/src/alerts/notifiers.py): `src/alerts/notifiers.py`

### Other components

- **Investor**

## Connections

- Investor → CLI analysis: submits tickers
- Investor → Web dashboard: opens dashboard
- Web dashboard → Ticker analysis view: routes to (evidence: `src/dashboard.py`)
- Ticker analysis view → Stock analyzer: requests analysis (evidence: `src/views/home.py`)
- CLI analysis → Stock analyzer: runs analysis (evidence: `app.py`)
- Stock analyzer → Price and technical data: fetches prices (evidence: `src/analyzer.py`)
- Stock analyzer → Fundamental data: fetches fundamentals (evidence: `src/analyzer.py`)
- Stock analyzer → News sentiment: fetches sentiment (evidence: `src/analyzer.py`)
- Stock analyzer → Earnings data: fetches earnings (evidence: `src/analyzer.py`)
- Stock analyzer → Macro data: fetches macro data (evidence: `src/analyzer.py`)
- Stock analyzer → Analyst and valuation sources: fetches other inputs (evidence: `src/analyzer.py`)
- Stock analyzer → Trading styles: selects strategy (evidence: `src/analyzer.py`)
- Stock analyzer → Checklist scoring: calculates score (evidence: `src/analyzer.py`)
- Price and technical data → Pattern recognition: detects patterns (evidence: `src/data_sources/yfinance_source.py`)
- Ticker analysis view → Database: saves analysis (evidence: `src/views/home.py`)
- CLI analysis → Database: stores results (evidence: `app.py`)
- Database → Analysis and user records: maps records (evidence: `src/database.py`)
- Web dashboard → Advanced analytics: offers analytics (evidence: `src/dashboard.py`)
- Web dashboard → Watchlists: offers watchlists (evidence: `src/dashboard.py`)
- Web dashboard → Alert evaluation: offers alerts
- Web dashboard → Portfolio tracking: offers tracking (evidence: `src/dashboard.py`)
- Web dashboard → Screener: offers screening (evidence: `src/dashboard.py`)
- Web dashboard → Backtesting: offers backtesting (evidence: `src/dashboard.py`)
- Web dashboard → Automated reports: offers reporting (evidence: `src/dashboard.py`)
- Alert evaluation → Analysis and user records: reads alert records (evidence: `src/alerts/alert_engine.py`)
- Alert evaluation → Email notifications: notifies by email (evidence: `src/alerts/alert_engine.py`)
- Portfolio tracking → Database: manages portfolios (evidence: `src/views/portfolio_tracker.py`)
- Automated reports → Database: reads records (evidence: `src/views/automated_reports.py`)
- Advanced analytics → Excel export: exports workbooks
