# rickyrodio93/sito_herbalife architecture

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

- Interactive diagram: https://gitdiagram.com/rickyrodio93/sito_herbalife
- Repository: https://github.com/rickyrodio93/sito_herbalife

## Overview

This is a Next.js Herbalife wellness site with a central quote-and-cart configurator for customers and sales roles. The quote workflow captures role, discount level and intended use, presents searchable product tables, calculates prices and displays an order summary; the README also describes WhatsApp order links and MyHerbalife deep links. Other product branches cover wellness/product information, recommendations, recipes, FAQs, business content and a Bioniq product page, plus a Google Wallet pass endpoint. Edges reflect shown calls, SOURCE INDEX references or README claims; unsampled route wiring and integrations are not inferred.

Main entry points: [`src/components/prodottiConsigliati/prodottiConsigliati.jsx`](https://github.com/rickyrodio93/sito_herbalife/blob/main/src/components/prodottiConsigliati/prodottiConsigliati.jsx) (Recommended products), [`src/app/(riccardorodio.com)/page.js`](https://github.com/rickyrodio93/sito_herbalife/blob/main/src/app/(riccardorodio.com)/page.js) (Home page), [`src/components/pagine/preventivoClient.jsx`](https://github.com/rickyrodio93/sito_herbalife/blob/main/src/components/pagine/preventivoClient.jsx) (Quote inputs), [`src/components/tabellaPreventivo/riepilogo.jsx`](https://github.com/rickyrodio93/sito_herbalife/blob/main/src/components/tabellaPreventivo/riepilogo.jsx) (Order summary)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_quote["Quote configurator"]
  node_quoteclient["Quote inputs"]
  node_producttable["Product table<br/>[tabella.jsx]"]
  node_productrow["Product row<br/>[riga.jsx]"]
  node_pricecalc["Price calculation<br/>[calcoloPrezzo.js]"]
  node_taxcalc["Tax calculation"]
  node_summary["Order summary<br/>[riepilogo.jsx]"]
  node_quoteexports["Order links<br/>[modalRiepilogo.jsx]"]
end

subgraph group_catalog["Product discovery"]
  node_catalogdata["Product catalog<br/>[ricette.js]"]
  node_recommendations["Recommended products"]
  node_productcards["Product cards<br/>[cardProdotti.jsx]"]
end

subgraph group_content["Wellness content"]
  node_home["Home page<br/>[page.js]"]
  node_homecontent["Home content sections<br/>[sections.jsx]"]
  node_sectionrender["Section renderer"]
  node_bioniq["Bioniq page<br/>[bionicClient.jsx]"]
  node_faqcontent["FAQ content<br/>[accordionData.jsx]"]
  node_faqview["FAQ accordion<br/>[AccordionItem.jsx]"]
  node_recipes["Recipes<br/>[ricette.js]"]
  node_wellnesspages["Wellness pages<br/>[page.js]"]
end

subgraph group_platform["Site services"]
  node_walletapi["Wallet link API<br/>[route.js]"]
  node_walletgen["Wallet link generator<br/>[googleWallet.js]"]
  node_analytics["Page tracking<br/>[clientLogic.js]"]
end

node_visitor(("Visitor"))
node_csvsource["Recommendations CSV"]
node_googlewallet(("Google Wallet"))
node_gtm(("Google Tag Manager"))

node_visitor -->|"sets quote inputs"| node_quoteclient
node_quoteclient -->|"renders tables"| node_producttable
node_producttable -->|"renders rows"| node_productrow
node_productrow -->|"calculates prices"| node_pricecalc
node_summary -->|"calculates totals"| node_taxcalc
node_quoteclient -->|"displays summary"| node_summary
node_summary -->|"opens order details"| node_quoteexports
node_quoteexports -.->|"links orders"| node_googlewallet
node_quoteexports -.->|"deep-links order"| node_googlewallet
node_home -->|"uses sections"| node_homecontent
node_home -->|"renders sections"| node_sectionrender
node_home -->|"shows products"| node_recommendations
node_recommendations -->|"loads recommendations"| node_csvsource
node_recommendations -->|"renders cards"| node_productcards
node_bioniq -->|"uses product FAQs"| node_faqcontent
node_faqview -->|"displays answers"| node_faqcontent
node_wellnesspages -->|"shows products"| node_recommendations
node_walletapi -->|"generates link"| node_walletgen
node_walletgen -->|"creates save link"| node_googlewallet
node_analytics -->|"pushes pageviews"| node_gtm

click node_quoteclient "https://github.com/rickyrodio93/sito_herbalife/blob/main/src/components/pagine/preventivoClient.jsx"
click node_producttable "https://github.com/rickyrodio93/sito_herbalife/blob/main/src/components/tabellaPreventivo/tabella.jsx"
click node_productrow "https://github.com/rickyrodio93/sito_herbalife/blob/main/src/components/tabellaPreventivo/riga.jsx"
click node_pricecalc "https://github.com/rickyrodio93/sito_herbalife/blob/main/src/components/tabellaPreventivo/calcoloPrezzo.js"
click node_taxcalc "https://github.com/rickyrodio93/sito_herbalife/blob/main/src/components/tabellaPreventivo/calcoloPreventivo.js"
click node_summary "https://github.com/rickyrodio93/sito_herbalife/blob/main/src/components/tabellaPreventivo/riepilogo.jsx"
click node_quoteexports "https://github.com/rickyrodio93/sito_herbalife/blob/main/src/components/tabellaPreventivo/modalRiepilogo/modalRiepilogo.jsx"
click node_catalogdata "https://github.com/rickyrodio93/sito_herbalife/blob/main/src/components/ricette/ricette.js"
click node_recommendations "https://github.com/rickyrodio93/sito_herbalife/blob/main/src/components/prodottiConsigliati/prodottiConsigliati.jsx"
click node_productcards "https://github.com/rickyrodio93/sito_herbalife/blob/main/src/components/cards/cardProdotti.jsx"
click node_home "https://github.com/rickyrodio93/sito_herbalife/blob/main/src/app/(riccardorodio.com)/page.js"
click node_homecontent "https://github.com/rickyrodio93/sito_herbalife/blob/main/src/components/sections.jsx"
click node_sectionrender "https://github.com/rickyrodio93/sito_herbalife/blob/main/src/components/Section/SectionComponent.jsx"
click node_bioniq "https://github.com/rickyrodio93/sito_herbalife/blob/main/src/components/pagine/bionicClient.jsx"
click node_faqcontent "https://github.com/rickyrodio93/sito_herbalife/blob/main/src/components/accordion/accordionData.jsx"
click node_faqview "https://github.com/rickyrodio93/sito_herbalife/blob/main/src/components/accordion/AccordionItem.jsx"
click node_recipes "https://github.com/rickyrodio93/sito_herbalife/blob/main/src/components/ricette/ricette.js"
click node_wellnesspages "https://github.com/rickyrodio93/sito_herbalife/blob/main/src/app/(riccardorodio.com)/controlloPeso/page.js"
click node_walletapi "https://github.com/rickyrodio93/sito_herbalife/blob/main/src/app/(biglietto)/api/wallet-link/route.js"
click node_walletgen "https://github.com/rickyrodio93/sito_herbalife/blob/main/src/lib/googleWallet.js"
click node_analytics "https://github.com/rickyrodio93/sito_herbalife/blob/main/src/components/clientLogic.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_quoteclient,node_producttable,node_productrow,node_pricecalc,node_taxcalc,node_summary,node_quoteexports toneBlue
class node_catalogdata,node_recommendations,node_productcards toneAmber
class node_home,node_homecontent,node_sectionrender,node_bioniq,node_faqcontent,node_faqview,node_recipes,node_wellnesspages toneMint
class node_walletapi,node_walletgen,node_analytics toneRose
class node_visitor,node_csvsource,node_googlewallet,node_gtm toneIndigo
```

## Components

### Quote configurator

- [Quote inputs](https://github.com/rickyrodio93/sito_herbalife/blob/main/src/components/pagine/preventivoClient.jsx): `src/components/pagine/preventivoClient.jsx`
- [Product table](https://github.com/rickyrodio93/sito_herbalife/blob/main/src/components/tabellaPreventivo/tabella.jsx): `src/components/tabellaPreventivo/tabella.jsx`
- [Product row](https://github.com/rickyrodio93/sito_herbalife/blob/main/src/components/tabellaPreventivo/riga.jsx): `src/components/tabellaPreventivo/riga.jsx`
- [Price calculation](https://github.com/rickyrodio93/sito_herbalife/blob/main/src/components/tabellaPreventivo/calcoloPrezzo.js): `src/components/tabellaPreventivo/calcoloPrezzo.js`
- [Tax calculation](https://github.com/rickyrodio93/sito_herbalife/blob/main/src/components/tabellaPreventivo/calcoloPreventivo.js): `src/components/tabellaPreventivo/calcoloPreventivo.js`
- [Order summary](https://github.com/rickyrodio93/sito_herbalife/blob/main/src/components/tabellaPreventivo/riepilogo.jsx): `src/components/tabellaPreventivo/riepilogo.jsx`
- [Order links](https://github.com/rickyrodio93/sito_herbalife/blob/main/src/components/tabellaPreventivo/modalRiepilogo/modalRiepilogo.jsx): `src/components/tabellaPreventivo/modalRiepilogo/modalRiepilogo.jsx`

### Product discovery

- [Product catalog](https://github.com/rickyrodio93/sito_herbalife/blob/main/src/components/ricette/ricette.js): `src/components/ricette/ricette.js`
- [Recommended products](https://github.com/rickyrodio93/sito_herbalife/blob/main/src/components/prodottiConsigliati/prodottiConsigliati.jsx): `src/components/prodottiConsigliati/prodottiConsigliati.jsx`
- [Product cards](https://github.com/rickyrodio93/sito_herbalife/blob/main/src/components/cards/cardProdotti.jsx): `src/components/cards/cardProdotti.jsx`

### Wellness content

- [Home page](https://github.com/rickyrodio93/sito_herbalife/blob/main/src/app/(riccardorodio.com)/page.js): `src/app/(riccardorodio.com)/page.js`
- [Home content sections](https://github.com/rickyrodio93/sito_herbalife/blob/main/src/components/sections.jsx): `src/components/sections.jsx`
- [Section renderer](https://github.com/rickyrodio93/sito_herbalife/blob/main/src/components/Section/SectionComponent.jsx): `src/components/Section/SectionComponent.jsx`
- [Bioniq page](https://github.com/rickyrodio93/sito_herbalife/blob/main/src/components/pagine/bionicClient.jsx): `src/components/pagine/bionicClient.jsx`
- [FAQ content](https://github.com/rickyrodio93/sito_herbalife/blob/main/src/components/accordion/accordionData.jsx): `src/components/accordion/accordionData.jsx`
- [FAQ accordion](https://github.com/rickyrodio93/sito_herbalife/blob/main/src/components/accordion/AccordionItem.jsx): `src/components/accordion/AccordionItem.jsx`
- [Recipes](https://github.com/rickyrodio93/sito_herbalife/blob/main/src/components/ricette/ricette.js): `src/components/ricette/ricette.js`
- [Wellness pages](https://github.com/rickyrodio93/sito_herbalife/blob/main/src/app/(riccardorodio.com)/controlloPeso/page.js): `src/app/(riccardorodio.com)/controlloPeso/page.js`

### Site services

- [Wallet link API](https://github.com/rickyrodio93/sito_herbalife/blob/main/src/app/(biglietto)/api/wallet-link/route.js): `src/app/(biglietto)/api/wallet-link/route.js`
- [Wallet link generator](https://github.com/rickyrodio93/sito_herbalife/blob/main/src/lib/googleWallet.js): `src/lib/googleWallet.js`
- [Page tracking](https://github.com/rickyrodio93/sito_herbalife/blob/main/src/components/clientLogic.js): `src/components/clientLogic.js`

### Other components

- **Visitor**
- **Recommendations CSV**
- **Google Wallet**
- **Google Tag Manager**

## Connections

- Visitor → Quote inputs: sets quote inputs (evidence: `README.md`)
- Quote inputs → Product table: renders tables (evidence: `src/components/pagine/preventivoClient.jsx`)
- Product table → Product row: renders rows (evidence: `src/components/tabellaPreventivo/tabella.jsx`)
- Product row → Price calculation: calculates prices (evidence: `src/components/tabellaPreventivo/riga.jsx`)
- Order summary → Tax calculation: calculates totals (evidence: `src/components/tabellaPreventivo/riepilogo.jsx`)
- Quote inputs → Order summary: displays summary (evidence: `src/components/pagine/preventivoClient.jsx`)
- Order summary → Order links: opens order details (evidence: `src/components/tabellaPreventivo/riepilogo.jsx`)
- Order links → Google Wallet: links orders (evidence: `README.md`)
- Order links → Google Wallet: deep-links order (evidence: `README.md`)
- Home page → Home content sections: uses sections (evidence: `src/app/(riccardorodio.com)/page.js`)
- Home page → Section renderer: renders sections (evidence: `src/app/(riccardorodio.com)/page.js`)
- Home page → Recommended products: shows products (evidence: `src/app/(riccardorodio.com)/page.js`)
- Recommended products → Recommendations CSV: loads recommendations (evidence: `src/components/prodottiConsigliati/prodottiConsigliati.jsx`)
- Recommended products → Product cards: renders cards (evidence: `src/components/prodottiConsigliati/prodottiConsigliati.jsx`)
- Bioniq page → FAQ content: uses product FAQs (evidence: `src/components/pagine/bionicClient.jsx`)
- FAQ accordion → FAQ content: displays answers (evidence: `src/components/pagine/faqClient.jsx`)
- Wellness pages → Recommended products: shows products (evidence: `src/app/(riccardorodio.com)/controlloPeso/page.js`)
- Wallet link API → Wallet link generator: generates link (evidence: `src/app/(biglietto)/api/wallet-link/route.js`)
- Wallet link generator → Google Wallet: creates save link (evidence: `src/lib/googleWallet.js`)
- Page tracking → Google Tag Manager: pushes pageviews (evidence: `src/components/clientLogic.js`)
