# ramaniravi/business_insights_360 architecture

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

- Interactive diagram: https://gitdiagram.com/ramaniravi/business_insights_360
- Repository: https://github.com/ramaniravi/business_insights_360

## Overview

##### Project type and purpose
- This is not a traditional multi-tier web app but an end-to-end Business Intelligence solution built entirely in Power BI Desktop.
- Its purpose is to extract transactional data from a MySQL source, transform and model it into a snowflake schema, calculate key metrics with DAX, and present interactive dashboards for Finance, Sales, Marketing, and Supply Chain stakeholders.

##### Main components of the system
a. Data Source
- MySQL database containing raw sales, forecast, cost, deduction tables
b. ETL / Data Preparation
- Power Query (M language) steps inside Power BI Desktop
- Connection via MySQL connector
c. Data Model
- A Snowflake schema of fact and dimension tables
- Relationships defined in Power BI’s model view
d. Calculation Engine
- DAX measures and calculated columns
- Performance tuning via DAX Studio
e. Report Layer
- Power BI report file (.pbix) with Home, Finance, Sales, Marketing, Supply Chain pages
- Interactive features: bookmarks, slicers, tooltips, conditional formatting
f. DevOps / Version Control
- Git + GitHub LFS for storing the large .pbix
g. End Users
- Business stakeholders interacting via Power BI Desktop or Service

##### Relationships and data flow
- Side connections:
- DAX Studio ←→ Data Model (for performance analysis)
- GitHub LFS ← .pbix + Resources folder (version tracking)

##### Architectural patterns and design principles
- ETL pipeline embedded in the authoring tool (Power Query)
- Semantic layer / Tabular Model with a snowflake schema
- Separation of concerns: data ingestion, modeling, calculation, presentation
- Single monolithic BI artifact (.pbix) that packages everything

##### Putting it all together
- Snowflake schema visually by showing dimension tables branching off a central fact table.
- “Home View” node as the navigation hub linking to each business-area page.
- Finally, annotate any performance-critical steps (e.g., “Optimized with DAX Studio”) to capture design considerations.

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Data Source Layer
    subgraph "Layer 1: Data Sources"
        direction TB
        MySQL[(MySQL<br/>fact & raw tables)]:::dataSource
    end

    %% ETL Layer
    subgraph "Layer 2: ETL & Transformation"
        direction TB
        PQ["Power Query<br/>(M Language)"]:::etl
    end

    %% Semantic / Data Model Layer
    subgraph "Layer 3: Semantic / Data Model"
        direction TB
        subgraph "Snowflake Schema" 
            direction TB
            Fact["Fact Sales (central)"]:::model
            Dim1["Dim Customer"]:::model
            Dim2["Dim Product"]:::model
            Dim3["Dim Date"]:::model
            Dim4["Dim Channel"]:::model
        end
    end

    %% Calculation Engine Layer
    subgraph "Layer 4: Calculation Engine"
        direction TB
        DAX[(DAX Engine<br/>Measures & Columns)]:::calc
    end

    %% Presentation Layer
    subgraph "Layer 5: Presentation / User Interaction"
        direction TB
        subgraph "Power BI Report Pages" 
            direction TB
            Home["Home View"]:::presentation
            Finance["Finance View"]:::presentation
            Sales["Sales View"]:::presentation
            Marketing["Marketing View"]:::presentation
            SupplyChain["Supply Chain View"]:::presentation
        end
    end

    %% DevOps & External Tools
    subgraph "External Tools & Versioning"
        direction TB
        GitHub[("Folder: GitHub LFS")]:::external
        PBIX["BusinessIntelligenceSolution.pbix"]:::presentation
        Resources["Resources/"]:::external
        README["README.md"]:::external
        DAXStudio[(DAX Studio)]:::external
    end

    %% End Users
    subgraph "End Users"
        direction TB
        Users(("Business Stakeholders")):::users
    end

    %% Primary Data Flow
    MySQL -->|"Extract Data"| PQ
    PQ -->|"Load Transformed Tables"| Fact
    PQ --> Fact
    Fact -->|"Define Relationships"| Dim1
    Fact --> Dim2
    Fact --> Dim3
    Fact --> Dim4
    Fact -->|"Query Evaluations"| DAX
    Dim1 --> DAX
    Dim2 --> DAX
    Dim3 --> DAX
    Dim4 --> DAX
    DAX -->|"Metrics Delivered"| Home
    Home --> Finance
    Home --> Sales
    Home --> Marketing
    Home --> SupplyChain
    Finance --> Users
    Sales --> Users
    Marketing --> Users
    SupplyChain --> Users

    %% Side Connections
    DAXStudio -.->|"Performance Analysis"| Fact
    DAXStudio -.-> Fact
    GitHub --> PBIX
    GitHub --> Resources
    PBIX -.->|"Contains Report & Model"| Home

    %% Click Events
    click PBIX "https://github.com/ramaniravi/business_insights_360/blob/main/Resources/BusinessIntelligenceSolution.pbix"
    click Resources "https://github.com/ramaniravi/business_insights_360/tree/main/Resources/"
    click README "https://github.com/ramaniravi/business_insights_360/blob/main/README.md"

    %% Styles
    classDef dataSource fill:#cce5ff,stroke:#004085,color:#004085;
    classDef etl fill:#ffe5b4,stroke:#e69500,color:#e69500;
    classDef model fill:#d4edda,stroke:#155724,color:#155724;
    classDef calc fill:#f3e6ff,stroke:#5e2590,color:#5e2590;
    classDef presentation fill:#f5e6ff,stroke:#9c27b0,color:#9c27b0;
    classDef external fill:#e2e3e5,stroke:#6c757d,color:#6c757d;
    classDef users fill:#fff3cd,stroke:#856404,color:#856404;
```
