# ayoadenuga/customer-sales-analytics architecture

> Architecture diagram of the GitHub repository ayoadenuga/customer-sales-analytics, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-04). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ayoadenuga/customer-sales-analytics
- Repository: https://github.com/ayoadenuga/customer-sales-analytics

## Overview

This repository is a customer-sales analytics project: raw CSV data is prepared and analyzed in SQL, customer segmentation is produced, and a Power BI model and interactive dashboard present the results for business insights. The README documents this workflow and the dashboard’s KPI, customer, product, geographic, and trend capabilities. The tree contains one SQL file and one Power BI file, so those capabilities are represented at those existing paths; no source excerpts were available to verify finer-grained implementation details.

Main entry points: [`sql/01_analysis.sql`](https://github.com/ayoadenuga/customer-sales-analytics/blob/main/sql/01_analysis.sql) (Sales analysis), [`powerbi/Customers-Sales-Analytics.pbix`](https://github.com/ayoadenuga/customer-sales-analytics/blob/main/powerbi/Customers-Sales-Analytics.pbix) (Power BI model), [`data/analytics_project_raw_data.csv`](https://github.com/ayoadenuga/customer-sales-analytics/blob/main/data/analytics_project_raw_data.csv) (Raw sales data)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_data["Data preparation"]
  node_source_data[("Raw sales data")]
  node_data_prep["Clean and validate<br/>[01_analysis.sql]"]
end

subgraph group_analysis["Sales analysis"]
  node_sales_analysis["Sales analysis<br/>[01_analysis.sql]"]
  node_customer_segmentation["Customer segmentation<br/>[01_analysis.sql]"]
  node_sales_dimensions["Sales dimensions<br/>[01_analysis.sql]"]
end

subgraph group_reporting["Power BI reporting"]
  node_powerbi_model["Power BI model"]
  node_interactive_dashboard["Interactive dashboard"]
  node_business_insights["Business insights"]
end

node_business_user(("Business user"))

node_source_data -->|"prepares"| node_data_prep
node_data_prep -->|"feeds"| node_sales_analysis
node_sales_analysis -->|"segments customers"| node_customer_segmentation
node_sales_analysis -->|"analyzes dimensions"| node_sales_dimensions
node_customer_segmentation -->|"feeds model"| node_powerbi_model
node_sales_dimensions -->|"feeds model"| node_powerbi_model
node_powerbi_model -->|"supports"| node_interactive_dashboard
node_interactive_dashboard -->|"surfaces"| node_business_insights
node_business_user -->|"explores"| node_interactive_dashboard

click node_source_data "https://github.com/ayoadenuga/customer-sales-analytics/blob/main/data/analytics_project_raw_data.csv"
click node_data_prep "https://github.com/ayoadenuga/customer-sales-analytics/blob/main/sql/01_analysis.sql"
click node_sales_analysis "https://github.com/ayoadenuga/customer-sales-analytics/blob/main/sql/01_analysis.sql"
click node_customer_segmentation "https://github.com/ayoadenuga/customer-sales-analytics/blob/main/sql/01_analysis.sql"
click node_sales_dimensions "https://github.com/ayoadenuga/customer-sales-analytics/blob/main/sql/01_analysis.sql"
click node_powerbi_model "https://github.com/ayoadenuga/customer-sales-analytics/blob/main/powerbi/Customers-Sales-Analytics.pbix"
click node_interactive_dashboard "https://github.com/ayoadenuga/customer-sales-analytics/blob/main/powerbi/Customers-Sales-Analytics.pbix"
click node_business_insights "https://github.com/ayoadenuga/customer-sales-analytics/blob/main/powerbi/Customers-Sales-Analytics.pbix"

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_source_data,node_data_prep,node_business_user toneBlue
class node_sales_analysis,node_customer_segmentation,node_sales_dimensions toneAmber
class node_powerbi_model,node_interactive_dashboard,node_business_insights toneMint
```

## Components

### Data preparation

- [Raw sales data](https://github.com/ayoadenuga/customer-sales-analytics/blob/main/data/analytics_project_raw_data.csv): `data/analytics_project_raw_data.csv`
- [Clean and validate](https://github.com/ayoadenuga/customer-sales-analytics/blob/main/sql/01_analysis.sql): `sql/01_analysis.sql`

### Sales analysis

- [Sales analysis](https://github.com/ayoadenuga/customer-sales-analytics/blob/main/sql/01_analysis.sql): `sql/01_analysis.sql`
- [Customer segmentation](https://github.com/ayoadenuga/customer-sales-analytics/blob/main/sql/01_analysis.sql): `sql/01_analysis.sql`
- [Sales dimensions](https://github.com/ayoadenuga/customer-sales-analytics/blob/main/sql/01_analysis.sql): `sql/01_analysis.sql`

### Power BI reporting

- [Power BI model](https://github.com/ayoadenuga/customer-sales-analytics/blob/main/powerbi/Customers-Sales-Analytics.pbix): `powerbi/Customers-Sales-Analytics.pbix`
- [Interactive dashboard](https://github.com/ayoadenuga/customer-sales-analytics/blob/main/powerbi/Customers-Sales-Analytics.pbix): `powerbi/Customers-Sales-Analytics.pbix`
- [Business insights](https://github.com/ayoadenuga/customer-sales-analytics/blob/main/powerbi/Customers-Sales-Analytics.pbix): `powerbi/Customers-Sales-Analytics.pbix`

### Other components

- **Business user**

## Connections

- Raw sales data → Clean and validate: prepares (evidence: `README.md`)
- Clean and validate → Sales analysis: feeds (evidence: `README.md`)
- Sales analysis → Customer segmentation: segments customers (evidence: `README.md`)
- Sales analysis → Sales dimensions: analyzes dimensions (evidence: `README.md`)
- Customer segmentation → Power BI model: feeds model (evidence: `README.md`)
- Sales dimensions → Power BI model: feeds model (evidence: `README.md`)
- Power BI model → Interactive dashboard: supports (evidence: `README.md`)
- Interactive dashboard → Business insights: surfaces (evidence: `README.md`)
- Business user → Interactive dashboard: explores (evidence: `README.md`)
