# nihaltiwari01/anytime architecture

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

- Interactive diagram: https://gitdiagram.com/nihaltiwari01/anytime
- Repository: https://github.com/nihaltiwari01/anytime

## Overview

GoCart is a Next.js multi-vendor commerce application with customer storefront, vendor tools, and an administrator panel. The customer path is product discovery, cart review, and order viewing; vendors submit stores and manage products and orders, while admins oversee stores and platform metrics. Sampled pages currently use dummy data or contain placeholder business logic, so the graph shows the documented product scope without implying a functioning backend. Some unsampled features are included from the README and tree; those relationships are documented rather than source-verified.

Main entry points: [`app/(public)/cart/page.jsx`](https://github.com/nihaltiwari01/anytime/blob/main/app/(public)/cart/page.jsx) (Cart Review), [`app/(public)/page.jsx`](https://github.com/nihaltiwari01/anytime/blob/main/app/(public)/page.jsx) (Home Discovery), [`lib/store.js`](https://github.com/nihaltiwari01/anytime/blob/main/lib/store.js) (Redux Store), [`app/(public)/orders/page.jsx`](https://github.com/nihaltiwari01/anytime/blob/main/app/(public)/orders/page.jsx) (Order History)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_storefront["Customer Storefront"]
  node_home["Home Discovery<br/>[page.jsx]"]
  node_catalog["Product Catalog<br/>[page.jsx]"]
  node_storefronts["Vendor Storefronts<br/>[page.jsx]"]
  node_product["Product Details<br/>[page.jsx]"]
  node_cart["Cart Review<br/>[page.jsx]"]
  node_cart_ui["Cart Controls<br/>[Counter.jsx]"]
  node_summary["Order Summary<br/>[OrderSummary.jsx]"]
  node_orders["Order History<br/>[page.jsx]"]
  node_order_item["Order Display<br/>[OrderItem.jsx]"]
  node_page_title["Page Heading<br/>[PageTitle.jsx]"]
  node_best_selling["Best Sellers<br/>[BestSelling.jsx]"]
  node_hero["Storefront Hero<br/>[Hero.jsx]"]
  node_latest["Latest Products<br/>[LatestProducts.jsx]"]
  node_newsletter["Newsletter<br/>[Newsletter.jsx]"]
end

subgraph group_vendor["Vendor Workspace"]
  node_store_signup["Store Application<br/>[page.jsx]"]
  node_vendor_dashboard["Sales Dashboard<br/>[page.jsx]"]
  node_add_product["Product Creation<br/>[page.jsx]"]
  node_manage_product["Product Management<br/>[page.jsx]"]
  node_vendor_orders["Order Management<br/>[page.jsx]"]
end

subgraph group_admin["Admin Console"]
  node_admin_dashboard["Platform Dashboard<br/>[page.jsx]"]
  node_analytics["Orders Analytics"]
  node_store_review["Store Oversight<br/>[page.jsx]"]
  node_store_info["Store Information<br/>[StoreInfo.jsx]"]
  node_approval["Vendor Approval<br/>[page.jsx]"]
  node_coupons["Coupon Management<br/>[page.jsx]"]
end

subgraph group_state["Client State"]
  node_state_store["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]"]
  node_provider["Store Provider<br/>[StoreProvider.js]"]
end

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

node_customer -->|"browses"| node_home
node_customer -->|"browses"| node_catalog
node_customer -->|"shops"| node_storefronts
node_customer -->|"views"| node_product
node_customer -.->|"reviews cart"| node_cart
node_cart -->|"reads and dispatches"| node_cart_state
node_cart -->|"reads products"| node_product_state
node_cart -->|"renders"| node_cart_ui
node_cart -->|"renders"| node_summary
node_cart -->|"renders"| node_page_title
node_customer -.->|"views orders"| node_orders
node_orders -->|"renders"| node_order_item
node_orders -->|"renders"| node_page_title
node_vendor -->|"applies"| node_store_signup
node_vendor -->|"views sales"| node_vendor_dashboard
node_vendor -->|"manages products"| node_add_product
node_vendor -->|"manages products"| node_manage_product
node_vendor -->|"tracks orders"| node_vendor_orders
node_admin -->|"oversees platform"| node_admin_dashboard
node_admin_dashboard -->|"renders chart"| node_analytics
node_admin -->|"oversees stores"| node_store_review
node_store_review -->|"renders"| node_store_info
node_admin -->|"reviews vendors"| node_approval
node_admin -.->|"manages coupons"| node_coupons
node_provider -->|"provides"| node_state_store
node_state_store -->|"registers reducer"| node_cart_state
node_state_store -->|"registers reducer"| node_product_state
node_state_store -->|"registers reducer"| node_address_state
node_state_store -->|"registers reducer"| node_rating_state
node_home -->|"renders"| node_hero
node_home -->|"renders"| node_latest
node_home -->|"renders"| node_best_selling
node_home -->|"renders"| node_newsletter

click node_home "https://github.com/nihaltiwari01/anytime/blob/main/app/(public)/page.jsx"
click node_catalog "https://github.com/nihaltiwari01/anytime/blob/main/app/(public)/shop/page.jsx"
click node_storefronts "https://github.com/nihaltiwari01/anytime/blob/main/app/(public)/shop/%5Busername%5D/page.jsx"
click node_product "https://github.com/nihaltiwari01/anytime/blob/main/app/(public)/product/%5BproductId%5D/page.jsx"
click node_cart "https://github.com/nihaltiwari01/anytime/blob/main/app/(public)/cart/page.jsx"
click node_cart_ui "https://github.com/nihaltiwari01/anytime/blob/main/components/Counter.jsx"
click node_summary "https://github.com/nihaltiwari01/anytime/blob/main/components/OrderSummary.jsx"
click node_orders "https://github.com/nihaltiwari01/anytime/blob/main/app/(public)/orders/page.jsx"
click node_order_item "https://github.com/nihaltiwari01/anytime/blob/main/components/OrderItem.jsx"
click node_store_signup "https://github.com/nihaltiwari01/anytime/blob/main/app/(public)/create-store/page.jsx"
click node_vendor_dashboard "https://github.com/nihaltiwari01/anytime/blob/main/app/store/page.jsx"
click node_add_product "https://github.com/nihaltiwari01/anytime/blob/main/app/store/add-product/page.jsx"
click node_manage_product "https://github.com/nihaltiwari01/anytime/blob/main/app/store/manage-product/page.jsx"
click node_vendor_orders "https://github.com/nihaltiwari01/anytime/blob/main/app/store/orders/page.jsx"
click node_admin_dashboard "https://github.com/nihaltiwari01/anytime/blob/main/app/admin/page.jsx"
click node_analytics "https://github.com/nihaltiwari01/anytime/blob/main/components/OrdersAreaChart.jsx"
click node_store_review "https://github.com/nihaltiwari01/anytime/blob/main/app/admin/stores/page.jsx"
click node_store_info "https://github.com/nihaltiwari01/anytime/blob/main/components/admin/StoreInfo.jsx"
click node_approval "https://github.com/nihaltiwari01/anytime/blob/main/app/admin/approve/page.jsx"
click node_coupons "https://github.com/nihaltiwari01/anytime/blob/main/app/admin/coupons/page.jsx"
click node_state_store "https://github.com/nihaltiwari01/anytime/blob/main/lib/store.js"
click node_cart_state "https://github.com/nihaltiwari01/anytime/blob/main/lib/features/cart/cartSlice.js"
click node_product_state "https://github.com/nihaltiwari01/anytime/blob/main/lib/features/product/productSlice.js"
click node_address_state "https://github.com/nihaltiwari01/anytime/blob/main/lib/features/address/addressSlice.js"
click node_rating_state "https://github.com/nihaltiwari01/anytime/blob/main/lib/features/rating/ratingSlice.js"
click node_provider "https://github.com/nihaltiwari01/anytime/blob/main/app/StoreProvider.js"
click node_page_title "https://github.com/nihaltiwari01/anytime/blob/main/components/PageTitle.jsx"
click node_best_selling "https://github.com/nihaltiwari01/anytime/blob/main/components/BestSelling.jsx"
click node_hero "https://github.com/nihaltiwari01/anytime/blob/main/components/Hero.jsx"
click node_latest "https://github.com/nihaltiwari01/anytime/blob/main/components/LatestProducts.jsx"
click node_newsletter "https://github.com/nihaltiwari01/anytime/blob/main/components/Newsletter.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_catalog,node_storefronts,node_product,node_cart,node_cart_ui,node_summary,node_orders,node_order_item,node_page_title,node_best_selling,node_hero,node_latest,node_newsletter toneBlue
class node_store_signup,node_vendor_dashboard,node_add_product,node_manage_product,node_vendor_orders toneAmber
class node_admin_dashboard,node_analytics,node_store_review,node_store_info,node_approval,node_coupons toneMint
class node_state_store,node_cart_state,node_product_state,node_address_state,node_rating_state,node_provider toneRose
class node_customer,node_vendor,node_admin toneIndigo
```

## Components

### Customer Storefront

- [Home Discovery](https://github.com/nihaltiwari01/anytime/blob/main/app/(public)/page.jsx): `app/(public)/page.jsx`
- [Product Catalog](https://github.com/nihaltiwari01/anytime/blob/main/app/(public)/shop/page.jsx): `app/(public)/shop/page.jsx`
- [Vendor Storefronts](https://github.com/nihaltiwari01/anytime/blob/main/app/(public)/shop/%5Busername%5D/page.jsx): `app/(public)/shop/[username]/page.jsx`
- [Product Details](https://github.com/nihaltiwari01/anytime/blob/main/app/(public)/product/%5BproductId%5D/page.jsx): `app/(public)/product/[productId]/page.jsx`
- [Cart Review](https://github.com/nihaltiwari01/anytime/blob/main/app/(public)/cart/page.jsx): `app/(public)/cart/page.jsx`
- [Cart Controls](https://github.com/nihaltiwari01/anytime/blob/main/components/Counter.jsx): `components/Counter.jsx`
- [Order Summary](https://github.com/nihaltiwari01/anytime/blob/main/components/OrderSummary.jsx): `components/OrderSummary.jsx`
- [Order History](https://github.com/nihaltiwari01/anytime/blob/main/app/(public)/orders/page.jsx): `app/(public)/orders/page.jsx`
- [Order Display](https://github.com/nihaltiwari01/anytime/blob/main/components/OrderItem.jsx): `components/OrderItem.jsx`
- [Page Heading](https://github.com/nihaltiwari01/anytime/blob/main/components/PageTitle.jsx): `components/PageTitle.jsx`
- [Best Sellers](https://github.com/nihaltiwari01/anytime/blob/main/components/BestSelling.jsx): `components/BestSelling.jsx`
- [Storefront Hero](https://github.com/nihaltiwari01/anytime/blob/main/components/Hero.jsx): `components/Hero.jsx`
- [Latest Products](https://github.com/nihaltiwari01/anytime/blob/main/components/LatestProducts.jsx): `components/LatestProducts.jsx`
- [Newsletter](https://github.com/nihaltiwari01/anytime/blob/main/components/Newsletter.jsx): `components/Newsletter.jsx`

### Vendor Workspace

- [Store Application](https://github.com/nihaltiwari01/anytime/blob/main/app/(public)/create-store/page.jsx): `app/(public)/create-store/page.jsx`
- [Sales Dashboard](https://github.com/nihaltiwari01/anytime/blob/main/app/store/page.jsx): `app/store/page.jsx`
- [Product Creation](https://github.com/nihaltiwari01/anytime/blob/main/app/store/add-product/page.jsx): `app/store/add-product/page.jsx`
- [Product Management](https://github.com/nihaltiwari01/anytime/blob/main/app/store/manage-product/page.jsx): `app/store/manage-product/page.jsx`
- [Order Management](https://github.com/nihaltiwari01/anytime/blob/main/app/store/orders/page.jsx): `app/store/orders/page.jsx`

### Admin Console

- [Platform Dashboard](https://github.com/nihaltiwari01/anytime/blob/main/app/admin/page.jsx): `app/admin/page.jsx`
- [Orders Analytics](https://github.com/nihaltiwari01/anytime/blob/main/components/OrdersAreaChart.jsx): `components/OrdersAreaChart.jsx`
- [Store Oversight](https://github.com/nihaltiwari01/anytime/blob/main/app/admin/stores/page.jsx): `app/admin/stores/page.jsx`
- [Store Information](https://github.com/nihaltiwari01/anytime/blob/main/components/admin/StoreInfo.jsx): `components/admin/StoreInfo.jsx`
- [Vendor Approval](https://github.com/nihaltiwari01/anytime/blob/main/app/admin/approve/page.jsx): `app/admin/approve/page.jsx`
- [Coupon Management](https://github.com/nihaltiwari01/anytime/blob/main/app/admin/coupons/page.jsx): `app/admin/coupons/page.jsx`

### Client State

- [Redux Store](https://github.com/nihaltiwari01/anytime/blob/main/lib/store.js): `lib/store.js`
- [Cart State](https://github.com/nihaltiwari01/anytime/blob/main/lib/features/cart/cartSlice.js): `lib/features/cart/cartSlice.js`
- [Product State](https://github.com/nihaltiwari01/anytime/blob/main/lib/features/product/productSlice.js): `lib/features/product/productSlice.js`
- [Address State](https://github.com/nihaltiwari01/anytime/blob/main/lib/features/address/addressSlice.js): `lib/features/address/addressSlice.js`
- [Rating State](https://github.com/nihaltiwari01/anytime/blob/main/lib/features/rating/ratingSlice.js): `lib/features/rating/ratingSlice.js`
- [Store Provider](https://github.com/nihaltiwari01/anytime/blob/main/app/StoreProvider.js): `app/StoreProvider.js`

### Other components

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

## Connections

- Customer → Home Discovery: browses (evidence: `README.md`)
- Customer → Product Catalog: browses (evidence: `README.md`)
- Customer → Vendor Storefronts: shops (evidence: `README.md`)
- Customer → Product Details: views (evidence: `README.md`)
- Customer → Cart Review: reviews cart
- Cart Review → Cart State: reads and dispatches (evidence: `app/(public)/cart/page.jsx`)
- Cart Review → Product State: reads products (evidence: `app/(public)/cart/page.jsx`)
- Cart Review → Cart Controls: renders (evidence: `app/(public)/cart/page.jsx`)
- Cart Review → Order Summary: renders (evidence: `app/(public)/cart/page.jsx`)
- Cart Review → Page Heading: renders (evidence: `app/(public)/cart/page.jsx`)
- Customer → Order History: views orders
- Order History → Order Display: renders (evidence: `app/(public)/orders/page.jsx`)
- Order History → Page Heading: renders (evidence: `app/(public)/orders/page.jsx`)
- Vendor → Store Application: applies (evidence: `README.md`)
- Vendor → Sales Dashboard: views sales (evidence: `README.md`)
- Vendor → Product Creation: manages products (evidence: `README.md`)
- Vendor → Product Management: manages products (evidence: `README.md`)
- Vendor → Order Management: tracks orders (evidence: `README.md`)
- Administrator → Platform Dashboard: oversees platform (evidence: `README.md`)
- Platform Dashboard → Orders Analytics: renders chart (evidence: `app/admin/page.jsx`)
- Administrator → Store Oversight: oversees stores (evidence: `README.md`)
- Store Oversight → Store Information: renders (evidence: `app/admin/stores/page.jsx`)
- Administrator → Vendor Approval: reviews vendors (evidence: `README.md`)
- Administrator → Coupon Management: manages coupons
- Store Provider → Redux Store: provides
- 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`)
- Home Discovery → Storefront Hero: 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`)
- Home Discovery → Newsletter: renders (evidence: `app/(public)/page.jsx`)
