# nephwf/rabotanw architecture

> Architecture diagram of the GitHub repository nephwf/rabotanw, 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/nephwf/rabotanw
- Repository: https://github.com/nephwf/rabotanw

## Overview

rabotaNW is a browser-based work-progress tracker. Users enter daily amounts or mark days off, set a monthly norm, and see progress while the month is open or a monthly surplus once all days are closed. The app also supports month navigation, summaries, and PNG export; the README documents import and reset controls. Data remains in the browser, and the service worker caches app assets and serves cached content when network requests fail. The excerpts show app calculations, rendering, and install-prompt handling, but not the full storage or import implementation.

Main entry points: [`app.js`](https://github.com/nephwf/rabotanw/blob/main/app.js) (Tracker interface), [`sw.js`](https://github.com/nephwf/rabotanw/blob/main/sw.js) (Offline worker)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_tracker["Progress tracker"]
  node_app["Tracker interface<br/>[app.js]"]
  node_browserdata[("Browser data")]
  node_export["PNG export<br/>[app.js]"]
end

subgraph group_pwa["Browser app"]
  node_install["App installation<br/>[app.js]"]
  node_worker["Offline worker<br/>[sw.js]"]
  node_cache[("Asset cache")]
end

node_user(("User"))

node_user -->|"records progress"| node_app
node_app -->|"stores data"| node_browserdata
node_user -->|"downloads summary"| node_export
node_app -->|"offers install"| node_install
node_worker -->|"caches assets"| node_cache
node_worker -->|"serves offline"| node_cache

click node_app "https://github.com/nephwf/rabotanw/blob/main/app.js"
click node_export "https://github.com/nephwf/rabotanw/blob/main/app.js"
click node_install "https://github.com/nephwf/rabotanw/blob/main/app.js"
click node_worker "https://github.com/nephwf/rabotanw/blob/main/sw.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_browserdata,node_export,node_user toneBlue
class node_install,node_worker,node_cache toneAmber
```

## Components

### Progress tracker

- [Tracker interface](https://github.com/nephwf/rabotanw/blob/main/app.js): `app.js`
- **Browser data**
- [PNG export](https://github.com/nephwf/rabotanw/blob/main/app.js): `app.js`

### Browser app

- [App installation](https://github.com/nephwf/rabotanw/blob/main/app.js): `app.js`
- [Offline worker](https://github.com/nephwf/rabotanw/blob/main/sw.js): `sw.js`
- **Asset cache**

### Other components

- **User**

## Connections

- User → Tracker interface: records progress (evidence: `README.md`)
- Tracker interface → Browser data: stores data (evidence: `README.md`)
- User → PNG export: downloads summary (evidence: `README.md`)
- Tracker interface → App installation: offers install (evidence: `app.js`)
- Offline worker → Asset cache: caches assets (evidence: `sw.js`)
- Offline worker → Asset cache: serves offline (evidence: `sw.js`)
