# raffyrojo/logitech-pricelist architecture

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

- Interactive diagram: https://gitdiagram.com/raffyrojo/logitech-pricelist
- Repository: https://github.com/raffyrojo/logitech-pricelist

## Overview

Logitech Pricelist is a single-page catalog for dealers and sales staff, with browser-based administration for maintaining and publishing the catalog. The main public workflow is browse/search and filter products, inspect SKU details and prices, then export the current view. Admin edits a local draft, reviews and publishes it through the configured Worker to GitHub; successful publishes can stamp price-change history. README documents further capabilities implemented in the unsampled index.html, so those are represented at that file without inferred internal call chains. The source excerpts show publishing and user-management requests; public rendering, exports, and most admin interactions are documented but not sampled.

Main entry points: [`index.html`](https://github.com/raffyrojo/logitech-pricelist/blob/main/index.html) (Pricelist App), [`js/publish.js`](https://github.com/raffyrojo/logitech-pricelist/blob/main/js/publish.js) (Publish Workflow), [`data/products.json`](https://github.com/raffyrojo/logitech-pricelist/blob/main/data/products.json) (Product Catalog), [`js/config.js`](https://github.com/raffyrojo/logitech-pricelist/blob/main/js/config.js) (Runtime Config)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_catalog["Public Catalog"]
  node_app["Pricelist App<br/>[index.html]"]
  node_exports["Catalog Exports<br/>[index.html]"]
end

subgraph group_admin["Catalog Admin"]
  node_adminui["Admin Tools<br/>[index.html]"]
  node_draft["Browser Draft<br/>[index.html]"]
  node_history[("Version History<br/>[index.html]")]
  node_users["Publish Accounts<br/>[users.js]"]
  node_pricechanges["Price Changes<br/>[index.html]"]
end

subgraph group_publishing["Publishing"]
  node_publish["Publish Workflow<br/>[publish.js]"]
  node_config["Runtime Config<br/>[config.js]"]
end

subgraph group_content["Catalog Content"]
  node_catalogdata[("Product Catalog<br/>[products.json]")]
  node_categories["Categories<br/>[categories.json]"]
  node_settings["Site Settings<br/>[settings.json]"]
  node_images["Product Images"]
end

node_dealer(("Dealer / Staff"))
node_worker{{"Publish Worker"}}
node_github[("GitHub Repository")]
node_userapi{{"Users API"}}

node_dealer -->|"browses"| node_app
node_app -->|"reads"| node_catalogdata
node_app -->|"filters by"| node_categories
node_app -.->|"uses"| node_settings
node_app -->|"shows"| node_images
node_dealer -->|"requests"| node_exports
node_exports -->|"exports current view"| node_app
node_adminui -->|"edits"| node_draft
node_adminui -->|"saves snapshots"| node_history
node_adminui -->|"reviews"| node_pricechanges
node_adminui -->|"invokes"| node_publish
node_publish -.->|"reads endpoint"| node_config
node_publish -->|"fetches live data"| node_catalogdata
node_publish -->|"posts draft and images"| node_worker
node_worker -->|"commits"| node_github
node_publish -->|"stamps on success"| node_pricechanges
node_users -->|"calls users endpoints"| node_userapi
node_config -->|"configures endpoint"| node_userapi
node_github -->|"serves published data"| node_catalogdata

click node_app "https://github.com/raffyrojo/logitech-pricelist/blob/main/index.html"
click node_catalogdata "https://github.com/raffyrojo/logitech-pricelist/blob/main/data/products.json"
click node_categories "https://github.com/raffyrojo/logitech-pricelist/blob/main/data/categories.json"
click node_settings "https://github.com/raffyrojo/logitech-pricelist/blob/main/data/settings.json"
click node_images "https://github.com/raffyrojo/logitech-pricelist/tree/main/images"
click node_adminui "https://github.com/raffyrojo/logitech-pricelist/blob/main/index.html"
click node_draft "https://github.com/raffyrojo/logitech-pricelist/blob/main/index.html"
click node_history "https://github.com/raffyrojo/logitech-pricelist/blob/main/index.html"
click node_publish "https://github.com/raffyrojo/logitech-pricelist/blob/main/js/publish.js"
click node_config "https://github.com/raffyrojo/logitech-pricelist/blob/main/js/config.js"
click node_users "https://github.com/raffyrojo/logitech-pricelist/blob/main/js/users.js"
click node_exports "https://github.com/raffyrojo/logitech-pricelist/blob/main/index.html"
click node_pricechanges "https://github.com/raffyrojo/logitech-pricelist/blob/main/index.html"

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_exports,node_userapi toneBlue
class node_adminui,node_draft,node_history,node_users,node_pricechanges,node_github toneAmber
class node_publish,node_config toneMint
class node_catalogdata,node_categories,node_settings,node_images,node_worker toneRose
class node_dealer toneIndigo
```

## Components

### Public Catalog

- [Pricelist App](https://github.com/raffyrojo/logitech-pricelist/blob/main/index.html): `index.html`
- [Catalog Exports](https://github.com/raffyrojo/logitech-pricelist/blob/main/index.html): `index.html`

### Catalog Admin

- [Admin Tools](https://github.com/raffyrojo/logitech-pricelist/blob/main/index.html): `index.html`
- [Browser Draft](https://github.com/raffyrojo/logitech-pricelist/blob/main/index.html): `index.html`
- [Version History](https://github.com/raffyrojo/logitech-pricelist/blob/main/index.html): `index.html`
- [Publish Accounts](https://github.com/raffyrojo/logitech-pricelist/blob/main/js/users.js): `js/users.js`
- [Price Changes](https://github.com/raffyrojo/logitech-pricelist/blob/main/index.html): `index.html`

### Publishing

- [Publish Workflow](https://github.com/raffyrojo/logitech-pricelist/blob/main/js/publish.js): `js/publish.js`
- [Runtime Config](https://github.com/raffyrojo/logitech-pricelist/blob/main/js/config.js): `js/config.js`

### Catalog Content

- [Product Catalog](https://github.com/raffyrojo/logitech-pricelist/blob/main/data/products.json): `data/products.json`
- [Categories](https://github.com/raffyrojo/logitech-pricelist/blob/main/data/categories.json): `data/categories.json`
- [Site Settings](https://github.com/raffyrojo/logitech-pricelist/blob/main/data/settings.json): `data/settings.json`
- [Product Images](https://github.com/raffyrojo/logitech-pricelist/tree/main/images): `images`

### Other components

- **Dealer / Staff**
- **Publish Worker**
- **GitHub Repository**
- **Users API**

## Connections

- Dealer / Staff → Pricelist App: browses (evidence: `README.md`)
- Pricelist App → Product Catalog: reads (evidence: `README.md`)
- Pricelist App → Categories: filters by (evidence: `README.md`)
- Pricelist App → Site Settings: uses
- Pricelist App → Product Images: shows (evidence: `README.md`)
- Dealer / Staff → Catalog Exports: requests (evidence: `README.md`)
- Catalog Exports → Pricelist App: exports current view (evidence: `README.md`)
- Admin Tools → Browser Draft: edits (evidence: `README.md`)
- Admin Tools → Version History: saves snapshots (evidence: `README.md`)
- Admin Tools → Price Changes: reviews (evidence: `README.md`)
- Admin Tools → Publish Workflow: invokes (evidence: `js/publish.js`)
- Publish Workflow → Runtime Config: reads endpoint
- Publish Workflow → Product Catalog: fetches live data (evidence: `js/publish.js`)
- Publish Workflow → Publish Worker: posts draft and images (evidence: `js/publish.js`)
- Publish Worker → GitHub Repository: commits (evidence: `README.md`)
- Publish Workflow → Price Changes: stamps on success (evidence: `js/publish.js`)
- Publish Accounts → Users API: calls users endpoints (evidence: `js/users.js`)
- Runtime Config → Users API: configures endpoint (evidence: `js/config.js`)
- GitHub Repository → Product Catalog: serves published data (evidence: `README.md`)
