# arshakyan998/online-shop-pizzas-on-react-redux architecture

> Architecture diagram of the GitHub repository arshakyan998/online-shop-pizzas-on-react-redux, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-04). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/arshakyan998/online-shop-pizzas-on-react-redux
- Repository: https://github.com/arshakyan998/online-shop-pizzas-on-react-redux

## Overview

This is a React pizza-ordering storefront. Users browse a remotely served pizza catalog, filter by category and sort order, choose size and crust, add pizzas to a cart, then adjust or clear cart contents. Redux coordinates catalog, filter, and cart state. The README identifies a JSON Server backed by public/db.JSON, but the sampled fetch helper does not expose its request details; unsampled wiring is therefore shown only where repository references or documentation support it.

Main entry points: [`src/components/main/pizzaBlock/Pizzas.jsx`](https://github.com/arshakyan998/online-shop-pizzas-on-react-redux/blob/master/src/components/main/pizzaBlock/Pizzas.jsx) (Pizza list), [`src/redux/root.js`](https://github.com/arshakyan998/online-shop-pizzas-on-react-redux/blob/master/src/redux/root.js) (Redux store), [`src/App.js`](https://github.com/arshakyan998/online-shop-pizzas-on-react-redux/blob/master/src/App.js) (Route shell), [`src/components/main/cart/Cart.jsx`](https://github.com/arshakyan998/online-shop-pizzas-on-react-redux/blob/master/src/components/main/cart/Cart.jsx) (Cart page)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Storefront UI"]
  node_app["Route shell<br/>[App.js]"]
  node_header["Cart summary<br/>[Header.jsx]"]
  node_cart_view["Cart page<br/>[Cart.jsx]"]
end

subgraph group_catalog["Catalog browsing"]
  node_catalog_entry["Catalog entry<br/>[GetPizzasItem.jsx]"]
  node_menu["Category and sort<br/>[Menu.jsx]"]
  node_pizza_list["Pizza list<br/>[Pizzas.jsx]"]
  node_pizza_card["Pizza options<br/>[RenderPizzas.jsx]"]
  node_loading["Loading placeholder<br/>[LodingBlock.jsx]"]
end

subgraph group_state["Redux state"]
  node_filter_actions["Filter actions<br/>[filter.js]"]
  node_filter_state["Filter state<br/>[filter.js]"]
  node_pizza_actions["Catalog actions<br/>[pizzas.js]"]
  node_pizza_state["Catalog state<br/>[pizzas.js]"]
  node_cart_actions["Cart actions<br/>[cart.js]"]
  node_cart_state["Cart state<br/>[cart.js]"]
  node_store["Redux store<br/>[root.js]"]
end

subgraph group_data["Catalog data"]
  node_fetch_api["Catalog fetch<br/>[fetchApi.js]"]
  node_json_server[("JSON Server")]
  node_catalog_data["Pizza data<br/>[db.JSON]"]
end

node_visitor(("Shopper"))

node_visitor -->|"opens storefront"| node_app
node_app -->|"renders"| node_header
node_app -->|"routes home"| node_catalog_entry
node_app -->|"routes cart"| node_cart_view
node_catalog_entry -->|"renders"| node_menu
node_catalog_entry -->|"renders"| node_pizza_list
node_menu -->|"dispatches"| node_filter_actions
node_filter_actions -.->|"updates"| node_filter_state
node_pizza_list -->|"selects state"| node_store
node_pizza_list -->|"reads filters"| node_filter_state
node_pizza_list -->|"dispatches fetch"| node_pizza_actions
node_pizza_actions -->|"requests catalog"| node_fetch_api
node_fetch_api -.->|"loads data"| node_json_server
node_json_server -.->|"serves JSON"| node_catalog_data
node_pizza_actions -.->|"sets pizzas"| node_pizza_state
node_pizza_list -->|"renders items"| node_pizza_card
node_pizza_list -->|"renders while loading"| node_loading
node_pizza_card -->|"adds selected pizza"| node_pizza_list
node_pizza_list -->|"dispatches add"| node_cart_actions
node_cart_view -->|"dispatches changes"| node_cart_actions
node_header -.->|"selects totals"| node_store
node_cart_view -.->|"selects cart"| node_store
node_cart_actions -.->|"updates cart"| node_cart_state
node_store -->|"combines reducer"| node_filter_state
node_store -->|"combines reducer"| node_pizza_state
node_store -->|"combines reducer"| node_cart_state

click node_app "https://github.com/arshakyan998/online-shop-pizzas-on-react-redux/blob/master/src/App.js"
click node_header "https://github.com/arshakyan998/online-shop-pizzas-on-react-redux/blob/master/src/components/header/Header.jsx"
click node_catalog_entry "https://github.com/arshakyan998/online-shop-pizzas-on-react-redux/blob/master/src/components/main/pizzaBlock/GetPizzasItem.jsx"
click node_menu "https://github.com/arshakyan998/online-shop-pizzas-on-react-redux/blob/master/src/components/main/menu/Menu.jsx"
click node_pizza_list "https://github.com/arshakyan998/online-shop-pizzas-on-react-redux/blob/master/src/components/main/pizzaBlock/Pizzas.jsx"
click node_pizza_card "https://github.com/arshakyan998/online-shop-pizzas-on-react-redux/blob/master/src/components/main/pizzaBlock/RenderPizzas.jsx"
click node_loading "https://github.com/arshakyan998/online-shop-pizzas-on-react-redux/blob/master/src/components/main/pizzaBlock/LodingBlock.jsx"
click node_cart_view "https://github.com/arshakyan998/online-shop-pizzas-on-react-redux/blob/master/src/components/main/cart/Cart.jsx"
click node_filter_actions "https://github.com/arshakyan998/online-shop-pizzas-on-react-redux/blob/master/src/redux/actions/filter.js"
click node_filter_state "https://github.com/arshakyan998/online-shop-pizzas-on-react-redux/blob/master/src/redux/rducers/filter.js"
click node_pizza_actions "https://github.com/arshakyan998/online-shop-pizzas-on-react-redux/blob/master/src/redux/actions/pizzas.js"
click node_pizza_state "https://github.com/arshakyan998/online-shop-pizzas-on-react-redux/blob/master/src/redux/rducers/pizzas.js"
click node_cart_actions "https://github.com/arshakyan998/online-shop-pizzas-on-react-redux/blob/master/src/redux/actions/cart.js"
click node_cart_state "https://github.com/arshakyan998/online-shop-pizzas-on-react-redux/blob/master/src/redux/rducers/cart.js"
click node_store "https://github.com/arshakyan998/online-shop-pizzas-on-react-redux/blob/master/src/redux/root.js"
click node_fetch_api "https://github.com/arshakyan998/online-shop-pizzas-on-react-redux/blob/master/src/redux/actions/fetchApi.js"
click node_catalog_data "https://github.com/arshakyan998/online-shop-pizzas-on-react-redux/blob/master/public/db.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,node_header,node_cart_view toneBlue
class node_catalog_entry,node_menu,node_pizza_list,node_pizza_card,node_loading toneAmber
class node_filter_actions,node_filter_state,node_pizza_actions,node_pizza_state,node_cart_actions,node_cart_state,node_store toneMint
class node_fetch_api,node_json_server,node_catalog_data toneRose
class node_visitor toneIndigo
```

## Components

### Storefront UI

- [Route shell](https://github.com/arshakyan998/online-shop-pizzas-on-react-redux/blob/master/src/App.js): `src/App.js`
- [Cart summary](https://github.com/arshakyan998/online-shop-pizzas-on-react-redux/blob/master/src/components/header/Header.jsx): `src/components/header/Header.jsx`
- [Cart page](https://github.com/arshakyan998/online-shop-pizzas-on-react-redux/blob/master/src/components/main/cart/Cart.jsx): `src/components/main/cart/Cart.jsx`

### Catalog browsing

- [Catalog entry](https://github.com/arshakyan998/online-shop-pizzas-on-react-redux/blob/master/src/components/main/pizzaBlock/GetPizzasItem.jsx): `src/components/main/pizzaBlock/GetPizzasItem.jsx`
- [Category and sort](https://github.com/arshakyan998/online-shop-pizzas-on-react-redux/blob/master/src/components/main/menu/Menu.jsx): `src/components/main/menu/Menu.jsx`
- [Pizza list](https://github.com/arshakyan998/online-shop-pizzas-on-react-redux/blob/master/src/components/main/pizzaBlock/Pizzas.jsx): `src/components/main/pizzaBlock/Pizzas.jsx`
- [Pizza options](https://github.com/arshakyan998/online-shop-pizzas-on-react-redux/blob/master/src/components/main/pizzaBlock/RenderPizzas.jsx): `src/components/main/pizzaBlock/RenderPizzas.jsx`
- [Loading placeholder](https://github.com/arshakyan998/online-shop-pizzas-on-react-redux/blob/master/src/components/main/pizzaBlock/LodingBlock.jsx): `src/components/main/pizzaBlock/LodingBlock.jsx`

### Redux state

- [Filter actions](https://github.com/arshakyan998/online-shop-pizzas-on-react-redux/blob/master/src/redux/actions/filter.js): `src/redux/actions/filter.js`
- [Filter state](https://github.com/arshakyan998/online-shop-pizzas-on-react-redux/blob/master/src/redux/rducers/filter.js): `src/redux/rducers/filter.js`
- [Catalog actions](https://github.com/arshakyan998/online-shop-pizzas-on-react-redux/blob/master/src/redux/actions/pizzas.js): `src/redux/actions/pizzas.js`
- [Catalog state](https://github.com/arshakyan998/online-shop-pizzas-on-react-redux/blob/master/src/redux/rducers/pizzas.js): `src/redux/rducers/pizzas.js`
- [Cart actions](https://github.com/arshakyan998/online-shop-pizzas-on-react-redux/blob/master/src/redux/actions/cart.js): `src/redux/actions/cart.js`
- [Cart state](https://github.com/arshakyan998/online-shop-pizzas-on-react-redux/blob/master/src/redux/rducers/cart.js): `src/redux/rducers/cart.js`
- [Redux store](https://github.com/arshakyan998/online-shop-pizzas-on-react-redux/blob/master/src/redux/root.js): `src/redux/root.js`

### Catalog data

- [Catalog fetch](https://github.com/arshakyan998/online-shop-pizzas-on-react-redux/blob/master/src/redux/actions/fetchApi.js): `src/redux/actions/fetchApi.js`
- **JSON Server**
- [Pizza data](https://github.com/arshakyan998/online-shop-pizzas-on-react-redux/blob/master/public/db.JSON): `public/db.JSON`

### Other components

- **Shopper**

## Connections

- Shopper → Route shell: opens storefront (evidence: `src/App.js`)
- Route shell → Cart summary: renders (evidence: `src/App.js`)
- Route shell → Catalog entry: routes home (evidence: `src/App.js`)
- Route shell → Cart page: routes cart (evidence: `src/App.js`)
- Catalog entry → Category and sort: renders (evidence: `src/components/main/pizzaBlock/GetPizzasItem.jsx`)
- Catalog entry → Pizza list: renders (evidence: `src/components/main/pizzaBlock/GetPizzasItem.jsx`)
- Category and sort → Filter actions: dispatches (evidence: `src/components/main/menu/Menu.jsx`)
- Filter actions → Filter state: updates
- Pizza list → Redux store: selects state (evidence: `src/components/main/pizzaBlock/Pizzas.jsx`)
- Pizza list → Filter state: reads filters (evidence: `src/components/main/pizzaBlock/Pizzas.jsx`)
- Pizza list → Catalog actions: dispatches fetch (evidence: `src/components/main/pizzaBlock/Pizzas.jsx`)
- Catalog actions → Catalog fetch: requests catalog (evidence: `src/redux/actions/pizzas.js`)
- Catalog fetch → JSON Server: loads data
- JSON Server → Pizza data: serves JSON (evidence: `README.md`)
- Catalog actions → Catalog state: sets pizzas
- Pizza list → Pizza options: renders items (evidence: `src/components/main/pizzaBlock/Pizzas.jsx`)
- Pizza list → Loading placeholder: renders while loading (evidence: `src/components/main/pizzaBlock/Pizzas.jsx`)
- Pizza options → Pizza list: adds selected pizza (evidence: `src/components/main/pizzaBlock/Pizzas.jsx`)
- Pizza list → Cart actions: dispatches add (evidence: `src/components/main/pizzaBlock/Pizzas.jsx`)
- Cart page → Cart actions: dispatches changes (evidence: `src/components/main/cart/Cart.jsx`)
- Cart summary → Redux store: selects totals
- Cart page → Redux store: selects cart
- Cart actions → Cart state: updates cart
- Redux store → Filter state: combines reducer (evidence: `src/redux/root.js`)
- Redux store → Catalog state: combines reducer (evidence: `src/redux/root.js`)
- Redux store → Cart state: combines reducer (evidence: `src/redux/root.js`)
