# rgh-code/nepecom architecture

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

- Interactive diagram: https://gitdiagram.com/rgh-code/nepecom
- Repository: https://github.com/rgh-code/nepecom

## Overview

NepEcom is a React storefront. Shoppers browse and search products, inspect details, add items to a cart or buy now, then check out and place an order; account and profile pages support that flow. The graph also preserves authentication, orders, collections, and the documented-by-routes deals, arrivals, wishlist, and membership areas. Source excerpts establish several component-to-API calls; links for unsampled routes use App.jsx routing, and backend behavior beyond the HTTP client is not inspected.

Main entry points: [`src/App.jsx`](https://github.com/rgh-code/nepecom/blob/main/src/App.jsx) (Route App), [`src/pages/CheckoutPage.jsx`](https://github.com/rgh-code/nepecom/blob/main/src/pages/CheckoutPage.jsx) (Checkout), [`src/components/ProductDetails.jsx`](https://github.com/rgh-code/nepecom/blob/main/src/components/ProductDetails.jsx) (Product Details), [`src/components/ProductCard.jsx`](https://github.com/rgh-code/nepecom/blob/main/src/components/ProductCard.jsx) (Product Card)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_storefront["Storefront"]
  node_app["Route App<br/>[App.jsx]"]
  node_navbar["Navigation<br/>[Navbar.jsx]"]
  node_home["Home<br/>[Home.jsx]"]
  node_catalog["Catalog Pages<br/>[collections.jsx]"]
  node_search["Search<br/>[SearchPage.jsx]"]
  node_deals["Deals and Arrivals<br/>[DealsPage.jsx]"]
  node_wishlist["Wishlist<br/>[WishListPage.jsx]"]
  node_membership["Membership<br/>[Membership.jsx]"]
  node_grid["Product Grid<br/>[ProductGrid.jsx]"]
  node_productcard["Product Card<br/>[ProductCard.jsx]"]
  node_details["Product Details<br/>[ProductDetails.jsx]"]
end

subgraph group_commerce["Cart and Orders"]
  node_cartview["Cart View<br/>[CartCards.jsx]"]
  node_checkout["Checkout<br/>[CheckoutPage.jsx]"]
  node_ordersview["Order History<br/>[Orders.jsx]"]
end

subgraph group_accounts["Accounts"]
  node_login["Login and Signup<br/>[Login.jsx]"]
  node_google["Google Sign-In<br/>[GoogleSignIn.jsx]"]
  node_profile["Profile<br/>[Profile.jsx]"]
  node_completeprofile["Complete Profile"]
  node_activate["Account Activation<br/>[ActivatePage.jsx]"]
end

subgraph group_services["API and State"]
  node_authstate["Auth Check<br/>[authentication.js]"]
  node_cartstate["Cart ID State<br/>[cartStorage.js]"]
  node_cartapi["Cart API<br/>[carts.js]"]
  node_productapi["Product API<br/>[products.js]"]
  node_authapi["Auth API<br/>[auth.js]"]
  node_ordersapi["Orders API<br/>[orders.js]"]
  node_customerapi["Customer API<br/>[customers.js]"]
  node_addressapi["Address API<br/>[address.js]"]
  node_http["HTTP Client<br/>[axios.js]"]
  node_browserstore[("Browser Storage")]
end

subgraph group_ui["UI Components"]
  node_uicomponents["UI Primitives<br/>[button.jsx]"]
  node_cardui["Card Primitives<br/>[card.jsx]"]
  node_inputui["Input Primitive<br/>[input.jsx]"]
end

node_shopper(("Shopper"))
node_backend["Store Backend"]

node_shopper -->|"opens storefront"| node_app
node_app -->|"renders navigation"| node_navbar
node_app -->|"routes to"| node_home
node_app -->|"routes to"| node_catalog
node_app -->|"routes to"| node_search
node_app -->|"routes to"| node_deals
node_app -->|"routes to"| node_wishlist
node_app -->|"routes to"| node_membership
node_app -->|"routes to"| node_grid
node_app -->|"routes to"| node_details
node_app -->|"routes to"| node_cartview
node_app -->|"routes to"| node_checkout
node_app -->|"routes to"| node_ordersview
node_app -->|"routes to"| node_login
node_app -->|"routes to"| node_profile
node_app -->|"routes to"| node_completeprofile
node_app -->|"routes to"| node_activate
node_home -->|"renders"| node_grid
node_catalog -->|"renders"| node_grid
node_search -->|"fetches products"| node_productapi
node_search -->|"renders results"| node_productcard
node_grid -->|"fetches products"| node_productapi
node_grid -->|"renders items"| node_productcard
node_productcard -->|"adds items"| node_cartapi
node_productcard -->|"reads and sets ID"| node_cartstate
node_productcard -->|"checks sign-in"| node_authstate
node_productcard -->|"checks customer details"| node_http
node_details -->|"loads product"| node_productapi
node_details -->|"adds items"| node_cartapi
node_details -->|"reads and sets ID"| node_cartstate
node_details -->|"checks sign-in"| node_authstate
node_details -->|"checks customer details"| node_http
node_cartview -->|"reads cart"| node_cartapi
node_cartview -->|"reads cart ID"| node_cartstate
node_checkout -->|"loads cart"| node_cartapi
node_checkout -->|"creates order"| node_ordersapi
node_checkout -->|"loads profile"| node_authapi
node_checkout -->|"loads customer"| node_customerapi
node_checkout -->|"loads address"| node_addressapi
node_checkout -->|"checks sign-in"| node_authstate
node_ordersview -->|"loads orders"| node_ordersapi
node_ordersview -->|"checks sign-in"| node_authstate
node_login -->|"authenticates"| node_authapi
node_login -->|"offers sign-in"| node_google
node_google -->|"uses client"| node_http
node_profile -->|"loads profile"| node_authapi
node_completeprofile -->|"updates account"| node_authapi
node_completeprofile -->|"loads customer"| node_customerapi

click node_app "https://github.com/rgh-code/nepecom/blob/main/src/App.jsx"
click node_navbar "https://github.com/rgh-code/nepecom/blob/main/src/components/Navbar.jsx"
click node_home "https://github.com/rgh-code/nepecom/blob/main/src/pages/Home.jsx"
click node_catalog "https://github.com/rgh-code/nepecom/blob/main/src/pages/collections.jsx"
click node_search "https://github.com/rgh-code/nepecom/blob/main/src/pages/SearchPage.jsx"
click node_deals "https://github.com/rgh-code/nepecom/blob/main/src/pages/DealsPage.jsx"
click node_wishlist "https://github.com/rgh-code/nepecom/blob/main/src/pages/WishListPage.jsx"
click node_membership "https://github.com/rgh-code/nepecom/blob/main/src/pages/Membership.jsx"
click node_grid "https://github.com/rgh-code/nepecom/blob/main/src/components/ProductGrid.jsx"
click node_productcard "https://github.com/rgh-code/nepecom/blob/main/src/components/ProductCard.jsx"
click node_details "https://github.com/rgh-code/nepecom/blob/main/src/components/ProductDetails.jsx"
click node_cartview "https://github.com/rgh-code/nepecom/blob/main/src/components/CartCards.jsx"
click node_checkout "https://github.com/rgh-code/nepecom/blob/main/src/pages/CheckoutPage.jsx"
click node_ordersview "https://github.com/rgh-code/nepecom/blob/main/src/components/Orders.jsx"
click node_login "https://github.com/rgh-code/nepecom/blob/main/src/pages/Login.jsx"
click node_google "https://github.com/rgh-code/nepecom/blob/main/src/components/GoogleSignIn.jsx"
click node_profile "https://github.com/rgh-code/nepecom/blob/main/src/pages/Profile.jsx"
click node_completeprofile "https://github.com/rgh-code/nepecom/blob/main/src/pages/CompleteProfilePage.jsx"
click node_activate "https://github.com/rgh-code/nepecom/blob/main/src/pages/ActivatePage.jsx"
click node_authstate "https://github.com/rgh-code/nepecom/blob/main/src/utils/authentication.js"
click node_cartstate "https://github.com/rgh-code/nepecom/blob/main/src/utils/cartStorage.js"
click node_cartapi "https://github.com/rgh-code/nepecom/blob/main/src/api/carts.js"
click node_productapi "https://github.com/rgh-code/nepecom/blob/main/src/api/products.js"
click node_authapi "https://github.com/rgh-code/nepecom/blob/main/src/api/auth.js"
click node_ordersapi "https://github.com/rgh-code/nepecom/blob/main/src/api/orders.js"
click node_customerapi "https://github.com/rgh-code/nepecom/blob/main/src/api/customers.js"
click node_addressapi "https://github.com/rgh-code/nepecom/blob/main/src/api/address.js"
click node_http "https://github.com/rgh-code/nepecom/blob/main/src/api/axios.js"
click node_uicomponents "https://github.com/rgh-code/nepecom/blob/main/src/components/ui/button.jsx"
click node_cardui "https://github.com/rgh-code/nepecom/blob/main/src/components/ui/card.jsx"
click node_inputui "https://github.com/rgh-code/nepecom/blob/main/src/components/ui/input.jsx"

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_navbar,node_home,node_catalog,node_search,node_deals,node_wishlist,node_membership,node_grid,node_productcard,node_details toneBlue
class node_cartview,node_checkout,node_ordersview toneAmber
class node_login,node_google,node_profile,node_completeprofile,node_activate toneMint
class node_authstate,node_cartstate,node_cartapi,node_productapi,node_authapi,node_ordersapi,node_customerapi,node_addressapi,node_http,node_browserstore toneRose
class node_uicomponents,node_cardui,node_inputui,node_shopper,node_backend toneIndigo
```

## Components

### Storefront

- [Route App](https://github.com/rgh-code/nepecom/blob/main/src/App.jsx): `src/App.jsx`
- [Navigation](https://github.com/rgh-code/nepecom/blob/main/src/components/Navbar.jsx): `src/components/Navbar.jsx`
- [Home](https://github.com/rgh-code/nepecom/blob/main/src/pages/Home.jsx): `src/pages/Home.jsx`
- [Catalog Pages](https://github.com/rgh-code/nepecom/blob/main/src/pages/collections.jsx): `src/pages/collections.jsx`
- [Search](https://github.com/rgh-code/nepecom/blob/main/src/pages/SearchPage.jsx): `src/pages/SearchPage.jsx`
- [Deals and Arrivals](https://github.com/rgh-code/nepecom/blob/main/src/pages/DealsPage.jsx): `src/pages/DealsPage.jsx`
- [Wishlist](https://github.com/rgh-code/nepecom/blob/main/src/pages/WishListPage.jsx): `src/pages/WishListPage.jsx`
- [Membership](https://github.com/rgh-code/nepecom/blob/main/src/pages/Membership.jsx): `src/pages/Membership.jsx`
- [Product Grid](https://github.com/rgh-code/nepecom/blob/main/src/components/ProductGrid.jsx): `src/components/ProductGrid.jsx`
- [Product Card](https://github.com/rgh-code/nepecom/blob/main/src/components/ProductCard.jsx): `src/components/ProductCard.jsx`
- [Product Details](https://github.com/rgh-code/nepecom/blob/main/src/components/ProductDetails.jsx): `src/components/ProductDetails.jsx`

### Cart and Orders

- [Cart View](https://github.com/rgh-code/nepecom/blob/main/src/components/CartCards.jsx): `src/components/CartCards.jsx`
- [Checkout](https://github.com/rgh-code/nepecom/blob/main/src/pages/CheckoutPage.jsx): `src/pages/CheckoutPage.jsx`
- [Order History](https://github.com/rgh-code/nepecom/blob/main/src/components/Orders.jsx): `src/components/Orders.jsx`

### Accounts

- [Login and Signup](https://github.com/rgh-code/nepecom/blob/main/src/pages/Login.jsx): `src/pages/Login.jsx`
- [Google Sign-In](https://github.com/rgh-code/nepecom/blob/main/src/components/GoogleSignIn.jsx): `src/components/GoogleSignIn.jsx`
- [Profile](https://github.com/rgh-code/nepecom/blob/main/src/pages/Profile.jsx): `src/pages/Profile.jsx`
- [Complete Profile](https://github.com/rgh-code/nepecom/blob/main/src/pages/CompleteProfilePage.jsx): `src/pages/CompleteProfilePage.jsx`
- [Account Activation](https://github.com/rgh-code/nepecom/blob/main/src/pages/ActivatePage.jsx): `src/pages/ActivatePage.jsx`

### API and State

- [Auth Check](https://github.com/rgh-code/nepecom/blob/main/src/utils/authentication.js): `src/utils/authentication.js`
- [Cart ID State](https://github.com/rgh-code/nepecom/blob/main/src/utils/cartStorage.js): `src/utils/cartStorage.js`
- [Cart API](https://github.com/rgh-code/nepecom/blob/main/src/api/carts.js): `src/api/carts.js`
- [Product API](https://github.com/rgh-code/nepecom/blob/main/src/api/products.js): `src/api/products.js`
- [Auth API](https://github.com/rgh-code/nepecom/blob/main/src/api/auth.js): `src/api/auth.js`
- [Orders API](https://github.com/rgh-code/nepecom/blob/main/src/api/orders.js): `src/api/orders.js`
- [Customer API](https://github.com/rgh-code/nepecom/blob/main/src/api/customers.js): `src/api/customers.js`
- [Address API](https://github.com/rgh-code/nepecom/blob/main/src/api/address.js): `src/api/address.js`
- [HTTP Client](https://github.com/rgh-code/nepecom/blob/main/src/api/axios.js): `src/api/axios.js`
- **Browser Storage**

### UI Components

- [UI Primitives](https://github.com/rgh-code/nepecom/blob/main/src/components/ui/button.jsx): `src/components/ui/button.jsx`
- [Card Primitives](https://github.com/rgh-code/nepecom/blob/main/src/components/ui/card.jsx): `src/components/ui/card.jsx`
- [Input Primitive](https://github.com/rgh-code/nepecom/blob/main/src/components/ui/input.jsx): `src/components/ui/input.jsx`

### Other components

- **Shopper**
- **Store Backend**

## Connections

- Shopper → Route App: opens storefront (evidence: `src/App.jsx`)
- Route App → Navigation: renders navigation (evidence: `src/App.jsx`)
- Route App → Home: routes to (evidence: `src/App.jsx`)
- Route App → Catalog Pages: routes to (evidence: `src/App.jsx`)
- Route App → Search: routes to (evidence: `src/App.jsx`)
- Route App → Deals and Arrivals: routes to (evidence: `src/App.jsx`)
- Route App → Wishlist: routes to (evidence: `src/App.jsx`)
- Route App → Membership: routes to (evidence: `src/App.jsx`)
- Route App → Product Grid: routes to (evidence: `src/App.jsx`)
- Route App → Product Details: routes to (evidence: `src/App.jsx`)
- Route App → Cart View: routes to (evidence: `src/App.jsx`)
- Route App → Checkout: routes to (evidence: `src/App.jsx`)
- Route App → Order History: routes to (evidence: `src/App.jsx`)
- Route App → Login and Signup: routes to (evidence: `src/App.jsx`)
- Route App → Profile: routes to (evidence: `src/App.jsx`)
- Route App → Complete Profile: routes to (evidence: `src/App.jsx`)
- Route App → Account Activation: routes to (evidence: `src/App.jsx`)
- Home → Product Grid: renders (evidence: `src/pages/Home.jsx`)
- Catalog Pages → Product Grid: renders (evidence: `src/pages/collections.jsx`)
- Search → Product API: fetches products (evidence: `src/pages/SearchPage.jsx`)
- Search → Product Card: renders results (evidence: `src/pages/SearchPage.jsx`)
- Product Grid → Product API: fetches products (evidence: `src/components/ProductGrid.jsx`)
- Product Grid → Product Card: renders items (evidence: `src/components/ProductGrid.jsx`)
- Product Card → Cart API: adds items (evidence: `src/components/ProductCard.jsx`)
- Product Card → Cart ID State: reads and sets ID (evidence: `src/components/ProductCard.jsx`)
- Product Card → Auth Check: checks sign-in (evidence: `src/components/ProductCard.jsx`)
- Product Card → HTTP Client: checks customer details (evidence: `src/components/ProductCard.jsx`)
- Product Details → Product API: loads product (evidence: `src/components/ProductDetails.jsx`)
- Product Details → Cart API: adds items (evidence: `src/components/ProductDetails.jsx`)
- Product Details → Cart ID State: reads and sets ID (evidence: `src/components/ProductDetails.jsx`)
- Product Details → Auth Check: checks sign-in (evidence: `src/components/ProductDetails.jsx`)
- Product Details → HTTP Client: checks customer details (evidence: `src/components/ProductDetails.jsx`)
- Cart View → Cart API: reads cart (evidence: `src/components/CartCards.jsx`)
- Cart View → Cart ID State: reads cart ID (evidence: `src/components/CartCards.jsx`)
- Checkout → Cart API: loads cart (evidence: `src/pages/CheckoutPage.jsx`)
- Checkout → Orders API: creates order (evidence: `src/pages/CheckoutPage.jsx`)
- Checkout → Auth API: loads profile (evidence: `src/pages/CheckoutPage.jsx`)
- Checkout → Customer API: loads customer (evidence: `src/pages/CheckoutPage.jsx`)
- Checkout → Address API: loads address (evidence: `src/pages/CheckoutPage.jsx`)
- Checkout → Auth Check: checks sign-in (evidence: `src/pages/CheckoutPage.jsx`)
- Order History → Orders API: loads orders (evidence: `src/components/Orders.jsx`)
- Order History → Auth Check: checks sign-in (evidence: `src/components/Orders.jsx`)
- Login and Signup → Auth API: authenticates (evidence: `src/pages/Login.jsx`)
- Login and Signup → Google Sign-In: offers sign-in (evidence: `src/pages/Login.jsx`)
- Google Sign-In → HTTP Client: uses client (evidence: `src/components/GoogleSignIn.jsx`)
- Profile → Auth API: loads profile (evidence: `src/pages/Profile.jsx`)
- Complete Profile → Auth API: updates account (evidence: `src/pages/CompleteProfilePage.jsx`)
- Complete Profile → Customer API: loads customer (evidence: `src/pages/CompleteProfilePage.jsx`)
