# gokoolchasmaghar/gk-eyewear architecture

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

- Interactive diagram: https://gitdiagram.com/gokoolchasmaghar/gk-eyewear
- Repository: https://github.com/gokoolchasmaghar/gk-eyewear

## Overview

This is an eyewear e-commerce application: a React storefront and admin interface backed by Django REST modules. The user journey runs from product discovery and detail/reviews through cart, checkout with shipping addresses, and order follow-up; authentication and wishlist/cart state support that journey. Admin pages provide product, category, order, and user management. The README is only the Vite template, so capability coverage comes from the source tree and index. Backend module internals and endpoint routing were not sampled; links to specific backend domains are therefore omitted.

Main entry points: [`src/routes/AppRoutes.jsx`](https://github.com/gokoolchasmaghar/gk-eyewear/blob/main/src/routes/AppRoutes.jsx) (Page routing), [`src/services/api.js`](https://github.com/gokoolchasmaghar/gk-eyewear/blob/main/src/services/api.js) (API client), [`src/App.jsx`](https://github.com/gokoolchasmaghar/gk-eyewear/blob/main/src/App.jsx) (App shell), [`src/pages/Checkout.jsx`](https://github.com/gokoolchasmaghar/gk-eyewear/blob/main/src/pages/Checkout.jsx) (Checkout)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_storefront["Storefront experience"]
  node_app["App shell<br/>[App.jsx]"]
  node_routes["Page routing<br/>[AppRoutes.jsx]"]
  node_catalog["Catalog browsing<br/>[ProductListing.jsx]"]
  node_product["Product details<br/>[ProductDetails.jsx]"]
  node_reviews["Product reviews<br/>[ProductReviews.jsx]"]
  node_home["Home experience<br/>[Home.jsx]"]
  node_demo_catalog["Static product data<br/>[products.js]"]
end

subgraph group_commerce["Commerce state"]
  node_auth["Authentication state<br/>[AuthContext.jsx]"]
  node_cart_state["Cart state<br/>[CartContext.jsx]"]
  node_wishlist_state["Wishlist state"]
  node_cart_page["Cart review<br/>[Cart.jsx]"]
  node_checkout["Checkout<br/>[Checkout.jsx]"]
  node_confirmation["Order confirmation"]
  node_tracking["Order tracking<br/>[TrackOrder.jsx]"]
  node_wishlist_page["Wishlist page<br/>[Wishlist.jsx]"]
  node_api["API client<br/>[api.js]"]
end

subgraph group_admin["Administration"]
  node_admin_dashboard["Admin dashboard<br/>[AdminDashboard.jsx]"]
  node_admin_products["Product management<br/>[AdminProducts.jsx]"]
  node_admin_categories["Category management"]
  node_admin_orders["Order management<br/>[AdminOrders.jsx]"]
  node_admin_users["User management<br/>[AdminUsers.jsx]"]
end

subgraph group_backend["Django services"]
  node_addresses["Shipping addresses<br/>[views.py]"]
  node_orders["Order processing<br/>[views.py]"]
  node_backend_api["Django REST API<br/>[urls.py]"]
  node_backend_products["Product services<br/>[views.py]"]
  node_backend_cart["Cart services<br/>[views.py]"]
  node_backend_wishlist["Wishlist services<br/>[views.py]"]
  node_backend_reviews["Review services<br/>[views.py]"]
  node_backend_users["User services<br/>[views.py]"]
end

node_customer(("Shopper"))

node_customer -->|"navigates"| node_routes
node_app -->|"renders"| node_routes
node_routes -->|"routes to"| node_home
node_routes -->|"routes to"| node_catalog
node_routes -->|"routes to"| node_product
node_routes -->|"routes to"| node_cart_page
node_routes -->|"routes to"| node_checkout
node_routes -->|"routes to"| node_wishlist_page
node_routes -->|"routes to"| node_confirmation
node_routes -->|"routes to"| node_tracking
node_product -->|"renders"| node_reviews
node_app -->|"provides state"| node_auth
node_app -->|"provides state"| node_cart_state
node_app -->|"provides state"| node_wishlist_state
node_cart_page -->|"reads state"| node_cart_state
node_checkout -->|"reads state"| node_cart_state
node_checkout -->|"reads state"| node_auth
node_checkout -->|"requests addresses and orders"| node_api
node_cart_state -->|"calls cart API"| node_api
node_wishlist_state -->|"calls wishlist API"| node_api
node_auth -->|"calls auth API"| node_api
node_reviews -->|"requests reviews"| node_api
node_api -->|"sends REST requests"| node_backend_api
node_routes -->|"routes to"| node_admin_dashboard
node_routes -->|"routes to"| node_admin_products
node_routes -->|"routes to"| node_admin_categories
node_routes -->|"routes to"| node_admin_orders
node_routes -->|"routes to"| node_admin_users

click node_app "https://github.com/gokoolchasmaghar/gk-eyewear/blob/main/src/App.jsx"
click node_routes "https://github.com/gokoolchasmaghar/gk-eyewear/blob/main/src/routes/AppRoutes.jsx"
click node_catalog "https://github.com/gokoolchasmaghar/gk-eyewear/blob/main/src/pages/ProductListing.jsx"
click node_product "https://github.com/gokoolchasmaghar/gk-eyewear/blob/main/src/pages/ProductDetails.jsx"
click node_reviews "https://github.com/gokoolchasmaghar/gk-eyewear/blob/main/src/components/common/ProductReviews.jsx"
click node_home "https://github.com/gokoolchasmaghar/gk-eyewear/blob/main/src/pages/Home.jsx"
click node_demo_catalog "https://github.com/gokoolchasmaghar/gk-eyewear/blob/main/src/data/products.js"
click node_auth "https://github.com/gokoolchasmaghar/gk-eyewear/blob/main/src/context/AuthContext.jsx"
click node_cart_state "https://github.com/gokoolchasmaghar/gk-eyewear/blob/main/src/context/CartContext.jsx"
click node_wishlist_state "https://github.com/gokoolchasmaghar/gk-eyewear/blob/main/src/context/WishlistContext.jsx"
click node_cart_page "https://github.com/gokoolchasmaghar/gk-eyewear/blob/main/src/pages/Cart.jsx"
click node_checkout "https://github.com/gokoolchasmaghar/gk-eyewear/blob/main/src/pages/Checkout.jsx"
click node_addresses "https://github.com/gokoolchasmaghar/gk-eyewear/blob/main/backend/addresses/views.py"
click node_orders "https://github.com/gokoolchasmaghar/gk-eyewear/blob/main/backend/orders/views.py"
click node_confirmation "https://github.com/gokoolchasmaghar/gk-eyewear/blob/main/src/pages/OrderConfirmation.jsx"
click node_tracking "https://github.com/gokoolchasmaghar/gk-eyewear/blob/main/src/pages/TrackOrder.jsx"
click node_wishlist_page "https://github.com/gokoolchasmaghar/gk-eyewear/blob/main/src/pages/Wishlist.jsx"
click node_api "https://github.com/gokoolchasmaghar/gk-eyewear/blob/main/src/services/api.js"
click node_backend_api "https://github.com/gokoolchasmaghar/gk-eyewear/blob/main/backend/config/urls.py"
click node_admin_dashboard "https://github.com/gokoolchasmaghar/gk-eyewear/blob/main/src/pages/AdminDashboard.jsx"
click node_admin_products "https://github.com/gokoolchasmaghar/gk-eyewear/blob/main/src/pages/AdminProducts.jsx"
click node_admin_categories "https://github.com/gokoolchasmaghar/gk-eyewear/blob/main/src/pages/AdminCategories.jsx"
click node_admin_orders "https://github.com/gokoolchasmaghar/gk-eyewear/blob/main/src/pages/AdminOrders.jsx"
click node_admin_users "https://github.com/gokoolchasmaghar/gk-eyewear/blob/main/src/pages/AdminUsers.jsx"
click node_backend_products "https://github.com/gokoolchasmaghar/gk-eyewear/blob/main/backend/products/views.py"
click node_backend_cart "https://github.com/gokoolchasmaghar/gk-eyewear/blob/main/backend/cart/views.py"
click node_backend_wishlist "https://github.com/gokoolchasmaghar/gk-eyewear/blob/main/backend/wishlist/views.py"
click node_backend_reviews "https://github.com/gokoolchasmaghar/gk-eyewear/blob/main/backend/reviews/views.py"
click node_backend_users "https://github.com/gokoolchasmaghar/gk-eyewear/blob/main/backend/users/views.py"

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_routes,node_catalog,node_product,node_reviews,node_home,node_demo_catalog toneBlue
class node_auth,node_cart_state,node_wishlist_state,node_cart_page,node_checkout,node_confirmation,node_tracking,node_wishlist_page,node_api toneAmber
class node_admin_dashboard,node_admin_products,node_admin_categories,node_admin_orders,node_admin_users toneMint
class node_addresses,node_orders,node_backend_api,node_backend_products,node_backend_cart,node_backend_wishlist,node_backend_reviews,node_backend_users toneRose
class node_customer toneIndigo
```

## Components

### Storefront experience

- [App shell](https://github.com/gokoolchasmaghar/gk-eyewear/blob/main/src/App.jsx): `src/App.jsx`
- [Page routing](https://github.com/gokoolchasmaghar/gk-eyewear/blob/main/src/routes/AppRoutes.jsx): `src/routes/AppRoutes.jsx`
- [Catalog browsing](https://github.com/gokoolchasmaghar/gk-eyewear/blob/main/src/pages/ProductListing.jsx): `src/pages/ProductListing.jsx`
- [Product details](https://github.com/gokoolchasmaghar/gk-eyewear/blob/main/src/pages/ProductDetails.jsx): `src/pages/ProductDetails.jsx`
- [Product reviews](https://github.com/gokoolchasmaghar/gk-eyewear/blob/main/src/components/common/ProductReviews.jsx): `src/components/common/ProductReviews.jsx`
- [Home experience](https://github.com/gokoolchasmaghar/gk-eyewear/blob/main/src/pages/Home.jsx): `src/pages/Home.jsx`
- [Static product data](https://github.com/gokoolchasmaghar/gk-eyewear/blob/main/src/data/products.js): `src/data/products.js`

### Commerce state

- [Authentication state](https://github.com/gokoolchasmaghar/gk-eyewear/blob/main/src/context/AuthContext.jsx): `src/context/AuthContext.jsx`
- [Cart state](https://github.com/gokoolchasmaghar/gk-eyewear/blob/main/src/context/CartContext.jsx): `src/context/CartContext.jsx`
- [Wishlist state](https://github.com/gokoolchasmaghar/gk-eyewear/blob/main/src/context/WishlistContext.jsx): `src/context/WishlistContext.jsx`
- [Cart review](https://github.com/gokoolchasmaghar/gk-eyewear/blob/main/src/pages/Cart.jsx): `src/pages/Cart.jsx`
- [Checkout](https://github.com/gokoolchasmaghar/gk-eyewear/blob/main/src/pages/Checkout.jsx): `src/pages/Checkout.jsx`
- [Order confirmation](https://github.com/gokoolchasmaghar/gk-eyewear/blob/main/src/pages/OrderConfirmation.jsx): `src/pages/OrderConfirmation.jsx`
- [Order tracking](https://github.com/gokoolchasmaghar/gk-eyewear/blob/main/src/pages/TrackOrder.jsx): `src/pages/TrackOrder.jsx`
- [Wishlist page](https://github.com/gokoolchasmaghar/gk-eyewear/blob/main/src/pages/Wishlist.jsx): `src/pages/Wishlist.jsx`
- [API client](https://github.com/gokoolchasmaghar/gk-eyewear/blob/main/src/services/api.js): `src/services/api.js`

### Administration

- [Admin dashboard](https://github.com/gokoolchasmaghar/gk-eyewear/blob/main/src/pages/AdminDashboard.jsx): `src/pages/AdminDashboard.jsx`
- [Product management](https://github.com/gokoolchasmaghar/gk-eyewear/blob/main/src/pages/AdminProducts.jsx): `src/pages/AdminProducts.jsx`
- [Category management](https://github.com/gokoolchasmaghar/gk-eyewear/blob/main/src/pages/AdminCategories.jsx): `src/pages/AdminCategories.jsx`
- [Order management](https://github.com/gokoolchasmaghar/gk-eyewear/blob/main/src/pages/AdminOrders.jsx): `src/pages/AdminOrders.jsx`
- [User management](https://github.com/gokoolchasmaghar/gk-eyewear/blob/main/src/pages/AdminUsers.jsx): `src/pages/AdminUsers.jsx`

### Django services

- [Shipping addresses](https://github.com/gokoolchasmaghar/gk-eyewear/blob/main/backend/addresses/views.py): `backend/addresses/views.py`
- [Order processing](https://github.com/gokoolchasmaghar/gk-eyewear/blob/main/backend/orders/views.py): `backend/orders/views.py`
- [Django REST API](https://github.com/gokoolchasmaghar/gk-eyewear/blob/main/backend/config/urls.py): `backend/config/urls.py`
- [Product services](https://github.com/gokoolchasmaghar/gk-eyewear/blob/main/backend/products/views.py): `backend/products/views.py`
- [Cart services](https://github.com/gokoolchasmaghar/gk-eyewear/blob/main/backend/cart/views.py): `backend/cart/views.py`
- [Wishlist services](https://github.com/gokoolchasmaghar/gk-eyewear/blob/main/backend/wishlist/views.py): `backend/wishlist/views.py`
- [Review services](https://github.com/gokoolchasmaghar/gk-eyewear/blob/main/backend/reviews/views.py): `backend/reviews/views.py`
- [User services](https://github.com/gokoolchasmaghar/gk-eyewear/blob/main/backend/users/views.py): `backend/users/views.py`

### Other components

- **Shopper**

## Connections

- Shopper → Page routing: navigates (evidence: `src/routes/AppRoutes.jsx`)
- App shell → Page routing: renders (evidence: `src/App.jsx`)
- Page routing → Home experience: routes to (evidence: `src/routes/AppRoutes.jsx`)
- Page routing → Catalog browsing: routes to (evidence: `src/routes/AppRoutes.jsx`)
- Page routing → Product details: routes to (evidence: `src/routes/AppRoutes.jsx`)
- Page routing → Cart review: routes to (evidence: `src/routes/AppRoutes.jsx`)
- Page routing → Checkout: routes to (evidence: `src/routes/AppRoutes.jsx`)
- Page routing → Wishlist page: routes to (evidence: `src/routes/AppRoutes.jsx`)
- Page routing → Order confirmation: routes to (evidence: `src/routes/AppRoutes.jsx`)
- Page routing → Order tracking: routes to (evidence: `src/routes/AppRoutes.jsx`)
- Product details → Product reviews: renders (evidence: `src/pages/ProductDetails.jsx`)
- App shell → Authentication state: provides state (evidence: `src/App.jsx`)
- App shell → Cart state: provides state (evidence: `src/App.jsx`)
- App shell → Wishlist state: provides state (evidence: `src/App.jsx`)
- Cart review → Cart state: reads state (evidence: `src/pages/Cart.jsx`)
- Checkout → Cart state: reads state (evidence: `src/pages/Checkout.jsx`)
- Checkout → Authentication state: reads state (evidence: `src/pages/Checkout.jsx`)
- Checkout → API client: requests addresses and orders (evidence: `src/pages/Checkout.jsx`)
- Cart state → API client: calls cart API (evidence: `src/context/CartContext.jsx`)
- Wishlist state → API client: calls wishlist API (evidence: `src/context/WishlistContext.jsx`)
- Authentication state → API client: calls auth API (evidence: `src/context/AuthContext.jsx`)
- Product reviews → API client: requests reviews (evidence: `src/components/common/ProductReviews.jsx`)
- API client → Django REST API: sends REST requests (evidence: `src/services/api.js`)
- Page routing → Admin dashboard: routes to (evidence: `src/routes/AppRoutes.jsx`)
- Page routing → Product management: routes to (evidence: `src/routes/AppRoutes.jsx`)
- Page routing → Category management: routes to (evidence: `src/routes/AppRoutes.jsx`)
- Page routing → Order management: routes to (evidence: `src/routes/AppRoutes.jsx`)
- Page routing → User management: routes to (evidence: `src/routes/AppRoutes.jsx`)
