# errishabhvats-crypto/gocart architecture

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

- Interactive diagram: https://gitdiagram.com/errishabhvats-crypto/gocart
- Repository: https://github.com/errishabhvats-crypto/gocart

## Overview

GoCart is a Next.js multi-vendor commerce storefront with customer, vendor, and administrator interfaces. The customer path is product discovery, product details, cart review, and order viewing; vendor and admin areas provide separate store, product, order, and oversight screens. Redux Toolkit supplies client-side state for cart, products, addresses, and ratings. The repository excerpts show dummy data and placeholder mutation handlers, so they do not establish a live backend or persistent order, payment, or store workflow.

Main entry points: [`components/ProductCard.jsx`](https://github.com/errishabhvats-crypto/gocart/blob/main/components/ProductCard.jsx) (Product Card), [`lib/store.js`](https://github.com/errishabhvats-crypto/gocart/blob/main/lib/store.js) (Redux Store), [`app/(public)/page.jsx`](https://github.com/errishabhvats-crypto/gocart/blob/main/app/(public)/page.jsx) (Home Discovery), [`app/(public)/cart/page.jsx`](https://github.com/errishabhvats-crypto/gocart/blob/main/app/(public)/cart/page.jsx) (Cart Review)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_storefront["Customer Storefront"]
  node_home["Home Discovery<br/>[page.jsx]"]
  node_shop["Store Browsing<br/>[page.jsx]"]
  node_storefront_page["Vendor Storefront<br/>[page.jsx]"]
  node_product_detail["Product Details<br/>[page.jsx]"]
  node_customer_orders["Customer Orders<br/>[page.jsx]"]
end

subgraph group_commerce["Shopping State"]
  node_cart_page["Cart Review<br/>[page.jsx]"]
  node_order_summary["Order Summary<br/>[OrderSummary.jsx]"]
  node_redux["Redux Store<br/>[store.js]"]
  node_cart_state["Cart State<br/>[cartSlice.js]"]
  node_product_state["Product State<br/>[productSlice.js]"]
  node_address_state["Address State<br/>[addressSlice.js]"]
  node_rating_state["Rating State<br/>[ratingSlice.js]"]
end

subgraph group_vendor["Vendor Workspace"]
  node_store_application["Create Store<br/>[page.jsx]"]
  node_vendor_dashboard["Vendor Dashboard<br/>[page.jsx]"]
  node_vendor_products["Product Management<br/>[page.jsx]"]
  node_vendor_manage["Manage Products<br/>[page.jsx]"]
  node_vendor_orders["Vendor Orders<br/>[page.jsx]"]
end

subgraph group_admin["Admin Workspace"]
  node_admin_dashboard["Admin Dashboard<br/>[page.jsx]"]
  node_admin_stores["Store Oversight<br/>[page.jsx]"]
  node_admin_approval["Store Approval<br/>[page.jsx]"]
  node_admin_coupons["Coupon Management<br/>[page.jsx]"]
end

subgraph group_shared["Shared UI"]
  node_hero["Hero Categories<br/>[Hero.jsx]"]
  node_latest["Latest Products<br/>[LatestProducts.jsx]"]
  node_best["Best Sellers<br/>[BestSelling.jsx]"]
  node_product_card["Product Card<br/>[ProductCard.jsx]"]
  node_store_info["Store Information<br/>[StoreInfo.jsx]"]
  node_order_chart["Orders Chart"]
end

node_customer(("Customer"))
node_vendor(("Vendor"))
node_admin_actor(("Administrator"))

node_customer -.->|"browses"| node_home
node_home -->|"renders"| node_hero
node_home -->|"renders"| node_latest
node_home -->|"renders"| node_best
node_latest -->|"renders"| node_product_card
node_best -->|"renders"| node_product_card
node_shop -->|"renders"| node_product_card
node_storefront_page -->|"renders"| node_product_card
node_customer -.->|"browses"| node_shop
node_product_card -->|"links to"| node_product_detail
node_customer -.->|"manages cart"| node_cart_page
node_cart_page -->|"dispatches deletion"| node_cart_state
node_cart_page -->|"reads products"| node_product_state
node_cart_page -->|"renders"| node_order_summary
node_order_summary -.->|"uses address"| node_address_state
node_customer -.->|"views orders"| node_customer_orders
node_redux -->|"registers reducer"| node_cart_state
node_redux -->|"registers reducer"| node_product_state
node_redux -->|"registers reducer"| node_address_state
node_redux -->|"registers reducer"| node_rating_state
node_vendor -.->|"registers store"| node_store_application
node_vendor -.->|"views analytics"| node_vendor_dashboard
node_vendor -.->|"manages products"| node_vendor_products
node_vendor -.->|"manages products"| node_vendor_manage
node_vendor -.->|"tracks orders"| node_vendor_orders
node_admin_actor -.->|"oversees platform"| node_admin_dashboard
node_admin_actor -.->|"oversees stores"| node_admin_stores
node_admin_actor -.->|"reviews stores"| node_admin_approval
node_admin_actor -.->|"manages coupons"| node_admin_coupons
node_admin_dashboard -->|"renders chart"| node_order_chart
node_admin_stores -->|"renders"| node_store_info
node_admin_approval -->|"renders"| node_store_info

click node_home "https://github.com/errishabhvats-crypto/gocart/blob/main/app/(public)/page.jsx"
click node_hero "https://github.com/errishabhvats-crypto/gocart/blob/main/components/Hero.jsx"
click node_latest "https://github.com/errishabhvats-crypto/gocart/blob/main/components/LatestProducts.jsx"
click node_best "https://github.com/errishabhvats-crypto/gocart/blob/main/components/BestSelling.jsx"
click node_shop "https://github.com/errishabhvats-crypto/gocart/blob/main/app/(public)/shop/page.jsx"
click node_storefront_page "https://github.com/errishabhvats-crypto/gocart/blob/main/app/(public)/shop/%5Busername%5D/page.jsx"
click node_product_detail "https://github.com/errishabhvats-crypto/gocart/blob/main/app/(public)/product/%5BproductId%5D/page.jsx"
click node_product_card "https://github.com/errishabhvats-crypto/gocart/blob/main/components/ProductCard.jsx"
click node_cart_page "https://github.com/errishabhvats-crypto/gocart/blob/main/app/(public)/cart/page.jsx"
click node_order_summary "https://github.com/errishabhvats-crypto/gocart/blob/main/components/OrderSummary.jsx"
click node_customer_orders "https://github.com/errishabhvats-crypto/gocart/blob/main/app/(public)/orders/page.jsx"
click node_redux "https://github.com/errishabhvats-crypto/gocart/blob/main/lib/store.js"
click node_cart_state "https://github.com/errishabhvats-crypto/gocart/blob/main/lib/features/cart/cartSlice.js"
click node_product_state "https://github.com/errishabhvats-crypto/gocart/blob/main/lib/features/product/productSlice.js"
click node_address_state "https://github.com/errishabhvats-crypto/gocart/blob/main/lib/features/address/addressSlice.js"
click node_rating_state "https://github.com/errishabhvats-crypto/gocart/blob/main/lib/features/rating/ratingSlice.js"
click node_store_application "https://github.com/errishabhvats-crypto/gocart/blob/main/app/(public)/create-store/page.jsx"
click node_vendor_dashboard "https://github.com/errishabhvats-crypto/gocart/blob/main/app/store/page.jsx"
click node_vendor_products "https://github.com/errishabhvats-crypto/gocart/blob/main/app/store/add-product/page.jsx"
click node_vendor_manage "https://github.com/errishabhvats-crypto/gocart/blob/main/app/store/manage-product/page.jsx"
click node_vendor_orders "https://github.com/errishabhvats-crypto/gocart/blob/main/app/store/orders/page.jsx"
click node_admin_dashboard "https://github.com/errishabhvats-crypto/gocart/blob/main/app/admin/page.jsx"
click node_admin_stores "https://github.com/errishabhvats-crypto/gocart/blob/main/app/admin/stores/page.jsx"
click node_admin_approval "https://github.com/errishabhvats-crypto/gocart/blob/main/app/admin/approve/page.jsx"
click node_admin_coupons "https://github.com/errishabhvats-crypto/gocart/blob/main/app/admin/coupons/page.jsx"
click node_store_info "https://github.com/errishabhvats-crypto/gocart/blob/main/components/admin/StoreInfo.jsx"
click node_order_chart "https://github.com/errishabhvats-crypto/gocart/blob/main/components/OrdersAreaChart.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_home,node_shop,node_storefront_page,node_product_detail,node_customer_orders toneBlue
class node_cart_page,node_order_summary,node_redux,node_cart_state,node_product_state,node_address_state,node_rating_state toneAmber
class node_store_application,node_vendor_dashboard,node_vendor_products,node_vendor_manage,node_vendor_orders toneMint
class node_admin_dashboard,node_admin_stores,node_admin_approval,node_admin_coupons toneRose
class node_hero,node_latest,node_best,node_product_card,node_store_info,node_order_chart,node_customer,node_vendor,node_admin_actor toneIndigo
```

## Components

### Customer Storefront

- [Home Discovery](https://github.com/errishabhvats-crypto/gocart/blob/main/app/(public)/page.jsx): `app/(public)/page.jsx`
- [Store Browsing](https://github.com/errishabhvats-crypto/gocart/blob/main/app/(public)/shop/page.jsx): `app/(public)/shop/page.jsx`
- [Vendor Storefront](https://github.com/errishabhvats-crypto/gocart/blob/main/app/(public)/shop/%5Busername%5D/page.jsx): `app/(public)/shop/[username]/page.jsx`
- [Product Details](https://github.com/errishabhvats-crypto/gocart/blob/main/app/(public)/product/%5BproductId%5D/page.jsx): `app/(public)/product/[productId]/page.jsx`
- [Customer Orders](https://github.com/errishabhvats-crypto/gocart/blob/main/app/(public)/orders/page.jsx): `app/(public)/orders/page.jsx`

### Shopping State

- [Cart Review](https://github.com/errishabhvats-crypto/gocart/blob/main/app/(public)/cart/page.jsx): `app/(public)/cart/page.jsx`
- [Order Summary](https://github.com/errishabhvats-crypto/gocart/blob/main/components/OrderSummary.jsx): `components/OrderSummary.jsx`
- [Redux Store](https://github.com/errishabhvats-crypto/gocart/blob/main/lib/store.js): `lib/store.js`
- [Cart State](https://github.com/errishabhvats-crypto/gocart/blob/main/lib/features/cart/cartSlice.js): `lib/features/cart/cartSlice.js`
- [Product State](https://github.com/errishabhvats-crypto/gocart/blob/main/lib/features/product/productSlice.js): `lib/features/product/productSlice.js`
- [Address State](https://github.com/errishabhvats-crypto/gocart/blob/main/lib/features/address/addressSlice.js): `lib/features/address/addressSlice.js`
- [Rating State](https://github.com/errishabhvats-crypto/gocart/blob/main/lib/features/rating/ratingSlice.js): `lib/features/rating/ratingSlice.js`

### Vendor Workspace

- [Create Store](https://github.com/errishabhvats-crypto/gocart/blob/main/app/(public)/create-store/page.jsx): `app/(public)/create-store/page.jsx`
- [Vendor Dashboard](https://github.com/errishabhvats-crypto/gocart/blob/main/app/store/page.jsx): `app/store/page.jsx`
- [Product Management](https://github.com/errishabhvats-crypto/gocart/blob/main/app/store/add-product/page.jsx): `app/store/add-product/page.jsx`
- [Manage Products](https://github.com/errishabhvats-crypto/gocart/blob/main/app/store/manage-product/page.jsx): `app/store/manage-product/page.jsx`
- [Vendor Orders](https://github.com/errishabhvats-crypto/gocart/blob/main/app/store/orders/page.jsx): `app/store/orders/page.jsx`

### Admin Workspace

- [Admin Dashboard](https://github.com/errishabhvats-crypto/gocart/blob/main/app/admin/page.jsx): `app/admin/page.jsx`
- [Store Oversight](https://github.com/errishabhvats-crypto/gocart/blob/main/app/admin/stores/page.jsx): `app/admin/stores/page.jsx`
- [Store Approval](https://github.com/errishabhvats-crypto/gocart/blob/main/app/admin/approve/page.jsx): `app/admin/approve/page.jsx`
- [Coupon Management](https://github.com/errishabhvats-crypto/gocart/blob/main/app/admin/coupons/page.jsx): `app/admin/coupons/page.jsx`

### Shared UI

- [Hero Categories](https://github.com/errishabhvats-crypto/gocart/blob/main/components/Hero.jsx): `components/Hero.jsx`
- [Latest Products](https://github.com/errishabhvats-crypto/gocart/blob/main/components/LatestProducts.jsx): `components/LatestProducts.jsx`
- [Best Sellers](https://github.com/errishabhvats-crypto/gocart/blob/main/components/BestSelling.jsx): `components/BestSelling.jsx`
- [Product Card](https://github.com/errishabhvats-crypto/gocart/blob/main/components/ProductCard.jsx): `components/ProductCard.jsx`
- [Store Information](https://github.com/errishabhvats-crypto/gocart/blob/main/components/admin/StoreInfo.jsx): `components/admin/StoreInfo.jsx`
- [Orders Chart](https://github.com/errishabhvats-crypto/gocart/blob/main/components/OrdersAreaChart.jsx): `components/OrdersAreaChart.jsx`

### Other components

- **Customer**
- **Vendor**
- **Administrator**

## Connections

- Customer → Home Discovery: browses (evidence: `README.md`)
- Home Discovery → Hero Categories: renders (evidence: `app/(public)/page.jsx`)
- Home Discovery → Latest Products: renders (evidence: `app/(public)/page.jsx`)
- Home Discovery → Best Sellers: renders (evidence: `app/(public)/page.jsx`)
- Latest Products → Product Card: renders (evidence: `components/LatestProducts.jsx`)
- Best Sellers → Product Card: renders (evidence: `components/BestSelling.jsx`)
- Store Browsing → Product Card: renders (evidence: `app/(public)/shop/page.jsx`)
- Vendor Storefront → Product Card: renders (evidence: `app/(public)/shop/[username]/page.jsx`)
- Customer → Store Browsing: browses (evidence: `README.md`)
- Product Card → Product Details: links to (evidence: `components/ProductCard.jsx`)
- Customer → Cart Review: manages cart (evidence: `README.md`)
- Cart Review → Cart State: dispatches deletion (evidence: `app/(public)/cart/page.jsx`)
- Cart Review → Product State: reads products (evidence: `app/(public)/cart/page.jsx`)
- Cart Review → Order Summary: renders (evidence: `app/(public)/cart/page.jsx`)
- Order Summary → Address State: uses address
- Customer → Customer Orders: views orders (evidence: `README.md`)
- Redux Store → Cart State: registers reducer (evidence: `lib/store.js`)
- Redux Store → Product State: registers reducer (evidence: `lib/store.js`)
- Redux Store → Address State: registers reducer (evidence: `lib/store.js`)
- Redux Store → Rating State: registers reducer (evidence: `lib/store.js`)
- Vendor → Create Store: registers store (evidence: `README.md`)
- Vendor → Vendor Dashboard: views analytics (evidence: `README.md`)
- Vendor → Product Management: manages products (evidence: `README.md`)
- Vendor → Manage Products: manages products (evidence: `README.md`)
- Vendor → Vendor Orders: tracks orders (evidence: `README.md`)
- Administrator → Admin Dashboard: oversees platform (evidence: `README.md`)
- Administrator → Store Oversight: oversees stores (evidence: `README.md`)
- Administrator → Store Approval: reviews stores (evidence: `README.md`)
- Administrator → Coupon Management: manages coupons
- Admin Dashboard → Orders Chart: renders chart (evidence: `app/admin/page.jsx`)
- Store Oversight → Store Information: renders (evidence: `app/admin/stores/page.jsx`)
- Store Approval → Store Information: renders (evidence: `app/admin/approve/page.jsx`)
