# anjalikumawat2227-beep/full architecture

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

- Interactive diagram: https://gitdiagram.com/anjalikumawat2227-beep/full
- Repository: https://github.com/anjalikumawat2227-beep/full

## Overview

This is a role-based shopping application: users register or log in, then enter buyer or seller areas. Buyers can browse products, view cart and order pages; sellers can create, edit, and manage products, including image uploads. The sampled backend implements authentication and product operations, while the tree identifies additional client pages and API modules. Some route handlers, client API implementations, cart/order behavior, and database configuration were not sampled, so their internal connections are left unspecified.

Main entry points: [`client/src/app/routes/AppRoutes.jsx`](https://github.com/anjalikumawat2227-beep/full/blob/main/client/src/app/routes/AppRoutes.jsx) (App routes), [`client/src/app/routes/buyerRoutes.jsx`](https://github.com/anjalikumawat2227-beep/full/blob/main/client/src/app/routes/buyerRoutes.jsx) (Buyer routes), [`client/src/app/routes/sellerRoutes.jsx`](https://github.com/anjalikumawat2227-beep/full/blob/main/client/src/app/routes/sellerRoutes.jsx) (Seller routes), [`server/src/app/app.js`](https://github.com/anjalikumawat2227-beep/full/blob/main/server/src/app/app.js) (Express app)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client_app["Client app"]
  node_app_entry["Client entry<br/>[main.jsx]"]
  node_app_routes["App routes<br/>[AppRoutes.jsx]"]
  node_buyer_routes["Buyer routes<br/>[buyerRoutes.jsx]"]
  node_seller_routes["Seller routes<br/>[sellerRoutes.jsx]"]
end

subgraph group_authentication["Authentication"]
  node_auth_ui["Login and register<br/>[Login.jsx]"]
  node_auth_hook["Auth hook<br/>[useAuth.js]"]
  node_auth_actions["Auth actions<br/>[authAction.jsx]"]
  node_auth_state["Auth state<br/>[auth.slice.jsx]"]
end

subgraph group_buyer["Buyer experience"]
  node_buyer_products["Product browsing<br/>[Products.jsx]"]
  node_buyer_home["Home page<br/>[Home.jsx]"]
  node_buyer_hook["Buyer hook<br/>[useBuyerHook.js]"]
  node_buyer_api["Product API<br/>[product.api.js]"]
  node_cart["Cart page<br/>[Cart.jsx]"]
  node_orders["Orders page<br/>[Oderes.jsx]"]
end

subgraph group_seller["Seller experience"]
  node_seller_dashboard["Seller dashboard<br/>[DasBoard.jsx]"]
  node_seller_products["My products<br/>[MyProducts.jsx]"]
  node_seller_form["Product editor<br/>[AddProducts.jsx]"]
  node_seller_hook["Seller hook<br/>[useSeller.js]"]
  node_seller_api["Seller product API<br/>[sellProductApi.js]"]
end

subgraph group_backend["Backend"]
  node_server_entry["Server startup<br/>[server.js]"]
  node_server_app["Express app<br/>[app.js]"]
  node_auth_router["Auth routes<br/>[auth.route.js]"]
  node_product_router["Product routes<br/>[product.route.js]"]
  node_auth_controller["Auth operations<br/>[auth.controller.js]"]
  node_product_controller["Product operations"]
  node_user_model[("User records<br/>[user.model.js]")]
  node_product_model[("Product records<br/>[products.module.js]")]
  node_image_storage["Image storage<br/>[storage.service.js]"]
end

node_shopper(("Shopper"))
node_seller_actor(("Seller"))
node_imagekit["ImageKit"]

node_app_entry -->|"renders"| node_app_routes
node_app_routes -->|"dispatches session lookup"| node_auth_actions
node_app_routes -->|"selects buyer routes"| node_buyer_routes
node_app_routes -->|"selects seller routes"| node_seller_routes
node_buyer_routes -->|"routes to"| node_buyer_products
node_buyer_routes -->|"routes to"| node_cart
node_buyer_routes -->|"routes to"| node_orders
node_seller_routes -->|"routes to"| node_seller_dashboard
node_seller_routes -->|"routes to"| node_seller_products
node_seller_routes -->|"routes to"| node_seller_form
node_buyer_products -->|"serves"| node_shopper
node_seller_dashboard -->|"serves"| node_seller_actor
node_seller_products -->|"serves"| node_seller_actor
node_seller_form -->|"serves"| node_seller_actor
node_buyer_hook -->|"calls"| node_buyer_api
node_seller_hook -->|"calls"| node_seller_api
node_server_entry -->|"starts"| node_server_app
node_server_app -->|"mounts"| node_auth_router
node_server_app -->|"mounts"| node_product_router
node_auth_controller -->|"reads and writes"| node_user_model
node_product_controller -->|"reads and writes"| node_product_model
node_product_controller -->|"uploads images"| node_image_storage
node_image_storage -->|"uploads files"| node_imagekit

click node_app_entry "https://github.com/anjalikumawat2227-beep/full/blob/main/client/src/main.jsx"
click node_app_routes "https://github.com/anjalikumawat2227-beep/full/blob/main/client/src/app/routes/AppRoutes.jsx"
click node_buyer_routes "https://github.com/anjalikumawat2227-beep/full/blob/main/client/src/app/routes/buyerRoutes.jsx"
click node_seller_routes "https://github.com/anjalikumawat2227-beep/full/blob/main/client/src/app/routes/sellerRoutes.jsx"
click node_auth_ui "https://github.com/anjalikumawat2227-beep/full/blob/main/client/src/feature/auth/ui/pages/Login.jsx"
click node_auth_hook "https://github.com/anjalikumawat2227-beep/full/blob/main/client/src/feature/auth/hooks/useAuth.js"
click node_auth_actions "https://github.com/anjalikumawat2227-beep/full/blob/main/client/src/feature/auth/state/authAction.jsx"
click node_auth_state "https://github.com/anjalikumawat2227-beep/full/blob/main/client/src/feature/auth/state/auth.slice.jsx"
click node_buyer_products "https://github.com/anjalikumawat2227-beep/full/blob/main/client/src/feature/userBoard/ui/pages/Products.jsx"
click node_buyer_home "https://github.com/anjalikumawat2227-beep/full/blob/main/client/src/feature/userBoard/ui/pages/Home.jsx"
click node_buyer_hook "https://github.com/anjalikumawat2227-beep/full/blob/main/client/src/feature/userBoard/hook/useBuyerHook.js"
click node_buyer_api "https://github.com/anjalikumawat2227-beep/full/blob/main/client/src/feature/userBoard/api/product.api.js"
click node_cart "https://github.com/anjalikumawat2227-beep/full/blob/main/client/src/feature/userBoard/ui/pages/Cart.jsx"
click node_orders "https://github.com/anjalikumawat2227-beep/full/blob/main/client/src/feature/userBoard/ui/pages/Oderes.jsx"
click node_seller_dashboard "https://github.com/anjalikumawat2227-beep/full/blob/main/client/src/feature/sellerBoard/ui/pages/DasBoard.jsx"
click node_seller_products "https://github.com/anjalikumawat2227-beep/full/blob/main/client/src/feature/sellerBoard/ui/pages/MyProducts.jsx"
click node_seller_form "https://github.com/anjalikumawat2227-beep/full/blob/main/client/src/feature/sellerBoard/ui/pages/AddProducts.jsx"
click node_seller_hook "https://github.com/anjalikumawat2227-beep/full/blob/main/client/src/feature/sellerBoard/hook/useSeller.js"
click node_seller_api "https://github.com/anjalikumawat2227-beep/full/blob/main/client/src/feature/sellerBoard/api/sellProductApi.js"
click node_server_entry "https://github.com/anjalikumawat2227-beep/full/blob/main/server/src/server.js"
click node_server_app "https://github.com/anjalikumawat2227-beep/full/blob/main/server/src/app/app.js"
click node_auth_router "https://github.com/anjalikumawat2227-beep/full/blob/main/server/src/routers/auth.route.js"
click node_product_router "https://github.com/anjalikumawat2227-beep/full/blob/main/server/src/routers/product.route.js"
click node_auth_controller "https://github.com/anjalikumawat2227-beep/full/blob/main/server/src/controller/auth.controller.js"
click node_product_controller "https://github.com/anjalikumawat2227-beep/full/blob/main/server/src/controller/products.controller.js"
click node_user_model "https://github.com/anjalikumawat2227-beep/full/blob/main/server/src/model/user.model.js"
click node_product_model "https://github.com/anjalikumawat2227-beep/full/blob/main/server/src/model/products.module.js"
click node_image_storage "https://github.com/anjalikumawat2227-beep/full/blob/main/server/src/services/storage.service.js"

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_entry,node_app_routes,node_buyer_routes,node_seller_routes toneBlue
class node_auth_ui,node_auth_hook,node_auth_actions,node_auth_state toneAmber
class node_buyer_products,node_buyer_home,node_buyer_hook,node_buyer_api,node_cart,node_orders toneMint
class node_seller_dashboard,node_seller_products,node_seller_form,node_seller_hook,node_seller_api toneRose
class node_server_entry,node_server_app,node_auth_router,node_product_router,node_auth_controller,node_product_controller,node_user_model,node_product_model,node_image_storage,node_shopper,node_seller_actor,node_imagekit toneIndigo
```

## Components

### Client app

- [Client entry](https://github.com/anjalikumawat2227-beep/full/blob/main/client/src/main.jsx): `client/src/main.jsx`
- [App routes](https://github.com/anjalikumawat2227-beep/full/blob/main/client/src/app/routes/AppRoutes.jsx): `client/src/app/routes/AppRoutes.jsx`
- [Buyer routes](https://github.com/anjalikumawat2227-beep/full/blob/main/client/src/app/routes/buyerRoutes.jsx): `client/src/app/routes/buyerRoutes.jsx`
- [Seller routes](https://github.com/anjalikumawat2227-beep/full/blob/main/client/src/app/routes/sellerRoutes.jsx): `client/src/app/routes/sellerRoutes.jsx`

### Authentication

- [Login and register](https://github.com/anjalikumawat2227-beep/full/blob/main/client/src/feature/auth/ui/pages/Login.jsx): `client/src/feature/auth/ui/pages/Login.jsx`
- [Auth hook](https://github.com/anjalikumawat2227-beep/full/blob/main/client/src/feature/auth/hooks/useAuth.js): `client/src/feature/auth/hooks/useAuth.js`
- [Auth actions](https://github.com/anjalikumawat2227-beep/full/blob/main/client/src/feature/auth/state/authAction.jsx): `client/src/feature/auth/state/authAction.jsx`
- [Auth state](https://github.com/anjalikumawat2227-beep/full/blob/main/client/src/feature/auth/state/auth.slice.jsx): `client/src/feature/auth/state/auth.slice.jsx`

### Buyer experience

- [Product browsing](https://github.com/anjalikumawat2227-beep/full/blob/main/client/src/feature/userBoard/ui/pages/Products.jsx): `client/src/feature/userBoard/ui/pages/Products.jsx`
- [Home page](https://github.com/anjalikumawat2227-beep/full/blob/main/client/src/feature/userBoard/ui/pages/Home.jsx): `client/src/feature/userBoard/ui/pages/Home.jsx`
- [Buyer hook](https://github.com/anjalikumawat2227-beep/full/blob/main/client/src/feature/userBoard/hook/useBuyerHook.js): `client/src/feature/userBoard/hook/useBuyerHook.js`
- [Product API](https://github.com/anjalikumawat2227-beep/full/blob/main/client/src/feature/userBoard/api/product.api.js): `client/src/feature/userBoard/api/product.api.js`
- [Cart page](https://github.com/anjalikumawat2227-beep/full/blob/main/client/src/feature/userBoard/ui/pages/Cart.jsx): `client/src/feature/userBoard/ui/pages/Cart.jsx`
- [Orders page](https://github.com/anjalikumawat2227-beep/full/blob/main/client/src/feature/userBoard/ui/pages/Oderes.jsx): `client/src/feature/userBoard/ui/pages/Oderes.jsx`

### Seller experience

- [Seller dashboard](https://github.com/anjalikumawat2227-beep/full/blob/main/client/src/feature/sellerBoard/ui/pages/DasBoard.jsx): `client/src/feature/sellerBoard/ui/pages/DasBoard.jsx`
- [My products](https://github.com/anjalikumawat2227-beep/full/blob/main/client/src/feature/sellerBoard/ui/pages/MyProducts.jsx): `client/src/feature/sellerBoard/ui/pages/MyProducts.jsx`
- [Product editor](https://github.com/anjalikumawat2227-beep/full/blob/main/client/src/feature/sellerBoard/ui/pages/AddProducts.jsx): `client/src/feature/sellerBoard/ui/pages/AddProducts.jsx`
- [Seller hook](https://github.com/anjalikumawat2227-beep/full/blob/main/client/src/feature/sellerBoard/hook/useSeller.js): `client/src/feature/sellerBoard/hook/useSeller.js`
- [Seller product API](https://github.com/anjalikumawat2227-beep/full/blob/main/client/src/feature/sellerBoard/api/sellProductApi.js): `client/src/feature/sellerBoard/api/sellProductApi.js`

### Backend

- [Server startup](https://github.com/anjalikumawat2227-beep/full/blob/main/server/src/server.js): `server/src/server.js`
- [Express app](https://github.com/anjalikumawat2227-beep/full/blob/main/server/src/app/app.js): `server/src/app/app.js`
- [Auth routes](https://github.com/anjalikumawat2227-beep/full/blob/main/server/src/routers/auth.route.js): `server/src/routers/auth.route.js`
- [Product routes](https://github.com/anjalikumawat2227-beep/full/blob/main/server/src/routers/product.route.js): `server/src/routers/product.route.js`
- [Auth operations](https://github.com/anjalikumawat2227-beep/full/blob/main/server/src/controller/auth.controller.js): `server/src/controller/auth.controller.js`
- [Product operations](https://github.com/anjalikumawat2227-beep/full/blob/main/server/src/controller/products.controller.js): `server/src/controller/products.controller.js`
- [User records](https://github.com/anjalikumawat2227-beep/full/blob/main/server/src/model/user.model.js): `server/src/model/user.model.js`
- [Product records](https://github.com/anjalikumawat2227-beep/full/blob/main/server/src/model/products.module.js): `server/src/model/products.module.js`
- [Image storage](https://github.com/anjalikumawat2227-beep/full/blob/main/server/src/services/storage.service.js): `server/src/services/storage.service.js`

### Other components

- **Shopper**
- **Seller**
- **ImageKit**

## Connections

- Client entry → App routes: renders
- App routes → Auth actions: dispatches session lookup
- App routes → Buyer routes: selects buyer routes
- App routes → Seller routes: selects seller routes
- Buyer routes → Product browsing: routes to
- Buyer routes → Cart page: routes to
- Buyer routes → Orders page: routes to
- Seller routes → Seller dashboard: routes to
- Seller routes → My products: routes to
- Seller routes → Product editor: routes to
- Product browsing → Shopper: serves
- Seller dashboard → Seller: serves
- My products → Seller: serves
- Product editor → Seller: serves
- Buyer hook → Product API: calls
- Seller hook → Seller product API: calls
- Server startup → Express app: starts
- Express app → Auth routes: mounts
- Express app → Product routes: mounts
- Auth operations → User records: reads and writes
- Product operations → Product records: reads and writes
- Product operations → Image storage: uploads images
- Image storage → ImageKit: uploads files
