# reysourcez/reysourcez-website architecture

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

- Interactive diagram: https://gitdiagram.com/reysourcez/reysourcez-website
- Repository: https://github.com/reysourcez/reysourcez-website

## Overview

This repository is a browser-based business-tools portal: users choose a standalone tool, provide inputs, and receive calculations, generated documents, market intelligence, or QR-based ordering features. The main workflow branches by tool rather than forming one shared processing pipeline. Source excerpts support the QR encoder and several Worker integrations; other capabilities are identified from the file tree and handoff/setup documents, so their internal wiring is shown only where documented.

Main entry points: [`index.html`](https://github.com/reysourcez/reysourcez-website/blob/reysourcez-patch-1/index.html) (Tools Portal), [`menu-calculator.html`](https://github.com/reysourcez/reysourcez-website/blob/reysourcez-patch-1/menu-calculator.html) (Menu Calculator), [`menu-calculator.js`](https://github.com/reysourcez/reysourcez-website/blob/reysourcez-patch-1/menu-calculator.js) (Menu Costing), [`market-radar.html`](https://github.com/reysourcez/reysourcez-website/blob/reysourcez-patch-1/market-radar.html) (Market Radar)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_portal["Portal"]
  node_home["Tools Portal<br/>[index.html]"]
end

subgraph group_business["Business Tools"]
  node_menu["Menu Calculator"]
  node_menujs["Menu Costing<br/>[menu-calculator.js]"]
  node_food["Food Worth"]
  node_margin["Margin Analysis"]
  node_costcheck["Cost Structure"]
  node_overhead["Overhead Calculator"]
  node_rental["Rental Calculator"]
  node_printing["Printing Calculator"]
end

subgraph group_intelligence["Market Intelligence"]
  node_market["Market Radar<br/>[market-radar.html]"]
  node_marketjs["Radar Analysis<br/>[market-radar.js]"]
  node_marketworker["Radar Proxy"]
  node_poi["POI Data"]
  node_crypto["Crypto Radar<br/>[crypto-radar.html]"]
  node_cryptoworker["Crypto Data Worker"]
  node_marketdata["Market Data APIs"]
end

subgraph group_documents["AI Documents"]
  node_form["Form Scanner<br/>[form-scanner.html]"]
  node_formworker["Scanner Proxy"]
  node_gemini["Gemini API"]
  node_sop["SOP Creator<br/>[sop-creator.html]"]
  node_sopworker["SOP Proxy"]
  node_iso["ISO-MS Architect"]
  node_isoworker["ISO Assist Worker"]
end

subgraph group_ordering["QR Ordering"]
  node_qr["QR Creator<br/>[qr-creator.html]"]
  node_qrjs["QR Styling<br/>[qr-creator.js]"]
  node_qrengine["QR Encoder"]
  node_listing["QR Listing Creator"]
  node_listingjs["Listing Interface"]
  node_listingworker["Ordering Backend"]
  node_listingdb[("Listing Database")]
end

node_visitor(("Visitor"))

node_visitor -->|"opens"| node_home
node_home -->|"selects tool"| node_menu
node_home -->|"selects tool"| node_food
node_home -->|"selects tool"| node_market
node_home -->|"selects tool"| node_crypto
node_home -->|"selects tool"| node_form
node_home -->|"selects tool"| node_sop
node_home -->|"selects tool"| node_iso
node_home -->|"selects tool"| node_qr
node_home -->|"selects tool"| node_listing
node_menu -->|"runs costing"| node_menujs
node_menujs -.->|"syncs cost"| node_margin
node_market -->|"runs analysis"| node_marketjs
node_marketjs -->|"requests data"| node_marketworker
node_marketworker -->|"queries places"| node_poi
node_crypto -->|"requests data"| node_cryptoworker
node_cryptoworker -->|"fetches data"| node_marketdata
node_form -->|"submits scan"| node_formworker
node_formworker -->|"requests extraction"| node_gemini
node_sop -->|"requests drafting"| node_sopworker
node_sopworker -->|"generates content"| node_gemini
node_iso -.->|"requests assistance"| node_isoworker
node_isoworker -->|"generates suggestions"| node_gemini
node_qr -->|"configures output"| node_qrjs
node_qrjs -->|"encodes text"| node_qrengine
node_listing -->|"runs interface"| node_listingjs
node_listingjs -->|"sends requests"| node_listingworker
node_listingworker -->|"reads and writes"| node_listingdb

click node_home "https://github.com/reysourcez/reysourcez-website/blob/reysourcez-patch-1/index.html"
click node_menu "https://github.com/reysourcez/reysourcez-website/blob/reysourcez-patch-1/menu-calculator.html"
click node_menujs "https://github.com/reysourcez/reysourcez-website/blob/reysourcez-patch-1/menu-calculator.js"
click node_food "https://github.com/reysourcez/reysourcez-website/blob/reysourcez-patch-1/food-worth-calculator.html"
click node_margin "https://github.com/reysourcez/reysourcez-website/blob/reysourcez-patch-1/margin-audit-calculator.js"
click node_costcheck "https://github.com/reysourcez/reysourcez-website/blob/reysourcez-patch-1/cost-structure-checker.html"
click node_overhead "https://github.com/reysourcez/reysourcez-website/blob/reysourcez-patch-1/overhead-manpower-calculator.html"
click node_rental "https://github.com/reysourcez/reysourcez-website/blob/reysourcez-patch-1/rental-calculator.html"
click node_printing "https://github.com/reysourcez/reysourcez-website/blob/reysourcez-patch-1/printing-calculator.html"
click node_market "https://github.com/reysourcez/reysourcez-website/blob/reysourcez-patch-1/market-radar.html"
click node_marketjs "https://github.com/reysourcez/reysourcez-website/blob/reysourcez-patch-1/market-radar.js"
click node_marketworker "https://github.com/reysourcez/reysourcez-website/blob/reysourcez-patch-1/market-radar-proxy-worker.js"
click node_crypto "https://github.com/reysourcez/reysourcez-website/blob/reysourcez-patch-1/crypto-radar.html"
click node_cryptoworker "https://github.com/reysourcez/reysourcez-website/blob/reysourcez-patch-1/crypto-radar-worker.js"
click node_form "https://github.com/reysourcez/reysourcez-website/blob/reysourcez-patch-1/form-scanner.html"
click node_formworker "https://github.com/reysourcez/reysourcez-website/blob/reysourcez-patch-1/form-scanner-proxy-worker.js"
click node_sop "https://github.com/reysourcez/reysourcez-website/blob/reysourcez-patch-1/sop-creator.html"
click node_sopworker "https://github.com/reysourcez/reysourcez-website/blob/reysourcez-patch-1/sop-creator-proxy-worker.js"
click node_iso "https://github.com/reysourcez/reysourcez-website/blob/reysourcez-patch-1/iso-ms-architect.html"
click node_isoworker "https://github.com/reysourcez/reysourcez-website/blob/reysourcez-patch-1/iso-assist-worker.js"
click node_qr "https://github.com/reysourcez/reysourcez-website/blob/reysourcez-patch-1/qr-creator.html"
click node_qrjs "https://github.com/reysourcez/reysourcez-website/blob/reysourcez-patch-1/qr-creator.js"
click node_qrengine "https://github.com/reysourcez/reysourcez-website/blob/reysourcez-patch-1/qr-creator-engine.js"
click node_listing "https://github.com/reysourcez/reysourcez-website/blob/reysourcez-patch-1/qr-listing-creator.html"
click node_listingjs "https://github.com/reysourcez/reysourcez-website/blob/reysourcez-patch-1/qr-listing-creator.js"
click node_listingworker "https://github.com/reysourcez/reysourcez-website/blob/reysourcez-patch-1/qr-listing-creator-worker.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_home toneBlue
class node_menu,node_menujs,node_food,node_margin,node_costcheck,node_overhead,node_rental,node_printing toneAmber
class node_market,node_marketjs,node_marketworker,node_poi,node_crypto,node_cryptoworker,node_marketdata toneMint
class node_form,node_formworker,node_gemini,node_sop,node_sopworker,node_iso,node_isoworker toneRose
class node_qr,node_qrjs,node_qrengine,node_listing,node_listingjs,node_listingworker,node_listingdb,node_visitor toneIndigo
```

## Components

### Portal

- [Tools Portal](https://github.com/reysourcez/reysourcez-website/blob/reysourcez-patch-1/index.html): `index.html`

### Business Tools

- [Menu Calculator](https://github.com/reysourcez/reysourcez-website/blob/reysourcez-patch-1/menu-calculator.html): `menu-calculator.html`
- [Menu Costing](https://github.com/reysourcez/reysourcez-website/blob/reysourcez-patch-1/menu-calculator.js): `menu-calculator.js`
- [Food Worth](https://github.com/reysourcez/reysourcez-website/blob/reysourcez-patch-1/food-worth-calculator.html): `food-worth-calculator.html`
- [Margin Analysis](https://github.com/reysourcez/reysourcez-website/blob/reysourcez-patch-1/margin-audit-calculator.js): `margin-audit-calculator.js`
- [Cost Structure](https://github.com/reysourcez/reysourcez-website/blob/reysourcez-patch-1/cost-structure-checker.html): `cost-structure-checker.html`
- [Overhead Calculator](https://github.com/reysourcez/reysourcez-website/blob/reysourcez-patch-1/overhead-manpower-calculator.html): `overhead-manpower-calculator.html`
- [Rental Calculator](https://github.com/reysourcez/reysourcez-website/blob/reysourcez-patch-1/rental-calculator.html): `rental-calculator.html`
- [Printing Calculator](https://github.com/reysourcez/reysourcez-website/blob/reysourcez-patch-1/printing-calculator.html): `printing-calculator.html`

### Market Intelligence

- [Market Radar](https://github.com/reysourcez/reysourcez-website/blob/reysourcez-patch-1/market-radar.html): `market-radar.html`
- [Radar Analysis](https://github.com/reysourcez/reysourcez-website/blob/reysourcez-patch-1/market-radar.js): `market-radar.js`
- [Radar Proxy](https://github.com/reysourcez/reysourcez-website/blob/reysourcez-patch-1/market-radar-proxy-worker.js): `market-radar-proxy-worker.js`
- **POI Data**
- [Crypto Radar](https://github.com/reysourcez/reysourcez-website/blob/reysourcez-patch-1/crypto-radar.html): `crypto-radar.html`
- [Crypto Data Worker](https://github.com/reysourcez/reysourcez-website/blob/reysourcez-patch-1/crypto-radar-worker.js): `crypto-radar-worker.js`
- **Market Data APIs**

### AI Documents

- [Form Scanner](https://github.com/reysourcez/reysourcez-website/blob/reysourcez-patch-1/form-scanner.html): `form-scanner.html`
- [Scanner Proxy](https://github.com/reysourcez/reysourcez-website/blob/reysourcez-patch-1/form-scanner-proxy-worker.js): `form-scanner-proxy-worker.js`
- **Gemini API**
- [SOP Creator](https://github.com/reysourcez/reysourcez-website/blob/reysourcez-patch-1/sop-creator.html): `sop-creator.html`
- [SOP Proxy](https://github.com/reysourcez/reysourcez-website/blob/reysourcez-patch-1/sop-creator-proxy-worker.js): `sop-creator-proxy-worker.js`
- [ISO-MS Architect](https://github.com/reysourcez/reysourcez-website/blob/reysourcez-patch-1/iso-ms-architect.html): `iso-ms-architect.html`
- [ISO Assist Worker](https://github.com/reysourcez/reysourcez-website/blob/reysourcez-patch-1/iso-assist-worker.js): `iso-assist-worker.js`

### QR Ordering

- [QR Creator](https://github.com/reysourcez/reysourcez-website/blob/reysourcez-patch-1/qr-creator.html): `qr-creator.html`
- [QR Styling](https://github.com/reysourcez/reysourcez-website/blob/reysourcez-patch-1/qr-creator.js): `qr-creator.js`
- [QR Encoder](https://github.com/reysourcez/reysourcez-website/blob/reysourcez-patch-1/qr-creator-engine.js): `qr-creator-engine.js`
- [QR Listing Creator](https://github.com/reysourcez/reysourcez-website/blob/reysourcez-patch-1/qr-listing-creator.html): `qr-listing-creator.html`
- [Listing Interface](https://github.com/reysourcez/reysourcez-website/blob/reysourcez-patch-1/qr-listing-creator.js): `qr-listing-creator.js`
- [Ordering Backend](https://github.com/reysourcez/reysourcez-website/blob/reysourcez-patch-1/qr-listing-creator-worker.js): `qr-listing-creator-worker.js`
- **Listing Database**

### Other components

- **Visitor**

## Connections

- Visitor → Tools Portal: opens
- Tools Portal → Menu Calculator: selects tool
- Tools Portal → Food Worth: selects tool
- Tools Portal → Market Radar: selects tool
- Tools Portal → Crypto Radar: selects tool
- Tools Portal → Form Scanner: selects tool
- Tools Portal → SOP Creator: selects tool
- Tools Portal → ISO-MS Architect: selects tool
- Tools Portal → QR Creator: selects tool
- Tools Portal → QR Listing Creator: selects tool
- Menu Calculator → Menu Costing: runs costing
- Menu Costing → Margin Analysis: syncs cost
- Market Radar → Radar Analysis: runs analysis
- Radar Analysis → Radar Proxy: requests data
- Radar Proxy → POI Data: queries places
- Crypto Radar → Crypto Data Worker: requests data
- Crypto Data Worker → Market Data APIs: fetches data
- Form Scanner → Scanner Proxy: submits scan
- Scanner Proxy → Gemini API: requests extraction
- SOP Creator → SOP Proxy: requests drafting
- SOP Proxy → Gemini API: generates content
- ISO-MS Architect → ISO Assist Worker: requests assistance
- ISO Assist Worker → Gemini API: generates suggestions
- QR Creator → QR Styling: configures output
- QR Styling → QR Encoder: encodes text
- QR Listing Creator → Listing Interface: runs interface
- Listing Interface → Ordering Backend: sends requests
- Ordering Backend → Listing Database: reads and writes
