# kittinhulk/quant-dashboard architecture

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

- Interactive diagram: https://gitdiagram.com/kittinhulk/quant-dashboard
- Repository: https://github.com/kittinhulk/quant-dashboard

## Overview

#### Purpose and entry points
This is a small Python forecasting/dashboard repository centered on JPY exchange-rate analysis, apparently using Streamlit. There is no README documentation, package structure, or explicit service layer; the application behavior is defined directly in several top-level scripts.

Primary candidate entry points:
- `app.py`
- `app_streamlit_jpyx_forecast_dashboard.py`
- `app_streamlit_gc_f_with_comparison.py`

These likely represent alternative dashboard versions rather than one composed application.

#### Dashboard variants
The repository keeps multiple independently runnable Streamlit implementations:
- `app_safe_streamlit_gc_f.py`
- `app_streamlit_gc_f_with_pretty_plot.py`
- `app_streamlit_gc_f_with_comparison.py`

The `gc_f` naming suggests a gold-futures-oriented variant, while `app_streamlit_jpyx_forecast_dashboard.py` targets a JPY index/currency forecast dashboard. Shared functionality, if any, is duplicated at script level rather than extracted into modules.

#### Forecasting and visualization stage
Each application script likely owns the complete request-to-result workflow: obtain time-series data, build or run a forecast, and render interactive results. The “pretty plot” and “comparison” variants indicate visualization and forecast/model comparison are first-class features:
- `app_streamlit_gc_f_with_pretty_plot.py`
- `app_streamlit_gc_f_with_comparison.py`
- `app_streamlit_jpyx_forecast_dashboard.py`

There is no visible internal domain-model or pipeline package boundary.

#### Runtime and dependencies
The runtime is Python, with dependencies declared in:
- `requirements.txt`

Streamlit is strongly implied by the application filenames. Forecasting, market-data retrieval, plotting, and numerical libraries may be present in requirements, but cannot be confirmed from the supplied tree. The apps should be launched as standalone Streamlit scripts rather than imported as a conventional Python package.

#### Control and data boundaries
The primary control boundary is the Streamlit process: user interaction triggers script execution and dashboard rendering. Any external market-data source, forecasting engine, or model API is accessed directly from the top-level app scripts, if present:
- `app.py`
- `app_streamlit_jpyx_forecast_dashboard.py`
- `app_safe_streamlit_gc_f.py`

No persistent database, backend API, container/deployment configuration, or infrastructure-as-code is represented in the repository tree.

#### Validation and maintenance
A standalone test/prototype file exists:
- `test.py`

Because the repository contains parallel application scripts and no shared source directory, changes to data acquisition, forecast logic, or UI conventions may need to be propagated across variants manually. The most important architectural decision for future work is whether to retain these as separate experiments or consolidate common market-data, forecasting, and rendering stages into reusable modules.

