# vishalsinha1602/jnubazaar architecture

> Architecture diagram of the GitHub repository vishalsinha1602/jnubazaar, 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/vishalsinha1602/jnubazaar
- Repository: https://github.com/vishalsinha1602/jnubazaar

## Overview

JNUBazaar is a JNU campus marketplace for discovering and selling listings, with account, wishlist, chat, and notification features. The main workflow routes users into home or marketplace views, loads listings through the product service, and supports listing details and seller submissions; authentication gates some interactions. The graph captures the sampled routing, auth, and API layers plus README-unelaborated product areas visible in the route index. The README provides no further capability detail, and unsampled page internals are not inferred.

Main entry points: [`src/app/routes/AppRoutes.jsx`](https://github.com/vishalsinha1602/jnubazaar/blob/main/src/app/routes/AppRoutes.jsx) (Route coordinator), [`src/features/products/services/productService.js`](https://github.com/vishalsinha1602/jnubazaar/blob/main/src/features/products/services/productService.js) (Product service), [`src/features/wishlist/services/wishlistService.js`](https://github.com/vishalsinha1602/jnubazaar/blob/main/src/features/wishlist/services/wishlistService.js) (Wishlist service), [`src/features/auth/services/authService.js`](https://github.com/vishalsinha1602/jnubazaar/blob/main/src/features/auth/services/authService.js) (Auth service)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application"]
  node_routes["Route coordinator<br/>[AppRoutes.jsx]"]
  node_providers["App providers<br/>[AppProviders.jsx]"]
  node_navbar["Navigation<br/>[Navbar.jsx]"]
  node_api_client["HTTP client<br/>[axiosClient.js]"]
  node_interceptors["HTTP interceptors<br/>[interceptors.js]"]
  node_endpoints["API endpoints<br/>[apiEndpoints.js]"]
end

subgraph group_identity["Identity"]
  node_auth_pages["Sign-in and profile<br/>[Login.jsx]"]
  node_auth_context["Session context<br/>[AuthContext.jsx]"]
  node_auth_hook["Auth hook<br/>[useAuth.js]"]
  node_auth_service["Auth service<br/>[authService.js]"]
  node_token_store[("Token storage<br/>[tokenService.js]")]
end

subgraph group_market["Marketplace"]
  node_home["Home discovery<br/>[Home.jsx]"]
  node_search["Search controls<br/>[SearchBar.jsx]"]
  node_marketplace["Marketplace browse<br/>[Marketplace.jsx]"]
  node_product_details["Product details<br/>[ProductDetails.jsx]"]
  node_seller_form["Sell listing<br/>[SellProduct.jsx]"]
  node_product_service["Product service<br/>[productService.js]"]
  node_catalog_config["Marketplace catalog<br/>[marketplaceData.js]"]
end

subgraph group_engagement["Engagement"]
  node_wishlist_page["Wishlist view<br/>[Wishlist.jsx]"]
  node_wishlist_service["Wishlist service<br/>[wishlistService.js]"]
  node_chat["Campus chat<br/>[Chat.jsx]"]
  node_notifications["Notifications<br/>[Notifications.jsx]"]
end

node_visitor(("Campus user"))

node_visitor -->|"navigates"| node_routes
node_providers -->|"provides"| node_auth_context
node_routes -->|"renders"| node_navbar
node_routes -->|"routes to"| node_home
node_routes -->|"routes to"| node_marketplace
node_routes -->|"routes to"| node_product_details
node_routes -->|"routes to"| node_seller_form
node_routes -->|"routes to"| node_auth_pages
node_routes -->|"routes to"| node_wishlist_page
node_routes -->|"routes to"| node_chat
node_routes -->|"routes to"| node_notifications
node_routes -->|"reads session"| node_auth_hook
node_routes -->|"loads listings"| node_product_service
node_routes -->|"loads wishlist"| node_wishlist_service
node_home -->|"renders"| node_search
node_search -->|"uses categories"| node_catalog_config
node_marketplace -->|"fetches listings"| node_product_service
node_marketplace -->|"checks wishlist"| node_wishlist_service
node_seller_form -->|"saves listing"| node_product_service
node_wishlist_page -->|"loads items"| node_wishlist_service
node_auth_context -->|"delegates auth"| node_auth_service
node_auth_context -->|"reads token"| node_token_store
node_auth_hook -->|"reads context"| node_auth_context
node_auth_service -->|"manages tokens"| node_token_store
node_auth_service -->|"sends requests"| node_api_client
node_product_service -->|"sends requests"| node_api_client
node_wishlist_service -->|"sends requests"| node_api_client
node_api_client -->|"configures"| node_interceptors
node_auth_service -->|"uses routes"| node_endpoints
node_product_service -->|"uses routes"| node_endpoints
node_wishlist_service -->|"uses routes"| node_endpoints

click node_routes "https://github.com/vishalsinha1602/jnubazaar/blob/main/src/app/routes/AppRoutes.jsx"
click node_providers "https://github.com/vishalsinha1602/jnubazaar/blob/main/src/app/providers/AppProviders.jsx"
click node_navbar "https://github.com/vishalsinha1602/jnubazaar/blob/main/src/shared/components/layout/Navbar.jsx"
click node_home "https://github.com/vishalsinha1602/jnubazaar/blob/main/src/features/home/pages/Home.jsx"
click node_search "https://github.com/vishalsinha1602/jnubazaar/blob/main/src/features/home/components/SearchBar.jsx"
click node_marketplace "https://github.com/vishalsinha1602/jnubazaar/blob/main/src/features/products/pages/Marketplace.jsx"
click node_product_details "https://github.com/vishalsinha1602/jnubazaar/blob/main/src/features/products/pages/ProductDetails.jsx"
click node_seller_form "https://github.com/vishalsinha1602/jnubazaar/blob/main/src/features/sellers/pages/SellProduct.jsx"
click node_product_service "https://github.com/vishalsinha1602/jnubazaar/blob/main/src/features/products/services/productService.js"
click node_catalog_config "https://github.com/vishalsinha1602/jnubazaar/blob/main/src/shared/config/marketplaceData.js"
click node_auth_pages "https://github.com/vishalsinha1602/jnubazaar/blob/main/src/features/auth/pages/Login.jsx"
click node_auth_context "https://github.com/vishalsinha1602/jnubazaar/blob/main/src/features/auth/context/AuthContext.jsx"
click node_auth_hook "https://github.com/vishalsinha1602/jnubazaar/blob/main/src/features/auth/hooks/useAuth.js"
click node_auth_service "https://github.com/vishalsinha1602/jnubazaar/blob/main/src/features/auth/services/authService.js"
click node_token_store "https://github.com/vishalsinha1602/jnubazaar/blob/main/src/features/auth/utils/tokenService.js"
click node_wishlist_page "https://github.com/vishalsinha1602/jnubazaar/blob/main/src/features/wishlist/pages/Wishlist.jsx"
click node_wishlist_service "https://github.com/vishalsinha1602/jnubazaar/blob/main/src/features/wishlist/services/wishlistService.js"
click node_chat "https://github.com/vishalsinha1602/jnubazaar/blob/main/src/features/chat/pages/Chat.jsx"
click node_notifications "https://github.com/vishalsinha1602/jnubazaar/blob/main/src/features/notifications/pages/Notifications.jsx"
click node_api_client "https://github.com/vishalsinha1602/jnubazaar/blob/main/src/shared/api/axiosClient.js"
click node_interceptors "https://github.com/vishalsinha1602/jnubazaar/blob/main/src/shared/api/interceptors.js"
click node_endpoints "https://github.com/vishalsinha1602/jnubazaar/blob/main/src/shared/api/apiEndpoints.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_routes,node_providers,node_navbar,node_api_client,node_interceptors,node_endpoints,node_visitor toneBlue
class node_auth_pages,node_auth_context,node_auth_hook,node_auth_service,node_token_store toneAmber
class node_home,node_search,node_marketplace,node_product_details,node_seller_form,node_product_service,node_catalog_config toneMint
class node_wishlist_page,node_wishlist_service,node_chat,node_notifications toneRose
```

## Components

### Application

- [Route coordinator](https://github.com/vishalsinha1602/jnubazaar/blob/main/src/app/routes/AppRoutes.jsx): `src/app/routes/AppRoutes.jsx`
- [App providers](https://github.com/vishalsinha1602/jnubazaar/blob/main/src/app/providers/AppProviders.jsx): `src/app/providers/AppProviders.jsx`
- [Navigation](https://github.com/vishalsinha1602/jnubazaar/blob/main/src/shared/components/layout/Navbar.jsx): `src/shared/components/layout/Navbar.jsx`
- [HTTP client](https://github.com/vishalsinha1602/jnubazaar/blob/main/src/shared/api/axiosClient.js): `src/shared/api/axiosClient.js`
- [HTTP interceptors](https://github.com/vishalsinha1602/jnubazaar/blob/main/src/shared/api/interceptors.js): `src/shared/api/interceptors.js`
- [API endpoints](https://github.com/vishalsinha1602/jnubazaar/blob/main/src/shared/api/apiEndpoints.js): `src/shared/api/apiEndpoints.js`

### Identity

- [Sign-in and profile](https://github.com/vishalsinha1602/jnubazaar/blob/main/src/features/auth/pages/Login.jsx): `src/features/auth/pages/Login.jsx`
- [Session context](https://github.com/vishalsinha1602/jnubazaar/blob/main/src/features/auth/context/AuthContext.jsx): `src/features/auth/context/AuthContext.jsx`
- [Auth hook](https://github.com/vishalsinha1602/jnubazaar/blob/main/src/features/auth/hooks/useAuth.js): `src/features/auth/hooks/useAuth.js`
- [Auth service](https://github.com/vishalsinha1602/jnubazaar/blob/main/src/features/auth/services/authService.js): `src/features/auth/services/authService.js`
- [Token storage](https://github.com/vishalsinha1602/jnubazaar/blob/main/src/features/auth/utils/tokenService.js): `src/features/auth/utils/tokenService.js`

### Marketplace

- [Home discovery](https://github.com/vishalsinha1602/jnubazaar/blob/main/src/features/home/pages/Home.jsx): `src/features/home/pages/Home.jsx`
- [Search controls](https://github.com/vishalsinha1602/jnubazaar/blob/main/src/features/home/components/SearchBar.jsx): `src/features/home/components/SearchBar.jsx`
- [Marketplace browse](https://github.com/vishalsinha1602/jnubazaar/blob/main/src/features/products/pages/Marketplace.jsx): `src/features/products/pages/Marketplace.jsx`
- [Product details](https://github.com/vishalsinha1602/jnubazaar/blob/main/src/features/products/pages/ProductDetails.jsx): `src/features/products/pages/ProductDetails.jsx`
- [Sell listing](https://github.com/vishalsinha1602/jnubazaar/blob/main/src/features/sellers/pages/SellProduct.jsx): `src/features/sellers/pages/SellProduct.jsx`
- [Product service](https://github.com/vishalsinha1602/jnubazaar/blob/main/src/features/products/services/productService.js): `src/features/products/services/productService.js`
- [Marketplace catalog](https://github.com/vishalsinha1602/jnubazaar/blob/main/src/shared/config/marketplaceData.js): `src/shared/config/marketplaceData.js`

### Engagement

- [Wishlist view](https://github.com/vishalsinha1602/jnubazaar/blob/main/src/features/wishlist/pages/Wishlist.jsx): `src/features/wishlist/pages/Wishlist.jsx`
- [Wishlist service](https://github.com/vishalsinha1602/jnubazaar/blob/main/src/features/wishlist/services/wishlistService.js): `src/features/wishlist/services/wishlistService.js`
- [Campus chat](https://github.com/vishalsinha1602/jnubazaar/blob/main/src/features/chat/pages/Chat.jsx): `src/features/chat/pages/Chat.jsx`
- [Notifications](https://github.com/vishalsinha1602/jnubazaar/blob/main/src/features/notifications/pages/Notifications.jsx): `src/features/notifications/pages/Notifications.jsx`

### Other components

- **Campus user**

## Connections

- Campus user → Route coordinator: navigates (evidence: `src/app/routes/AppRoutes.jsx`)
- App providers → Session context: provides (evidence: `src/app/providers/AppProviders.jsx`)
- Route coordinator → Navigation: renders (evidence: `src/app/routes/AppRoutes.jsx`)
- Route coordinator → Home discovery: routes to (evidence: `src/app/routes/AppRoutes.jsx`)
- Route coordinator → Marketplace browse: routes to (evidence: `src/app/routes/AppRoutes.jsx`)
- Route coordinator → Product details: routes to (evidence: `src/app/routes/AppRoutes.jsx`)
- Route coordinator → Sell listing: routes to (evidence: `src/app/routes/AppRoutes.jsx`)
- Route coordinator → Sign-in and profile: routes to (evidence: `src/app/routes/AppRoutes.jsx`)
- Route coordinator → Wishlist view: routes to (evidence: `src/app/routes/AppRoutes.jsx`)
- Route coordinator → Campus chat: routes to (evidence: `src/app/routes/AppRoutes.jsx`)
- Route coordinator → Notifications: routes to (evidence: `src/app/routes/AppRoutes.jsx`)
- Route coordinator → Auth hook: reads session (evidence: `src/app/routes/AppRoutes.jsx`)
- Route coordinator → Product service: loads listings (evidence: `src/app/routes/AppRoutes.jsx`)
- Route coordinator → Wishlist service: loads wishlist (evidence: `src/app/routes/AppRoutes.jsx`)
- Home discovery → Search controls: renders (evidence: `src/features/home/pages/Home.jsx`)
- Search controls → Marketplace catalog: uses categories (evidence: `src/features/home/components/SearchBar.jsx`)
- Marketplace browse → Product service: fetches listings (evidence: `src/features/products/pages/Marketplace.jsx`)
- Marketplace browse → Wishlist service: checks wishlist (evidence: `src/features/products/pages/Marketplace.jsx`)
- Sell listing → Product service: saves listing (evidence: `src/features/sellers/pages/SellProduct.jsx`)
- Wishlist view → Wishlist service: loads items (evidence: `src/features/wishlist/pages/Wishlist.jsx`)
- Session context → Auth service: delegates auth (evidence: `src/features/auth/context/AuthContext.jsx`)
- Session context → Token storage: reads token (evidence: `src/features/auth/context/AuthContext.jsx`)
- Auth hook → Session context: reads context (evidence: `src/features/auth/hooks/useAuth.js`)
- Auth service → Token storage: manages tokens (evidence: `src/features/auth/services/authService.js`)
- Auth service → HTTP client: sends requests (evidence: `src/features/auth/services/authService.js`)
- Product service → HTTP client: sends requests (evidence: `src/features/products/services/productService.js`)
- Wishlist service → HTTP client: sends requests (evidence: `src/features/wishlist/services/wishlistService.js`)
- HTTP client → HTTP interceptors: configures (evidence: `src/shared/api/axiosClient.js`)
- Auth service → API endpoints: uses routes (evidence: `src/features/auth/services/authService.js`)
- Product service → API endpoints: uses routes (evidence: `src/features/products/services/productService.js`)
- Wishlist service → API endpoints: uses routes (evidence: `src/features/wishlist/services/wishlistService.js`)
