# swastiksuman/nozirev architecture

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

- Interactive diagram: https://gitdiagram.com/swastiksuman/nozirev
- Repository: https://github.com/swastiksuman/nozirev

## Overview

Nozirev is a storefront backed by a product-catalog service and a separate cart service. The documented customer path is browsing category listings and managing a cart; the sampled frontend connects product retrieval to the catalog API, while its cart actions update Redux state locally. The cart service separately exposes CRUD endpoints and caches cart records. The README documents the services’ capabilities, but no sampled evidence shows the UI calling the cart API, so that connection is not drawn.

Main entry points: [`nozirev-ui/src/App.js`](https://github.com/swastiksuman/nozirev/blob/main/nozirev-ui/src/App.js) (Application Router), [`nozirev-ui/src/pages/ProductListing.js`](https://github.com/swastiksuman/nozirev/blob/main/nozirev-ui/src/pages/ProductListing.js) (Product Listing), [`nozirev-cxp-cart/src/main/java/com/nozirev_service/nozirev_cxp_cart/service/CartService.java`](https://github.com/swastiksuman/nozirev/blob/main/nozirev-cxp-cart/src/main/java/com/nozirev_service/nozirev_cxp_cart/service/CartService.java) (Cart Operations), [`nozirev-ui/src/redux/store.js`](https://github.com/swastiksuman/nozirev/blob/main/nozirev-ui/src/redux/store.js) (Redux Store)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_storefront["Storefront UI"]
  node_app["Application Router<br/>[App.js]"]
  node_navigation["Navigation<br/>[Navigation.js]"]
  node_home["Home Page<br/>[HomePage.js]"]
  node_listing["Product Listing<br/>[ProductListing.js]"]
  node_cartpage["Cart Page<br/>[CartPage.js]"]
  node_productactions["Product Actions<br/>[productActions.js]"]
  node_productservice["Product API Client<br/>[productService.js]"]
end

subgraph group_catalog["Product Catalog"]
  node_catalogapi["Catalog API"]
  node_catalogdata["Catalog Data<br/>[products.json]"]
end

subgraph group_cartapi["Cart Service"]
  node_cartcontroller["Cart API"]
  node_cartservice["Cart Operations<br/>[CartService.java]"]
  node_cartmodel["Cart Data Model<br/>[Cart.java]"]
  node_cartcache[("Caffeine Cache<br/>[CacheConfig.java]")]
end

subgraph group_cartstate["Cart State"]
  node_store["Redux Store<br/>[store.js]"]
  node_productreducer["Product Reducer<br/>[productReducer.js]"]
  node_cartactions["Cart Actions<br/>[cartActions.js]"]
  node_cartreducer["Cart Reducer<br/>[cartReducer.js]"]
end

node_customer(("Customer"))
node_cartactor(("Cart API Client"))

node_customer -->|"uses"| node_app
node_app -->|"provides state"| node_store
node_app -->|"renders"| node_navigation
node_app -->|"routes to"| node_home
node_app -->|"routes to"| node_listing
node_app -->|"routes to"| node_cartpage
node_listing -->|"dispatches"| node_productactions
node_productactions -->|"fetches through"| node_productservice
node_productservice -->|"requests products"| node_catalogapi
node_customer -->|"requests catalog"| node_catalogapi
node_store -->|"combines"| node_productreducer
node_store -->|"combines"| node_cartreducer
node_listing -->|"dispatches"| node_cartactions
node_cartpage -->|"dispatches"| node_cartactions
node_cartactions -->|"defines actions"| node_cartreducer
node_cartactor -->|"calls endpoints"| node_cartcontroller
node_cartcontroller -->|"delegates"| node_cartservice
node_cartservice -->|"updates"| node_cartmodel
node_cartservice -->|"uses annotations"| node_cartcache

click node_app "https://github.com/swastiksuman/nozirev/blob/main/nozirev-ui/src/App.js"
click node_navigation "https://github.com/swastiksuman/nozirev/blob/main/nozirev-ui/src/components/Navigation.js"
click node_home "https://github.com/swastiksuman/nozirev/blob/main/nozirev-ui/src/pages/HomePage.js"
click node_listing "https://github.com/swastiksuman/nozirev/blob/main/nozirev-ui/src/pages/ProductListing.js"
click node_cartpage "https://github.com/swastiksuman/nozirev/blob/main/nozirev-ui/src/pages/CartPage.js"
click node_productactions "https://github.com/swastiksuman/nozirev/blob/main/nozirev-ui/src/redux/actions/productActions.js"
click node_productservice "https://github.com/swastiksuman/nozirev/blob/main/nozirev-ui/src/services/productService.js"
click node_catalogapi "https://github.com/swastiksuman/nozirev/blob/main/nozirev-soe/src/main/java/com/nozirev_service/nozirev_soe/controller/ProductController.java"
click node_catalogdata "https://github.com/swastiksuman/nozirev/blob/main/nozirev-soe/src/main/resources/products.json"
click node_store "https://github.com/swastiksuman/nozirev/blob/main/nozirev-ui/src/redux/store.js"
click node_productreducer "https://github.com/swastiksuman/nozirev/blob/main/nozirev-ui/src/redux/reducers/productReducer.js"
click node_cartactions "https://github.com/swastiksuman/nozirev/blob/main/nozirev-ui/src/redux/actions/cartActions.js"
click node_cartreducer "https://github.com/swastiksuman/nozirev/blob/main/nozirev-ui/src/redux/reducers/cartReducer.js"
click node_cartcontroller "https://github.com/swastiksuman/nozirev/blob/main/nozirev-cxp-cart/src/main/java/com/nozirev_service/nozirev_cxp_cart/controller/CartController.java"
click node_cartservice "https://github.com/swastiksuman/nozirev/blob/main/nozirev-cxp-cart/src/main/java/com/nozirev_service/nozirev_cxp_cart/service/CartService.java"
click node_cartmodel "https://github.com/swastiksuman/nozirev/blob/main/nozirev-cxp-cart/src/main/java/com/nozirev_service/nozirev_cxp_cart/model/Cart.java"
click node_cartcache "https://github.com/swastiksuman/nozirev/blob/main/nozirev-cxp-cart/src/main/java/com/nozirev_service/nozirev_cxp_cart/config/CacheConfig.java"

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_navigation,node_home,node_listing,node_cartpage,node_productactions,node_productservice,node_cartactor toneBlue
class node_catalogapi,node_catalogdata toneAmber
class node_cartcontroller,node_cartservice,node_cartmodel,node_cartcache toneMint
class node_store,node_productreducer,node_cartactions,node_cartreducer toneRose
class node_customer toneIndigo
```

## Components

### Storefront UI

- [Application Router](https://github.com/swastiksuman/nozirev/blob/main/nozirev-ui/src/App.js): `nozirev-ui/src/App.js`
- [Navigation](https://github.com/swastiksuman/nozirev/blob/main/nozirev-ui/src/components/Navigation.js): `nozirev-ui/src/components/Navigation.js`
- [Home Page](https://github.com/swastiksuman/nozirev/blob/main/nozirev-ui/src/pages/HomePage.js): `nozirev-ui/src/pages/HomePage.js`
- [Product Listing](https://github.com/swastiksuman/nozirev/blob/main/nozirev-ui/src/pages/ProductListing.js): `nozirev-ui/src/pages/ProductListing.js`
- [Cart Page](https://github.com/swastiksuman/nozirev/blob/main/nozirev-ui/src/pages/CartPage.js): `nozirev-ui/src/pages/CartPage.js`
- [Product Actions](https://github.com/swastiksuman/nozirev/blob/main/nozirev-ui/src/redux/actions/productActions.js): `nozirev-ui/src/redux/actions/productActions.js`
- [Product API Client](https://github.com/swastiksuman/nozirev/blob/main/nozirev-ui/src/services/productService.js): `nozirev-ui/src/services/productService.js`

### Product Catalog

- [Catalog API](https://github.com/swastiksuman/nozirev/blob/main/nozirev-soe/src/main/java/com/nozirev_service/nozirev_soe/controller/ProductController.java): `nozirev-soe/src/main/java/com/nozirev_service/nozirev_soe/controller/ProductController.java`
- [Catalog Data](https://github.com/swastiksuman/nozirev/blob/main/nozirev-soe/src/main/resources/products.json): `nozirev-soe/src/main/resources/products.json`

### Cart Service

- [Cart API](https://github.com/swastiksuman/nozirev/blob/main/nozirev-cxp-cart/src/main/java/com/nozirev_service/nozirev_cxp_cart/controller/CartController.java): `nozirev-cxp-cart/src/main/java/com/nozirev_service/nozirev_cxp_cart/controller/CartController.java`
- [Cart Operations](https://github.com/swastiksuman/nozirev/blob/main/nozirev-cxp-cart/src/main/java/com/nozirev_service/nozirev_cxp_cart/service/CartService.java): `nozirev-cxp-cart/src/main/java/com/nozirev_service/nozirev_cxp_cart/service/CartService.java`
- [Cart Data Model](https://github.com/swastiksuman/nozirev/blob/main/nozirev-cxp-cart/src/main/java/com/nozirev_service/nozirev_cxp_cart/model/Cart.java): `nozirev-cxp-cart/src/main/java/com/nozirev_service/nozirev_cxp_cart/model/Cart.java`
- [Caffeine Cache](https://github.com/swastiksuman/nozirev/blob/main/nozirev-cxp-cart/src/main/java/com/nozirev_service/nozirev_cxp_cart/config/CacheConfig.java): `nozirev-cxp-cart/src/main/java/com/nozirev_service/nozirev_cxp_cart/config/CacheConfig.java`

### Cart State

- [Redux Store](https://github.com/swastiksuman/nozirev/blob/main/nozirev-ui/src/redux/store.js): `nozirev-ui/src/redux/store.js`
- [Product Reducer](https://github.com/swastiksuman/nozirev/blob/main/nozirev-ui/src/redux/reducers/productReducer.js): `nozirev-ui/src/redux/reducers/productReducer.js`
- [Cart Actions](https://github.com/swastiksuman/nozirev/blob/main/nozirev-ui/src/redux/actions/cartActions.js): `nozirev-ui/src/redux/actions/cartActions.js`
- [Cart Reducer](https://github.com/swastiksuman/nozirev/blob/main/nozirev-ui/src/redux/reducers/cartReducer.js): `nozirev-ui/src/redux/reducers/cartReducer.js`

### Other components

- **Customer**
- **Cart API Client**

## Connections

- Customer → Application Router: uses (evidence: `README.md`)
- Application Router → Redux Store: provides state (evidence: `nozirev-ui/src/App.js`)
- Application Router → Navigation: renders (evidence: `nozirev-ui/src/App.js`)
- Application Router → Home Page: routes to (evidence: `nozirev-ui/src/App.js`)
- Application Router → Product Listing: routes to (evidence: `nozirev-ui/src/App.js`)
- Application Router → Cart Page: routes to (evidence: `nozirev-ui/src/App.js`)
- Product Listing → Product Actions: dispatches (evidence: `nozirev-ui/src/pages/ProductListing.js`)
- Product Actions → Product API Client: fetches through (evidence: `nozirev-ui/src/redux/actions/productActions.js`)
- Product API Client → Catalog API: requests products (evidence: `nozirev-ui/src/services/productService.js`)
- Customer → Catalog API: requests catalog (evidence: `README.md`)
- Redux Store → Product Reducer: combines (evidence: `nozirev-ui/src/redux/store.js`)
- Redux Store → Cart Reducer: combines (evidence: `nozirev-ui/src/redux/store.js`)
- Product Listing → Cart Actions: dispatches (evidence: `nozirev-ui/src/pages/ProductListing.js`)
- Cart Page → Cart Actions: dispatches (evidence: `nozirev-ui/src/pages/CartPage.js`)
- Cart Actions → Cart Reducer: defines actions (evidence: `nozirev-ui/src/redux/actions/cartActions.js`)
- Cart API Client → Cart API: calls endpoints (evidence: `README.md`)
- Cart API → Cart Operations: delegates (evidence: `nozirev-cxp-cart/src/main/java/com/nozirev_service/nozirev_cxp_cart/controller/CartController.java`)
- Cart Operations → Cart Data Model: updates (evidence: `nozirev-cxp-cart/src/main/java/com/nozirev_service/nozirev_cxp_cart/service/CartService.java`)
- Cart Operations → Caffeine Cache: uses annotations (evidence: `README.md`)
