# kasiapesik/analiza-sprzedazy architecture

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

- Interactive diagram: https://gitdiagram.com/kasiapesik/analiza-sprzedazy
- Repository: https://github.com/kasiapesik/analiza-sprzedazy

## Overview

This small sales-analysis project offers three reports: monthly revenue and top-three products through SQL, plus a monthly revenue chart from a Python script. The chart script reads the CSV, calculates revenue and monthly totals, and saves a chart. The SQL files are named as reports in the README, but their contents were not sampled, so their data flow is not shown.

Main entry points: [`python/wykres.py`](https://github.com/kasiapesik/analiza-sprzedazy/blob/main/python/wykres.py) (Chart script), [`dane/sprzedaz.csv`](https://github.com/kasiapesik/analiza-sprzedazy/blob/main/dane/sprzedaz.csv) (Sales CSV)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_data["Sales data"]
  node_sales_csv["Sales CSV<br/>[sprzedaz.csv]"]
end

subgraph group_sql["SQL reports"]
  node_monthly_sql["Monthly revenue"]
  node_top_sql["Top products<br/>[top_produkty.sql]"]
end

subgraph group_python["Python chart"]
  node_chart_script["Chart script<br/>[wykres.py]"]
  node_chart_file["Revenue chart"]
end

node_chart_script -->|"reads"| node_sales_csv
node_chart_script -->|"saves"| node_chart_file

click node_sales_csv "https://github.com/kasiapesik/analiza-sprzedazy/blob/main/dane/sprzedaz.csv"
click node_monthly_sql "https://github.com/kasiapesik/analiza-sprzedazy/blob/main/sql/sprzedaz_miesiecznie.sql"
click node_top_sql "https://github.com/kasiapesik/analiza-sprzedazy/blob/main/sql/top_produkty.sql"
click node_chart_script "https://github.com/kasiapesik/analiza-sprzedazy/blob/main/python/wykres.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_sales_csv toneBlue
class node_monthly_sql,node_top_sql toneAmber
class node_chart_script,node_chart_file toneMint
```

## Components

### Sales data

- [Sales CSV](https://github.com/kasiapesik/analiza-sprzedazy/blob/main/dane/sprzedaz.csv): `dane/sprzedaz.csv`

### SQL reports

- [Monthly revenue](https://github.com/kasiapesik/analiza-sprzedazy/blob/main/sql/sprzedaz_miesiecznie.sql): `sql/sprzedaz_miesiecznie.sql`
- [Top products](https://github.com/kasiapesik/analiza-sprzedazy/blob/main/sql/top_produkty.sql): `sql/top_produkty.sql`

### Python chart

- [Chart script](https://github.com/kasiapesik/analiza-sprzedazy/blob/main/python/wykres.py): `python/wykres.py`
- **Revenue chart**

## Connections

- Chart script → Sales CSV: reads (evidence: `python/wykres.py`)
- Chart script → Revenue chart: saves (evidence: `python/wykres.py`)
