# garvitkh07/sales-analytics-dashboard architecture

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

- Interactive diagram: https://gitdiagram.com/garvitkh07/sales-analytics-dashboard
- Repository: https://github.com/garvitkh07/sales-analytics-dashboard

## Overview

This is a React sales-analytics dashboard. The user opens the app, selects a date, and views sales metrics and visualizations; the dashboard requests date-specific data from Supabase. The sampled UI also shows monthly reporting and profile settings. Several UI details and the exact request-triggering code were omitted, so the graph keeps the interface as one component rather than inferring internal call paths.

Main entry points: [`src/main.tsx`](https://github.com/garvitkh07/sales-analytics-dashboard/blob/main/src/main.tsx) (React entry), [`src/App.tsx`](https://github.com/garvitkh07/sales-analytics-dashboard/blob/main/src/App.tsx) (Dashboard interface), [`src/services/salesApi.ts`](https://github.com/garvitkh07/sales-analytics-dashboard/blob/main/src/services/salesApi.ts) (Sales API client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Application entry"]
  node_entry["React entry<br/>[main.tsx]"]
end

subgraph group_dashboard["Sales analytics"]
  node_ui["Dashboard interface<br/>[App.tsx]"]
end

subgraph group_data["Dashboard data"]
  node_api["Sales API client<br/>[salesApi.ts]"]
  node_supabase[("Supabase RPC")]
end

node_user(("Dashboard user"))

node_user -->|"opens app"| node_entry
node_entry -->|"renders"| node_ui
node_ui -->|"requests dashboard data"| node_api
node_api -->|"POSTs date"| node_supabase

click node_entry "https://github.com/garvitkh07/sales-analytics-dashboard/blob/main/src/main.tsx"
click node_ui "https://github.com/garvitkh07/sales-analytics-dashboard/blob/main/src/App.tsx"
click node_api "https://github.com/garvitkh07/sales-analytics-dashboard/blob/main/src/services/salesApi.ts"

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_entry,node_user toneBlue
class node_ui toneAmber
class node_api,node_supabase toneMint
```

## Components

### Application entry

- [React entry](https://github.com/garvitkh07/sales-analytics-dashboard/blob/main/src/main.tsx): `src/main.tsx`

### Sales analytics

- [Dashboard interface](https://github.com/garvitkh07/sales-analytics-dashboard/blob/main/src/App.tsx): `src/App.tsx`

### Dashboard data

- [Sales API client](https://github.com/garvitkh07/sales-analytics-dashboard/blob/main/src/services/salesApi.ts): `src/services/salesApi.ts`
- **Supabase RPC**

### Other components

- **Dashboard user**

## Connections

- Dashboard user → React entry: opens app
- React entry → Dashboard interface: renders (evidence: `src/main.tsx`)
- Dashboard interface → Sales API client: requests dashboard data (evidence: `src/App.tsx`)
- Sales API client → Supabase RPC: POSTs date (evidence: `src/services/salesApi.ts`)
