# techtronixx/quantboard architecture

> Architecture diagram of the GitHub repository techtronixx/quantboard, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-11-02). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/techtronixx/quantboard
- Repository: https://github.com/techtronixx/quantboard

## Overview

##### Project type and purpose
- QuantBoard is a single‐page, full‐stack Python dashboard application built on Streamlit. Its purpose is to provide real-time and historical cryptocurrency market insights, technical indicators, AI-powered predictions, economic data, and portfolio analytics—all in a unified UI.

##### File structure
- Top levels:
- .devcontainer/ & .gitignore – development environment config
- README.md – project overview, tech stack, usage
- app.py – the single entry point (Streamlit app)
- requirements.txt – dependencies
- setup.py – API key setup logic
- Quantboard_demo.mp4 – demo video
- No separate frontend/backend folders; instead, app.py combines UI and server logic.
- No internal database; all data is fetched in real time via external APIs.
- Streams: uses Python’s AsyncIO/Requests to call APIs, Pandas/NumPy for processing, scikit-learn for on-the-fly ML, Plotly for visualization, and custom CSS/HTML for styling.

##### README for architectural insights
- Frontend: Streamlit widgets + Custom CSS + HTML
- Backend: Python 3.8+ script (app.py) orchestrating:
- Data fetching modules (CoinGecko, FRED, Yahoo Finance, COT)
- Technical analysis modules (TA-Lib, custom indicators)
- ML module (Random Forest regression)
- Visualization module (Plotly)
- Deployment target: Streamlit Cloud (no separate web server).

a. Main components
1. User Browser (Web UI)
2. Streamlit App Server (app.py)
- UI layer (Streamlit widgets, CSS/HTML)
- Orchestration layer (router for user input)
- Data Processing layer
- Data Fetchers
- Technical Analysis Engine
- ML Prediction Engine
- Economic Indicators Engine
- Visualization layer (Plotly charts)
3. External Services
- CoinGecko API
- FRED API
- Yahoo Finance API
- COT Data Source
4. (Optional) Secrets/config (setup.py, .streamlit/secrets.toml)
b. Relationships and data flows
- Browser → Streamlit App: user inputs (selection of coins, indicators, toggles)
- Streamlit App UI → Orchestration: routes inputs to processing modules
- Orchestration → Data Fetchers: HTTP/REST calls to external APIs
- Fetchers → Data Processing: return JSON/time series
- Data Processing → ML Engine: train/predict on fetched historical data
- Analysis & Prediction → Visualization: produce Plotly figures
- Visualization → UI: render interactive charts and tables back to browser
- Debug Mode: feedback loop showing API status & errors
c. Architectural patterns and principles
- Layered architecture within a single‐process app: UI, orchestration, processing, visualization
- Separation of concerns: each engine (fetcher, TA, ML) encapsulates one responsibility
- Real‐time, stateless interactions—no persistent data store; everything is in memory per session
- Use of third-party services as micro-services
d. Key technologies
- Streamlit (UI + lightweight server)
- AsyncIO/Requests (HTTP clients)
- Pandas, NumPy, SciPy (data manipulation)
- TA-Lib & custom Python modules (technical indicators)
- Scikit-learn (Random Forest)
- Plotly (visualization)
- CSS/HTML (styling)
- Python packaging (setup.py) for secret management

## Diagram (Mermaid)

```mermaid
graph TD
    User["User Browser"]:::ui

    subgraph "Streamlit App Server"
        UIPA["Streamlit UI Layer"]:::ui
        ORCH["Orchestration Layer"]:::ui
        subgraph "Data Processing"
            FETCH["Data Fetchers"]:::modules
            TA["Technical Analysis Engine"]:::modules
            ML["ML Prediction Engine"]:::modules
            ECON["Economic Indicators Engine"]:::modules
            DEBUG["Debug & Health Module"]:::modules
        end
        VIS["Visualization Module"]:::modules
    end

    subgraph "External APIs"
        CG["CoinGecko API"]:::external
        FRED["FRED API"]:::external
        YF["Yahoo Finance API"]:::external
        COT["COT Data Source"]:::external
    end

    SECRETS["Secrets/Configuration"]:::config
    README["Project Overview & Guidelines"]:::config
    REQ["Dependency Specifications"]:::config
    DEV["Development Env Config"]:::config
    DEMO["Demo Video Artifact"]:::config
    GIT["Git Ignore Rules"]:::config

    %% Connections
    User --> UIPA
    UIPA --> ORCH
    ORCH --> FETCH
    ORCH --> TA
    ORCH --> ML
    ORCH --> ECON
    FETCH --> CG
    FETCH --> FRED
    FETCH --> YF
    FETCH --> COT
    FETCH --> DEBUG
    TA --> VIS
    ML --> VIS
    ECON --> VIS
    VIS --> UIPA
    SECRETS -.-> UIPA
    SECRETS -.-> ORCH

    %% Click Events
    click UIPA "https://github.com/techtronixx/quantboard/blob/main/app.py"
    click ORCH "https://github.com/techtronixx/quantboard/blob/main/app.py"
    click FETCH "https://github.com/techtronixx/quantboard/blob/main/app.py"
    click TA "https://github.com/techtronixx/quantboard/blob/main/app.py"
    click ML "https://github.com/techtronixx/quantboard/blob/main/app.py"
    click VIS "https://github.com/techtronixx/quantboard/blob/main/app.py"
    click SECRETS "https://github.com/techtronixx/quantboard/blob/main/setup.py"
    click REQ "https://github.com/techtronixx/quantboard/blob/main/requirements.txt"
    click README "https://github.com/techtronixx/quantboard/blob/main/README.md"
    click DEV "https://github.com/techtronixx/quantboard/blob/main/.devcontainer/devcontainer.json"
    click DEMO "https://github.com/techtronixx/quantboard/blob/main/Quantboard_demo.mp4"
    click GIT "https://github.com/techtronixx/quantboard/blob/main/.gitignore"

    %% Styles
    classDef ui fill:#E0F7FA,stroke:#006064,color:#000
    classDef modules fill:#E8F5E9,stroke:#1B5E20,color:#000
    classDef external fill:#FFF3E0,stroke:#E65100,color:#000
    classDef config fill:#ECEFF1,stroke:#607D8B,color:#000
```
