# iamrahulbisht21-commits/crypto_analysis architecture

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

- Interactive diagram: https://gitdiagram.com/iamrahulbisht21-commits/crypto_analysis
- Repository: https://github.com/iamrahulbisht21-commits/crypto_analysis

## Overview

##### Project Type & Purpose
- This is a technical data analytics/ETL pipeline, not a traditional full-stack app.
- Purpose: extract cryptocurrency market data (BTC & ETH), process and enrich it, store it, then run SQL analyses to generate business insights.

##### File Structure
- crypto_codefile.ipynb: Jupyter notebook that orchestrates Extraction & Processing.
- crypto_ready.csv: output of the processing step – the clean, feature-engineered dataset.
- crypto_direct.sql: predefined SQL queries for analytical execution against the stored data.
- README.md: describes the workflow and tools; no dedicated “src” folders or microservices.

a. Data Source
- yFinance API (external service)
b. Extraction & Processing Layer
- Python/Jupyter Notebook module (crypto_codefile.ipynb)
- Pandas for cleaning, normalization, feature engineering
c. Staging Artifact
- Flat file store: crypto_ready.csv
d. Storage & Analysis Layer
- MySQL database holding the “crypto_ready” table
- Analytical Engine: SQL queries in crypto_direct.sql
e. Consumer / Output
- Result sets or visualizations (could be notebooks, CSV exports, dashboards)

##### Architectural Patterns & Design Principles
- ETL Pipeline: clear separation of Extraction, Transformation, Load, and Analysis.
- Layered design: External Service → Compute → Storage → Analytics.

##### Technologies & Frameworks to Call Out
- Python (with pandas, yfinance) for ETL
- Jupyter Notebook as orchestrator for reproducibility
- CSV as intermediate staging
- MySQL for persistent storage and advanced querying
- SQL (window functions, CTEs) for deep analytics

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% External Service
    yFinanceAPI["yFinance API"]:::external

    %% ETL Pipeline
    subgraph "ETL Pipeline"
        ExtractionNotebook["Extraction & Processing Notebook"]:::compute
        StagingCSV["crypto_ready.csv"]:::storage
        MySQLDB["MySQL Database\n(crypto_ready table)"]:::storage
    end

    %% Analytics Layer
    subgraph "Analytics Layer"
        SQLScripts["Analytical Engine\n(crypto_direct.sql)"]:::analytics
        Output["Results / Visualizations"]:::compute
    end

    %% Documentation
    subgraph "Project Documents"
        README["README.md"]:::docs
        LICENSE["LICENSE"]:::docs
    end

    %% Data Flow
    yFinanceAPI -->|"fetch"| ExtractionNotebook
    ExtractionNotebook -->|"transform & export"| StagingCSV
    StagingCSV -->|"load"| MySQLDB
    %% Optional direct load
    ExtractionNotebook -.->|"direct load"| MySQLDB
    MySQLDB -->|"query"| SQLScripts
    SQLScripts -->|"generate reports"| Output

    %% Click Events
    click ExtractionNotebook "https://github.com/iamrahulbisht21-commits/crypto_analysis/blob/main/crypto_codefile.ipynb"
    click StagingCSV "https://github.com/iamrahulbisht21-commits/crypto_analysis/blob/main/crypto_ready.csv"
    click SQLScripts "https://github.com/iamrahulbisht21-commits/crypto_analysis/blob/main/crypto_direct.sql"
    click README "https://github.com/iamrahulbisht21-commits/crypto_analysis/blob/main/README.md"
    click LICENSE "https://github.com/iamrahulbisht21-commits/crypto_analysis/tree/main/LICENSE"

    %% Styles
    classDef external fill:#CFE2F3,stroke:#0366d6,color:#0366d6
    classDef compute fill:#D9EAD3,stroke:#6AA84F,color:#274E13
    classDef storage fill:#FCE5CD,stroke:#E69138,color:#974F0C
    classDef analytics fill:#EAD1DC,stroke:#A64D79,color:#5C1132
    classDef docs fill:#D9D2E9,stroke:#8E7CC3,color:#4B286D
```
