# rhode-dev/opr-dash architecture

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

- Interactive diagram: https://gitdiagram.com/rhode-dev/opr-dash
- Repository: https://github.com/rhode-dev/opr-dash

## Overview

Opr-dash is described only as a “Stowage operations dash.” The available evidence shows a service worker that precaches a shell, removes older caches, and serves GET requests cache-first for assets and network-first for navigations. The HTML files are present, but their contents and relationship to the worker are not shown; the worker names a shell HTML file that is absent from the supplied tree. The product’s operational workflow and UI capabilities therefore cannot be established from these excerpts.

Main entry points: [`sw.js`](https://github.com/rhode-dev/opr-dash/blob/main/sw.js) (Service worker), [`manifest.webmanifest`](https://github.com/rhode-dev/opr-dash/blob/main/manifest.webmanifest) (Web manifest)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Dashboard UI"]
  node_index["Dashboard entry<br/>[index.html]"]
  node_enhanced["Enhanced dashboard"]
end

subgraph group_offline["Offline runtime"]
  node_worker["Service worker<br/>[sw.js]"]
  node_manifest["Web manifest"]
  node_cache[("Cache storage")]
end

node_browser(("Browser"))
node_network(("Network"))

node_browser -->|"dispatches events"| node_worker
node_worker -->|"reads and writes"| node_cache
node_worker -->|"fetches requests"| node_network
node_worker -->|"precaches"| node_manifest

click node_index "https://github.com/rhode-dev/opr-dash/blob/main/index.html"
click node_enhanced "https://github.com/rhode-dev/opr-dash/blob/main/gerrit_enhanced.html"
click node_worker "https://github.com/rhode-dev/opr-dash/blob/main/sw.js"
click node_manifest "https://github.com/rhode-dev/opr-dash/blob/main/manifest.webmanifest"

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_index,node_enhanced,node_browser toneBlue
class node_worker,node_manifest,node_cache toneAmber
class node_network toneIndigo
```

## Components

### Dashboard UI

- [Dashboard entry](https://github.com/rhode-dev/opr-dash/blob/main/index.html): `index.html`
- [Enhanced dashboard](https://github.com/rhode-dev/opr-dash/blob/main/gerrit_enhanced.html): `gerrit_enhanced.html`

### Offline runtime

- [Service worker](https://github.com/rhode-dev/opr-dash/blob/main/sw.js): `sw.js`
- [Web manifest](https://github.com/rhode-dev/opr-dash/blob/main/manifest.webmanifest): `manifest.webmanifest`
- **Cache storage**

### Other components

- **Browser**
- **Network**

## Connections

- Browser → Service worker: dispatches events (evidence: `sw.js`)
- Service worker → Cache storage: reads and writes (evidence: `sw.js`)
- Service worker → Network: fetches requests (evidence: `sw.js`)
- Service worker → Web manifest: precaches (evidence: `sw.js`)
