# muhammed-bilal777/analytics-dashboard architecture

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

- Interactive diagram: https://gitdiagram.com/muhammed-bilal777/analytics-dashboard
- Repository: https://github.com/muhammed-bilal777/analytics-dashboard

## Overview

This is a React marketing analytics dashboard. Users view campaign metrics, then search, sort, filter by channel or region, and page through results; the chart reflects the filtered data. DashboardPage coordinates that workflow, while hooks and context provide data and table state, and reusable components render the interface. The README documents broader extensibility and formatting capabilities. Some subsystem links rely on README or SOURCE INDEX references; unsampled implementation details are not inferred.

Main entry points: [`src/pages/DashboardPage.jsx`](https://github.com/muhammed-bilal777/analytics-dashboard/blob/main/src/pages/DashboardPage.jsx) (Dashboard workflow), [`src/hooks/useDashboardData.js`](https://github.com/muhammed-bilal777/analytics-dashboard/blob/main/src/hooks/useDashboardData.js) (Dashboard data hook), [`src/App.jsx`](https://github.com/muhammed-bilal777/analytics-dashboard/blob/main/src/App.jsx) (App entry), [`src/context/DashboardProvider.jsx`](https://github.com/muhammed-bilal777/analytics-dashboard/blob/main/src/context/DashboardProvider.jsx) (Dashboard context)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Dashboard entry"]
  node_app["App entry<br/>[App.jsx]"]
  node_dashboard["Dashboard workflow<br/>[DashboardPage.jsx]"]
end

subgraph group_state["Data and logic"]
  node_provider["Dashboard context"]
  node_reducer["Dashboard reducer<br/>[reducer.js]"]
  node_datahook["Dashboard data hook"]
  node_campaigns["Campaign records<br/>[constantData.js]"]
  node_debounce["Search debounce<br/>[useDebounce.js]"]
  node_sorting["Table sorting<br/>[useTableLogic.js]"]
  node_pagination["Pagination logic<br/>[usePagination.js]"]
end

subgraph group_presentation["Dashboard presentation"]
  node_table["Headless data table<br/>[DataTable.jsx]"]
  node_chart["Conversions chart<br/>[DashboardPage.jsx]"]
  node_loading["Loading skeletons<br/>[PageSkeleton.jsx]"]
end

subgraph group_shared["Shared components"]
  node_controls["Dashboard controls"]
  node_format["Number formatting<br/>[formatNumbers.js]"]
end

node_user(("Dashboard user"))

node_user -->|"opens dashboard"| node_app
node_app -->|"renders"| node_dashboard
node_dashboard -->|"loads data"| node_datahook
node_datahook -->|"reads and dispatches"| node_provider
node_datahook -->|"loads records"| node_campaigns
node_provider -->|"updates state"| node_reducer
node_dashboard -->|"debounces search"| node_debounce
node_dashboard -->|"sorts results"| node_sorting
node_dashboard -->|"pages filtered results"| node_pagination
node_dashboard -->|"renders controls"| node_controls
node_dashboard -->|"renders page rows"| node_table
node_table -->|"formats values"| node_format
node_dashboard -->|"renders filtered data"| node_chart
node_dashboard -->|"shows while loading"| node_loading

click node_app "https://github.com/muhammed-bilal777/analytics-dashboard/blob/main/src/App.jsx"
click node_dashboard "https://github.com/muhammed-bilal777/analytics-dashboard/blob/main/src/pages/DashboardPage.jsx"
click node_provider "https://github.com/muhammed-bilal777/analytics-dashboard/blob/main/src/context/DashboardProvider.jsx"
click node_reducer "https://github.com/muhammed-bilal777/analytics-dashboard/blob/main/src/context/reducer.js"
click node_datahook "https://github.com/muhammed-bilal777/analytics-dashboard/blob/main/src/hooks/useDashboardData.js"
click node_campaigns "https://github.com/muhammed-bilal777/analytics-dashboard/blob/main/src/constants/constantData.js"
click node_debounce "https://github.com/muhammed-bilal777/analytics-dashboard/blob/main/src/hooks/useDebounce.js"
click node_sorting "https://github.com/muhammed-bilal777/analytics-dashboard/blob/main/src/hooks/useTableLogic.js"
click node_pagination "https://github.com/muhammed-bilal777/analytics-dashboard/blob/main/src/hooks/usePagination.js"
click node_table "https://github.com/muhammed-bilal777/analytics-dashboard/blob/main/src/components/headless/DataTable/DataTable.jsx"
click node_chart "https://github.com/muhammed-bilal777/analytics-dashboard/blob/main/src/pages/DashboardPage.jsx"
click node_loading "https://github.com/muhammed-bilal777/analytics-dashboard/blob/main/src/components/skeletons/PageSkeleton.jsx"
click node_controls "https://github.com/muhammed-bilal777/analytics-dashboard/tree/main/src/components/ui"
click node_format "https://github.com/muhammed-bilal777/analytics-dashboard/blob/main/src/utils/formatNumbers.js"

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_app,node_dashboard,node_user toneBlue
class node_provider,node_reducer,node_datahook,node_campaigns,node_debounce,node_sorting,node_pagination toneAmber
class node_table,node_chart,node_loading toneMint
class node_controls,node_format toneRose
```

## Components

### Dashboard entry

- [App entry](https://github.com/muhammed-bilal777/analytics-dashboard/blob/main/src/App.jsx): `src/App.jsx`
- [Dashboard workflow](https://github.com/muhammed-bilal777/analytics-dashboard/blob/main/src/pages/DashboardPage.jsx): `src/pages/DashboardPage.jsx`

### Data and logic

- [Dashboard context](https://github.com/muhammed-bilal777/analytics-dashboard/blob/main/src/context/DashboardProvider.jsx): `src/context/DashboardProvider.jsx`
- [Dashboard reducer](https://github.com/muhammed-bilal777/analytics-dashboard/blob/main/src/context/reducer.js): `src/context/reducer.js`
- [Dashboard data hook](https://github.com/muhammed-bilal777/analytics-dashboard/blob/main/src/hooks/useDashboardData.js): `src/hooks/useDashboardData.js`
- [Campaign records](https://github.com/muhammed-bilal777/analytics-dashboard/blob/main/src/constants/constantData.js): `src/constants/constantData.js`
- [Search debounce](https://github.com/muhammed-bilal777/analytics-dashboard/blob/main/src/hooks/useDebounce.js): `src/hooks/useDebounce.js`
- [Table sorting](https://github.com/muhammed-bilal777/analytics-dashboard/blob/main/src/hooks/useTableLogic.js): `src/hooks/useTableLogic.js`
- [Pagination logic](https://github.com/muhammed-bilal777/analytics-dashboard/blob/main/src/hooks/usePagination.js): `src/hooks/usePagination.js`

### Dashboard presentation

- [Headless data table](https://github.com/muhammed-bilal777/analytics-dashboard/blob/main/src/components/headless/DataTable/DataTable.jsx): `src/components/headless/DataTable/DataTable.jsx`
- [Conversions chart](https://github.com/muhammed-bilal777/analytics-dashboard/blob/main/src/pages/DashboardPage.jsx): `src/pages/DashboardPage.jsx`
- [Loading skeletons](https://github.com/muhammed-bilal777/analytics-dashboard/blob/main/src/components/skeletons/PageSkeleton.jsx): `src/components/skeletons/PageSkeleton.jsx`

### Shared components

- [Dashboard controls](https://github.com/muhammed-bilal777/analytics-dashboard/tree/main/src/components/ui): `src/components/ui`
- [Number formatting](https://github.com/muhammed-bilal777/analytics-dashboard/blob/main/src/utils/formatNumbers.js): `src/utils/formatNumbers.js`

### Other components

- **Dashboard user**

## Connections

- Dashboard user → App entry: opens dashboard (evidence: `README.md`)
- App entry → Dashboard workflow: renders (evidence: `src/App.jsx`)
- Dashboard workflow → Dashboard data hook: loads data (evidence: `src/pages/DashboardPage.jsx`)
- Dashboard data hook → Dashboard context: reads and dispatches (evidence: `src/hooks/useDashboardData.js`)
- Dashboard data hook → Campaign records: loads records (evidence: `src/hooks/useDashboardData.js`)
- Dashboard context → Dashboard reducer: updates state (evidence: `src/context/DashboardProvider.jsx`)
- Dashboard workflow → Search debounce: debounces search (evidence: `src/pages/DashboardPage.jsx`)
- Dashboard workflow → Table sorting: sorts results (evidence: `src/pages/DashboardPage.jsx`)
- Dashboard workflow → Pagination logic: pages filtered results (evidence: `src/pages/DashboardPage.jsx`)
- Dashboard workflow → Dashboard controls: renders controls (evidence: `src/pages/DashboardPage.jsx`)
- Dashboard workflow → Headless data table: renders page rows (evidence: `src/pages/DashboardPage.jsx`)
- Headless data table → Number formatting: formats values (evidence: `src/components/headless/DataTable/DataTable.jsx`)
- Dashboard workflow → Conversions chart: renders filtered data (evidence: `src/pages/DashboardPage.jsx`)
- Dashboard workflow → Loading skeletons: shows while loading (evidence: `src/pages/DashboardPage.jsx`)
