# bagobo101/tornst architecture

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

- Interactive diagram: https://gitdiagram.com/bagobo101/tornst
- Repository: https://github.com/bagobo101/tornst

## Overview

The repository appears to be Torn Stock Alerts, but the available evidence only exposes its service-worker behavior; the README is empty and the page sources were not sampled. The graph therefore describes the evidenced web-shell and caching behavior, not the alert-generation workflow or how the service worker is registered.

Main entry points: [`sw.js`](https://github.com/bagobo101/tornst/blob/main/sw.js) (Service worker), [`index.html`](https://github.com/bagobo101/tornst/blob/main/index.html) (App page), [`docs.html`](https://github.com/bagobo101/tornst/blob/main/docs.html) (Docs page), [`manifest.json`](https://github.com/bagobo101/tornst/blob/main/manifest.json) (Web manifest)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_pages["Web pages"]
  node_app_page["App page<br/>[index.html]"]
  node_docs_page["Docs page<br/>[docs.html]"]
end

subgraph group_runtime["Offline runtime"]
  node_service_worker["Service worker<br/>[sw.js]"]
  node_manifest["Web manifest<br/>[manifest.json]"]
  node_cache_storage[("Cache Storage")]
end

node_browser_user(("Browser user"))
node_origin_network(("App-origin network"))

node_browser_user -->|"opens"| node_app_page
node_browser_user -->|"opens"| node_docs_page
node_service_worker -->|"fetches pages"| node_origin_network
node_service_worker -->|"caches pages"| node_cache_storage
node_service_worker -->|"reads cached pages"| node_cache_storage
node_service_worker -->|"fetches assets"| node_origin_network
node_service_worker -->|"caches assets"| node_cache_storage
node_service_worker -->|"reads assets"| node_cache_storage
node_service_worker -->|"pre-caches"| node_manifest

click node_app_page "https://github.com/bagobo101/tornst/blob/main/index.html"
click node_docs_page "https://github.com/bagobo101/tornst/blob/main/docs.html"
click node_service_worker "https://github.com/bagobo101/tornst/blob/main/sw.js"
click node_manifest "https://github.com/bagobo101/tornst/blob/main/manifest.json"

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_page,node_docs_page,node_browser_user toneBlue
class node_service_worker,node_manifest,node_cache_storage toneAmber
class node_origin_network toneIndigo
```

## Components

### Web pages

- [App page](https://github.com/bagobo101/tornst/blob/main/index.html): `index.html`
- [Docs page](https://github.com/bagobo101/tornst/blob/main/docs.html): `docs.html`

### Offline runtime

- [Service worker](https://github.com/bagobo101/tornst/blob/main/sw.js): `sw.js`
- [Web manifest](https://github.com/bagobo101/tornst/blob/main/manifest.json): `manifest.json`
- **Cache Storage**

### Other components

- **Browser user**
- **App-origin network**

## Connections

- Browser user → App page: opens
- Browser user → Docs page: opens
- Service worker → App-origin network: fetches pages (evidence: `sw.js`)
- Service worker → Cache Storage: caches pages (evidence: `sw.js`)
- Service worker → Cache Storage: reads cached pages (evidence: `sw.js`)
- Service worker → App-origin network: fetches assets (evidence: `sw.js`)
- Service worker → Cache Storage: caches assets (evidence: `sw.js`)
- Service worker → Cache Storage: reads assets (evidence: `sw.js`)
- Service worker → Web manifest: pre-caches (evidence: `sw.js`)
