# kumarprashant1408/thickness-dashboard architecture

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

- Interactive diagram: https://gitdiagram.com/kumarprashant1408/thickness-dashboard
- Repository: https://github.com/kumarprashant1408/thickness-dashboard

## Overview

This repository appears to be a static, offline-capable operations dashboard backed by CSV and JSON data. The likely user workflow is to open the app, view operational datasets, and—when run separately—derive monthly belt consumption from Daily Report entries and SBC totals. The service worker documents network-first fetching with cached fallbacks; the sampled Python tool documents the consumption stages. The README is empty and the app HTML was not sampled, so dashboard interactions and links between the UI and datasets are not verified.

Main entry points: [`sw.js`](https://github.com/kumarprashant1408/thickness-dashboard/blob/main/sw.js) (Offline fetch worker), [`tools/consumption.py`](https://github.com/kumarprashant1408/thickness-dashboard/blob/main/tools/consumption.py) (Consumption processor), [`index.html`](https://github.com/kumarprashant1408/thickness-dashboard/blob/main/index.html) (App shell), [`daily.csv`](https://github.com/kumarprashant1408/thickness-dashboard/blob/main/daily.csv) (Daily report)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Dashboard App"]
  node_shell["App shell<br/>[index.html]"]
  node_worker["Offline fetch worker<br/>[sw.js]"]
  node_manifest["App manifest<br/>[manifest.json]"]
end

subgraph group_data["Operational Data"]
  node_general["General data<br/>[data.csv]"]
  node_assetdata["Asset records<br/>[abn.csv]"]
  node_planning["Planning data<br/>[abp.csv]"]
  node_planningmaster["Planning master<br/>[abp_master.csv]"]
  node_planningoverrides["Planning overrides<br/>[abp_overrides.csv]"]
  node_daily["Daily report<br/>[daily.csv]"]
  node_patching["Patching records<br/>[patching.csv]"]
  node_sbc["SBC totals<br/>[sbc.csv]"]
  node_sbcbase["SBC month base<br/>[sbc_month_base.csv]"]
  node_sbcmonthly["Monthly consumption<br/>[sbc_monthly.csv]"]
  node_umc["UMC records<br/>[umc.csv]"]
  node_umcf["UMCF records<br/>[umcf.csv]"]
  node_cost["Actual costs<br/>[cost_actual.csv]"]
  node_belt["Belt analysis<br/>[belt_analysis.csv]"]
  node_stock["Stock records<br/>[stock.csv]"]
  node_stocknotes["Stock notes<br/>[stock_notes.json]"]
end

subgraph group_consumption["Consumption Processing"]
  node_consumption["Consumption processor<br/>[consumption.py]"]
  node_log[("Consumption event log")]
end

node_user(("Dashboard user"))

node_user -.->|"opens"| node_shell
node_worker -->|"network-first fetch"| node_shell
node_worker -->|"fetches and caches"| node_general
node_worker -->|"fetches and caches"| node_assetdata
node_worker -->|"fetches and caches"| node_planning
node_worker -->|"fetches and caches"| node_planningmaster
node_worker -->|"fetches and caches"| node_planningoverrides
node_worker -->|"fetches and caches"| node_daily
node_worker -->|"fetches and caches"| node_patching
node_worker -->|"fetches and caches"| node_sbc
node_worker -->|"fetches and caches"| node_sbcmonthly
node_worker -->|"fetches and caches"| node_umc
node_worker -->|"fetches and caches"| node_umcf
node_worker -->|"fetches and caches"| node_cost
node_worker -->|"fetches and caches"| node_belt
node_worker -->|"fetches and caches"| node_stock
node_worker -->|"fetches and caches"| node_stocknotes
node_worker -->|"cache-first asset"| node_manifest
node_consumption -->|"reads events"| node_daily
node_consumption -->|"updates log"| node_log
node_consumption -->|"reads totals"| node_sbc
node_consumption -->|"reads events"| node_log
node_consumption -->|"reads fallback months"| node_sbcbase
node_consumption -->|"writes monthly totals"| node_sbcmonthly

click node_shell "https://github.com/kumarprashant1408/thickness-dashboard/blob/main/index.html"
click node_worker "https://github.com/kumarprashant1408/thickness-dashboard/blob/main/sw.js"
click node_manifest "https://github.com/kumarprashant1408/thickness-dashboard/blob/main/manifest.json"
click node_general "https://github.com/kumarprashant1408/thickness-dashboard/blob/main/data.csv"
click node_assetdata "https://github.com/kumarprashant1408/thickness-dashboard/blob/main/abn.csv"
click node_planning "https://github.com/kumarprashant1408/thickness-dashboard/blob/main/abp.csv"
click node_planningmaster "https://github.com/kumarprashant1408/thickness-dashboard/blob/main/abp_master.csv"
click node_planningoverrides "https://github.com/kumarprashant1408/thickness-dashboard/blob/main/abp_overrides.csv"
click node_daily "https://github.com/kumarprashant1408/thickness-dashboard/blob/main/daily.csv"
click node_patching "https://github.com/kumarprashant1408/thickness-dashboard/blob/main/patching.csv"
click node_sbc "https://github.com/kumarprashant1408/thickness-dashboard/blob/main/sbc.csv"
click node_sbcbase "https://github.com/kumarprashant1408/thickness-dashboard/blob/main/sbc_month_base.csv"
click node_sbcmonthly "https://github.com/kumarprashant1408/thickness-dashboard/blob/main/sbc_monthly.csv"
click node_umc "https://github.com/kumarprashant1408/thickness-dashboard/blob/main/umc.csv"
click node_umcf "https://github.com/kumarprashant1408/thickness-dashboard/blob/main/umcf.csv"
click node_cost "https://github.com/kumarprashant1408/thickness-dashboard/blob/main/cost_actual.csv"
click node_belt "https://github.com/kumarprashant1408/thickness-dashboard/blob/main/belt_analysis.csv"
click node_stock "https://github.com/kumarprashant1408/thickness-dashboard/blob/main/stock.csv"
click node_stocknotes "https://github.com/kumarprashant1408/thickness-dashboard/blob/main/stock_notes.json"
click node_consumption "https://github.com/kumarprashant1408/thickness-dashboard/blob/main/tools/consumption.py"
click node_log "https://github.com/kumarprashant1408/thickness-dashboard/blob/main/consumption_log.csv"

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_shell,node_worker,node_manifest,node_user toneBlue
class node_general,node_assetdata,node_planning,node_planningmaster,node_planningoverrides,node_daily,node_patching,node_sbc,node_sbcbase,node_sbcmonthly,node_umc,node_umcf,node_cost,node_belt,node_stock,node_stocknotes toneAmber
class node_consumption,node_log toneMint
```

## Components

### Dashboard App

- [App shell](https://github.com/kumarprashant1408/thickness-dashboard/blob/main/index.html): `index.html`
- [Offline fetch worker](https://github.com/kumarprashant1408/thickness-dashboard/blob/main/sw.js): `sw.js`
- [App manifest](https://github.com/kumarprashant1408/thickness-dashboard/blob/main/manifest.json): `manifest.json`

### Operational Data

- [General data](https://github.com/kumarprashant1408/thickness-dashboard/blob/main/data.csv): `data.csv`
- [Asset records](https://github.com/kumarprashant1408/thickness-dashboard/blob/main/abn.csv): `abn.csv`
- [Planning data](https://github.com/kumarprashant1408/thickness-dashboard/blob/main/abp.csv): `abp.csv`
- [Planning master](https://github.com/kumarprashant1408/thickness-dashboard/blob/main/abp_master.csv): `abp_master.csv`
- [Planning overrides](https://github.com/kumarprashant1408/thickness-dashboard/blob/main/abp_overrides.csv): `abp_overrides.csv`
- [Daily report](https://github.com/kumarprashant1408/thickness-dashboard/blob/main/daily.csv): `daily.csv`
- [Patching records](https://github.com/kumarprashant1408/thickness-dashboard/blob/main/patching.csv): `patching.csv`
- [SBC totals](https://github.com/kumarprashant1408/thickness-dashboard/blob/main/sbc.csv): `sbc.csv`
- [SBC month base](https://github.com/kumarprashant1408/thickness-dashboard/blob/main/sbc_month_base.csv): `sbc_month_base.csv`
- [Monthly consumption](https://github.com/kumarprashant1408/thickness-dashboard/blob/main/sbc_monthly.csv): `sbc_monthly.csv`
- [UMC records](https://github.com/kumarprashant1408/thickness-dashboard/blob/main/umc.csv): `umc.csv`
- [UMCF records](https://github.com/kumarprashant1408/thickness-dashboard/blob/main/umcf.csv): `umcf.csv`
- [Actual costs](https://github.com/kumarprashant1408/thickness-dashboard/blob/main/cost_actual.csv): `cost_actual.csv`
- [Belt analysis](https://github.com/kumarprashant1408/thickness-dashboard/blob/main/belt_analysis.csv): `belt_analysis.csv`
- [Stock records](https://github.com/kumarprashant1408/thickness-dashboard/blob/main/stock.csv): `stock.csv`
- [Stock notes](https://github.com/kumarprashant1408/thickness-dashboard/blob/main/stock_notes.json): `stock_notes.json`

### Consumption Processing

- [Consumption processor](https://github.com/kumarprashant1408/thickness-dashboard/blob/main/tools/consumption.py): `tools/consumption.py`
- [Consumption event log](https://github.com/kumarprashant1408/thickness-dashboard/blob/main/consumption_log.csv): `consumption_log.csv`

### Other components

- **Dashboard user**

## Connections

- Dashboard user → App shell: opens
- Offline fetch worker → App shell: network-first fetch (evidence: `sw.js`)
- Offline fetch worker → General data: fetches and caches (evidence: `sw.js`)
- Offline fetch worker → Asset records: fetches and caches (evidence: `sw.js`)
- Offline fetch worker → Planning data: fetches and caches (evidence: `sw.js`)
- Offline fetch worker → Planning master: fetches and caches (evidence: `sw.js`)
- Offline fetch worker → Planning overrides: fetches and caches (evidence: `sw.js`)
- Offline fetch worker → Daily report: fetches and caches (evidence: `sw.js`)
- Offline fetch worker → Patching records: fetches and caches (evidence: `sw.js`)
- Offline fetch worker → SBC totals: fetches and caches (evidence: `sw.js`)
- Offline fetch worker → Monthly consumption: fetches and caches (evidence: `sw.js`)
- Offline fetch worker → UMC records: fetches and caches (evidence: `sw.js`)
- Offline fetch worker → UMCF records: fetches and caches (evidence: `sw.js`)
- Offline fetch worker → Actual costs: fetches and caches (evidence: `sw.js`)
- Offline fetch worker → Belt analysis: fetches and caches (evidence: `sw.js`)
- Offline fetch worker → Stock records: fetches and caches (evidence: `sw.js`)
- Offline fetch worker → Stock notes: fetches and caches (evidence: `sw.js`)
- Offline fetch worker → App manifest: cache-first asset (evidence: `sw.js`)
- Consumption processor → Daily report: reads events (evidence: `tools/consumption.py`)
- Consumption processor → Consumption event log: updates log (evidence: `tools/consumption.py`)
- Consumption processor → SBC totals: reads totals (evidence: `tools/consumption.py`)
- Consumption processor → Consumption event log: reads events (evidence: `tools/consumption.py`)
- Consumption processor → SBC month base: reads fallback months (evidence: `tools/consumption.py`)
- Consumption processor → Monthly consumption: writes monthly totals (evidence: `tools/consumption.py`)