Main entry points: [`app_streamlit_jpyx_forecast_dashboard.py`](https://github.com/kittinhulk/quant-dashboard/blob/main/app_streamlit_jpyx_forecast_dashboard.py) (JPY forecast dashboard), [`app.py`](https://github.com/kittinhulk/quant-dashboard/blob/main/app.py) (Base app), [`app_streamlit_gc_f_with_comparison.py`](https://github.com/kittinhulk/quant-dashboard/blob/main/app_streamlit_gc_f_with_comparison.py) (Comparison GC-F dashboard), [`app_safe_streamlit_gc_f.py`](https://github.com/kittinhulk/quant-dashboard/blob/main/app_safe_streamlit_gc_f.py) (Safe GC-F dashboard)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_dashboards["Streamlit dashboard variants"]
  node_app["Base app<br/>dashboard script<br/>[app.py]"]
  node_jpyx["JPY forecast dashboard<br/>dashboard script"]
  node_safe_gcf["Safe GC-F dashboard<br/>dashboard script"]
  node_pretty_gcf["Pretty-plot GC-F dashboard<br/>dashboard script"]
  node_comparison_gcf["Comparison GC-F dashboard<br/>dashboard script"]
end

node_python{{"Python runtime"}}
node_requirements["Dependencies<br/>dependency manifest<br/>[requirements.txt]"]
node_streamlit{{"Streamlit process<br/>interactive runtime"}}
node_market_data[("External market data<br/>external data source")]
node_forecasting["Forecasting logic<br/>in-script stage"]
node_visualization["Interactive visualization<br/>in-script stage"]

node_requirements -->|"declares packages"| node_python
node_python -->|"runs"| node_streamlit
node_streamlit -->|"launches"| node_app
node_streamlit -->|"launches"| node_jpyx
node_streamlit -->|"launches"| node_safe_gcf
node_streamlit -->|"launches"| node_pretty_gcf
node_streamlit -->|"launches"| node_comparison_gcf
node_app -.->|"retrieves directly"| node_market_data
node_jpyx -.->|"retrieves directly"| node_market_data
node_safe_gcf -.->|"retrieves directly"| node_market_data
node_app -->|"runs"| node_forecasting
node_jpyx -->|"runs"| node_forecasting
node_comparison_gcf -->|"compares forecasts"| node_forecasting
node_pretty_gcf -->|"renders plots"| node_visualization
node_jpyx -->|"renders results"| node_visualization
node_comparison_gcf -->|"renders comparison"| node_visualization
node_forecasting -->|"supplies forecast results"| node_visualization

click node_requirements "https://github.com/kittinhulk/quant-dashboard/blob/main/requirements.txt"
click node_app "https://github.com/kittinhulk/quant-dashboard/blob/main/app.py"
click node_jpyx "https://github.com/kittinhulk/quant-dashboard/blob/main/app_streamlit_jpyx_forecast_dashboard.py"
click node_safe_gcf "https://github.com/kittinhulk/quant-dashboard/blob/main/app_safe_streamlit_gc_f.py"
click node_pretty_gcf "https://github.com/kittinhulk/quant-dashboard/blob/main/app_streamlit_gc_f_with_pretty_plot.py"
click node_comparison_gcf "https://github.com/kittinhulk/quant-dashboard/blob/main/app_streamlit_gc_f_with_comparison.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_jpyx,node_safe_gcf,node_pretty_gcf,node_comparison_gcf toneBlue
class node_python,node_requirements,node_streamlit,node_market_data,node_forecasting,node_visualization toneNeutral
```

## Components

### Streamlit dashboard variants

Independently runnable top-level scripts.

- [Base app](https://github.com/kittinhulk/quant-dashboard/blob/main/app.py): dashboard script · `app.py`
- [JPY forecast dashboard](https://github.com/kittinhulk/quant-dashboard/blob/main/app_streamlit_jpyx_forecast_dashboard.py): dashboard script · `app_streamlit_jpyx_forecast_dashboard.py`
- [Safe GC-F dashboard](https://github.com/kittinhulk/quant-dashboard/blob/main/app_safe_streamlit_gc_f.py): dashboard script · `app_safe_streamlit_gc_f.py`
- [Pretty-plot GC-F dashboard](https://github.com/kittinhulk/quant-dashboard/blob/main/app_streamlit_gc_f_with_pretty_plot.py): dashboard script · `app_streamlit_gc_f_with_pretty_plot.py`
- [Comparison GC-F dashboard](https://github.com/kittinhulk/quant-dashboard/blob/main/app_streamlit_gc_f_with_comparison.py): dashboard script · `app_streamlit_gc_f_with_comparison.py`

### Other components

- **Python runtime**: runtime
- [Dependencies](https://github.com/kittinhulk/quant-dashboard/blob/main/requirements.txt): dependency manifest · `requirements.txt`
- **Streamlit process**: interactive runtime · User interactions execute and render dashboard scripts.
- **External market data**: external data source · Accessed directly by dashboard scripts when configured.
- **Forecasting logic**: in-script stage · Forecast construction or execution remains inside each script.
- **Interactive visualization**: in-script stage · Plots and dashboard results are rendered by each script.

## Connections

- Dependencies → Python runtime: declares packages
- Python runtime → Streamlit process: runs
- Streamlit process → Base app: launches
- Streamlit process → JPY forecast dashboard: launches
- Streamlit process → Safe GC-F dashboard: launches
- Streamlit process → Pretty-plot GC-F dashboard: launches
- Streamlit process → Comparison GC-F dashboard: launches
- Base app → External market data: retrieves directly
- JPY forecast dashboard → External market data: retrieves directly
- Safe GC-F dashboard → External market data: retrieves directly
- Base app → Forecasting logic: runs
- JPY forecast dashboard → Forecasting logic: runs
- Comparison GC-F dashboard → Forecasting logic: compares forecasts
- Pretty-plot GC-F dashboard → Interactive visualization: renders plots
- JPY forecast dashboard → Interactive visualization: renders results
- Comparison GC-F dashboard → Interactive visualization: renders comparison
- Forecasting logic → Interactive visualization: supplies forecast results
