# suhrobkholmurodov/react-pizza architecture

> Architecture diagram of the GitHub repository suhrobkholmurodov/react-pizza, 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/suhrobkholmurodov/react-pizza
- Repository: https://github.com/suhrobkholmurodov/react-pizza

## Overview

This is a React pizza storefront: visitors browse and filter a catalog, then manage favorites and a cart. The route/layout layer hosts the pages; Redux slices hold catalog, filter, cart, favorite, and review-filter state. The README is a generic stack overview, so product capabilities are inferred from the named source modules; unsampled behavior and external data-service wiring are not asserted.

Main entry points: [`src/redux/store.ts`](https://github.com/suhrobkholmurodov/react-pizza/blob/master/src/redux/store.ts) (Redux store), [`src/App.tsx`](https://github.com/suhrobkholmurodov/react-pizza/blob/master/src/App.tsx) (App routes), [`src/pages/Home.tsx`](https://github.com/suhrobkholmurodov/react-pizza/blob/master/src/pages/Home.tsx) (Home catalog), [`src/redux/cart/slice.ts`](https://github.com/suhrobkholmurodov/react-pizza/blob/master/src/redux/cart/slice.ts) (Cart state)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application shell"]
  node_app["App routes<br/>[App.tsx]"]
  node_layout["Main layout<br/>[MainLayout.tsx]"]
  node_localization["Localization hook<br/>[useLocalization.ts]"]
end

subgraph group_catalog["Pizza catalog"]
  node_home["Home catalog<br/>[Home.tsx]"]
  node_catalogui["Catalog controls"]
  node_pizzablock["Pizza cards<br/>[PizzaBlock.tsx]"]
  node_pizzadrawer["Pizza details<br/>[PizzaDrawer.tsx]"]
  node_pizzaquery["Pizza loading<br/>[asyncActions.ts]"]
  node_reviews["Review controls"]
end

subgraph group_commerce["Cart and favorites"]
  node_cartpage["Cart page<br/>[Cart.tsx]"]
  node_cartui["Cart components"]
  node_favpage["Favorites page<br/>[Favorites.tsx]"]
  node_favui["Favorite items<br/>[FavoritesItem.tsx]"]
end

subgraph group_state["State and utilities"]
  node_cartstate["Cart state<br/>[slice.ts]"]
  node_favstate["Favorites state<br/>[slice.ts]"]
  node_filterstate["Catalog filters<br/>[slice.ts]"]
  node_reviewstate["Review filter state<br/>[slice.ts]"]
  node_pizzastate["Pizza state<br/>[slice.ts]"]
  node_store[("Redux store<br/>[store.ts]")]
  node_carttotal["Cart total utility<br/>[calcTotalPrice.ts]"]
end

node_visitor(("Visitor"))

node_visitor -->|"opens"| node_app
node_app -->|"routes through"| node_layout
node_app -->|"routes to"| node_home
node_app -->|"routes to"| node_cartpage
node_app -->|"routes to"| node_favpage
node_layout -->|"selects"| node_cartstate
node_layout -->|"selects"| node_favstate
node_home -->|"dispatches fetch"| node_pizzaquery
node_home -->|"renders"| node_catalogui
node_home -->|"renders"| node_pizzablock
node_home -->|"dispatches filters"| node_filterstate
node_pizzaquery -->|"updates"| node_pizzastate
node_cartpage -->|"renders"| node_cartui
node_cartpage -->|"selects"| node_cartstate
node_favpage -->|"renders"| node_favui
node_favpage -->|"dispatches clear"| node_favstate
node_favui -->|"dispatches changes"| node_favstate
node_favui -->|"opens details"| node_pizzadrawer
node_reviews -->|"dispatches filter"| node_reviewstate
node_cartstate -->|"calculates totals"| node_carttotal
node_store -->|"registers reducer"| node_cartstate
node_store -->|"registers reducer"| node_favstate
node_store -->|"registers reducer"| node_filterstate
node_store -->|"registers reducer"| node_reviewstate
node_store -->|"registers reducer"| node_pizzastate

click node_app "https://github.com/suhrobkholmurodov/react-pizza/blob/master/src/App.tsx"
click node_layout "https://github.com/suhrobkholmurodov/react-pizza/blob/master/src/layouts/MainLayout.tsx"
click node_home "https://github.com/suhrobkholmurodov/react-pizza/blob/master/src/pages/Home.tsx"
click node_catalogui "https://github.com/suhrobkholmurodov/react-pizza/tree/master/src/components"
click node_pizzablock "https://github.com/suhrobkholmurodov/react-pizza/blob/master/src/components/PizzaBlock.tsx"
click node_pizzadrawer "https://github.com/suhrobkholmurodov/react-pizza/blob/master/src/components/PizzaDrawer.tsx"
click node_pizzaquery "https://github.com/suhrobkholmurodov/react-pizza/blob/master/src/redux/pizza/asyncActions.ts"
click node_cartpage "https://github.com/suhrobkholmurodov/react-pizza/blob/master/src/pages/Cart.tsx"
click node_cartui "https://github.com/suhrobkholmurodov/react-pizza/tree/master/src/components/Cart"
click node_favpage "https://github.com/suhrobkholmurodov/react-pizza/blob/master/src/pages/Favorites.tsx"
click node_favui "https://github.com/suhrobkholmurodov/react-pizza/blob/master/src/components/Favorites/FavoritesItem.tsx"
click node_reviews "https://github.com/suhrobkholmurodov/react-pizza/blob/master/src/components/ReviewFilterControls.tsx"
click node_cartstate "https://github.com/suhrobkholmurodov/react-pizza/blob/master/src/redux/cart/slice.ts"
click node_favstate "https://github.com/suhrobkholmurodov/react-pizza/blob/master/src/redux/favorites/slice.ts"
click node_filterstate "https://github.com/suhrobkholmurodov/react-pizza/blob/master/src/redux/filter/slice.ts"
click node_reviewstate "https://github.com/suhrobkholmurodov/react-pizza/blob/master/src/redux/commentFilter/slice.ts"
click node_pizzastate "https://github.com/suhrobkholmurodov/react-pizza/blob/master/src/redux/pizza/slice.ts"
click node_store "https://github.com/suhrobkholmurodov/react-pizza/blob/master/src/redux/store.ts"
click node_carttotal "https://github.com/suhrobkholmurodov/react-pizza/blob/master/src/utils/calcTotalPrice.ts"
click node_localization "https://github.com/suhrobkholmurodov/react-pizza/blob/master/src/hooks/useLocalization.ts"

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_layout,node_localization toneBlue
class node_home,node_catalogui,node_pizzablock,node_pizzadrawer,node_pizzaquery,node_reviews toneAmber
class node_cartpage,node_cartui,node_favpage,node_favui toneMint
class node_cartstate,node_favstate,node_filterstate,node_reviewstate,node_pizzastate,node_store,node_carttotal toneRose
class node_visitor toneIndigo
```

## Components

### Application shell

- [App routes](https://github.com/suhrobkholmurodov/react-pizza/blob/master/src/App.tsx): `src/App.tsx`
- [Main layout](https://github.com/suhrobkholmurodov/react-pizza/blob/master/src/layouts/MainLayout.tsx): `src/layouts/MainLayout.tsx`
- [Localization hook](https://github.com/suhrobkholmurodov/react-pizza/blob/master/src/hooks/useLocalization.ts): `src/hooks/useLocalization.ts`

### Pizza catalog

- [Home catalog](https://github.com/suhrobkholmurodov/react-pizza/blob/master/src/pages/Home.tsx): `src/pages/Home.tsx`
- [Catalog controls](https://github.com/suhrobkholmurodov/react-pizza/tree/master/src/components): `src/components`
- [Pizza cards](https://github.com/suhrobkholmurodov/react-pizza/blob/master/src/components/PizzaBlock.tsx): `src/components/PizzaBlock.tsx`
- [Pizza details](https://github.com/suhrobkholmurodov/react-pizza/blob/master/src/components/PizzaDrawer.tsx): `src/components/PizzaDrawer.tsx`
- [Pizza loading](https://github.com/suhrobkholmurodov/react-pizza/blob/master/src/redux/pizza/asyncActions.ts): `src/redux/pizza/asyncActions.ts`
- [Review controls](https://github.com/suhrobkholmurodov/react-pizza/blob/master/src/components/ReviewFilterControls.tsx): `src/components/ReviewFilterControls.tsx`

### Cart and favorites

- [Cart page](https://github.com/suhrobkholmurodov/react-pizza/blob/master/src/pages/Cart.tsx): `src/pages/Cart.tsx`
- [Cart components](https://github.com/suhrobkholmurodov/react-pizza/tree/master/src/components/Cart): `src/components/Cart`
- [Favorites page](https://github.com/suhrobkholmurodov/react-pizza/blob/master/src/pages/Favorites.tsx): `src/pages/Favorites.tsx`
- [Favorite items](https://github.com/suhrobkholmurodov/react-pizza/blob/master/src/components/Favorites/FavoritesItem.tsx): `src/components/Favorites/FavoritesItem.tsx`

### State and utilities

- [Cart state](https://github.com/suhrobkholmurodov/react-pizza/blob/master/src/redux/cart/slice.ts): `src/redux/cart/slice.ts`
- [Favorites state](https://github.com/suhrobkholmurodov/react-pizza/blob/master/src/redux/favorites/slice.ts): `src/redux/favorites/slice.ts`
- [Catalog filters](https://github.com/suhrobkholmurodov/react-pizza/blob/master/src/redux/filter/slice.ts): `src/redux/filter/slice.ts`
- [Review filter state](https://github.com/suhrobkholmurodov/react-pizza/blob/master/src/redux/commentFilter/slice.ts): `src/redux/commentFilter/slice.ts`
- [Pizza state](https://github.com/suhrobkholmurodov/react-pizza/blob/master/src/redux/pizza/slice.ts): `src/redux/pizza/slice.ts`
- [Redux store](https://github.com/suhrobkholmurodov/react-pizza/blob/master/src/redux/store.ts): `src/redux/store.ts`
- [Cart total utility](https://github.com/suhrobkholmurodov/react-pizza/blob/master/src/utils/calcTotalPrice.ts): `src/utils/calcTotalPrice.ts`

### Other components

- **Visitor**

## Connections

- Visitor → App routes: opens (evidence: `src/App.tsx`)
- App routes → Main layout: routes through (evidence: `src/App.tsx`)
- App routes → Home catalog: routes to (evidence: `src/App.tsx`)
- App routes → Cart page: routes to (evidence: `src/App.tsx`)
- App routes → Favorites page: routes to (evidence: `src/App.tsx`)
- Main layout → Cart state: selects (evidence: `src/layouts/MainLayout.tsx`)
- Main layout → Favorites state: selects (evidence: `src/layouts/MainLayout.tsx`)
- Home catalog → Pizza loading: dispatches fetch (evidence: `src/pages/Home.tsx`)
- Home catalog → Catalog controls: renders (evidence: `src/pages/Home.tsx`)
- Home catalog → Pizza cards: renders (evidence: `src/pages/Home.tsx`)
- Home catalog → Catalog filters: dispatches filters (evidence: `src/pages/Home.tsx`)
- Pizza loading → Pizza state: updates (evidence: `src/redux/pizza/slice.ts`)
- Cart page → Cart components: renders (evidence: `src/pages/Cart.tsx`)
- Cart page → Cart state: selects (evidence: `src/pages/Cart.tsx`)
- Favorites page → Favorite items: renders (evidence: `src/pages/Favorites.tsx`)
- Favorites page → Favorites state: dispatches clear (evidence: `src/pages/Favorites.tsx`)
- Favorite items → Favorites state: dispatches changes (evidence: `src/components/Favorites/FavoritesItem.tsx`)
- Favorite items → Pizza details: opens details (evidence: `src/components/Favorites/FavoritesItem.tsx`)
- Review controls → Review filter state: dispatches filter (evidence: `src/components/ReviewFilterControls.tsx`)
- Cart state → Cart total utility: calculates totals (evidence: `src/redux/cart/slice.ts`)
- Redux store → Cart state: registers reducer (evidence: `src/redux/store.ts`)
- Redux store → Favorites state: registers reducer (evidence: `src/redux/store.ts`)
- Redux store → Catalog filters: registers reducer (evidence: `src/redux/store.ts`)
- Redux store → Review filter state: registers reducer (evidence: `src/redux/store.ts`)
- Redux store → Pizza state: registers reducer (evidence: `src/redux/store.ts`)
