# chris-mucyo/bones1.3 architecture

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

- Interactive diagram: https://gitdiagram.com/chris-mucyo/bones1.3
- Repository: https://github.com/chris-mucyo/bones1.3

## Overview

ShopHub is a buyer–seller commerce platform. The main user journey is account registration or login, then browsing and searching products or listings; sellers can manage offerings, while buyers and sellers can use chat. Authentication and catalog calls are represented where the supplied excerpts or index support them. The README also documents cart/order management and seller analytics, but the tree shows no cart or order backend module; dashboard capabilities are therefore shown only where a concrete frontend component exists. Unsampled links are omitted or dashed rather than assumed.

Main entry points: [`backend/src/prisma/prisma.service.ts`](https://github.com/chris-mucyo/bones1.3/blob/master/backend/src/prisma/prisma.service.ts) (Database Access), [`backend/src/auth/auth.service.ts`](https://github.com/chris-mucyo/bones1.3/blob/master/backend/src/auth/auth.service.ts) (Authentication), [`backend/src/product/product.service.ts`](https://github.com/chris-mucyo/bones1.3/blob/master/backend/src/product/product.service.ts) (Product Management), [`backend/src/listing/listing.service.ts`](https://github.com/chris-mucyo/bones1.3/blob/master/backend/src/listing/listing.service.ts) (Listing Management)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_identity["Identity and Accounts"]
  node_auth_api["Authentication<br/>[auth.service.ts]"]
  node_users_api["User Accounts<br/>[users.service.ts]"]
  node_mail["Email Verification<br/>[mail.service.ts]"]
end

subgraph group_commerce["Commerce Catalog"]
  node_product_api["Product Management<br/>[product.service.ts]"]
  node_listing_api["Listing Management<br/>[listing.service.ts]"]
  node_orders["Cart and Orders"]
  node_prisma["Database Access<br/>[prisma.service.ts]"]
end

subgraph group_engagement["Messaging and Media"]
  node_chat_api["Chat and Conversations"]
  node_media["Image Storage"]
end

subgraph group_experience["Web Experience"]
  node_auth_ui["Sign-in and Signup<br/>[authService.ts]"]
  node_browse_ui["Product Discovery<br/>[SearchPage.tsx]"]
  node_listing_ui["Listing Pages<br/>[ListingsPage.tsx]"]
  node_seller_ui["Seller Dashboard<br/>[sellerOrders.tsx]"]
  node_chat_ui["Chat Interface<br/>[ChatPage.tsx]"]
  node_analytics["Seller Analytics"]
end

node_buyer_seller(("Buyer or Seller"))
node_postgres[("PostgreSQL")]
node_cloudinary[("Cloudinary")]

node_buyer_seller -->|"starts account"| node_auth_ui
node_auth_ui -->|"requests login"| node_auth_api
node_auth_api -->|"looks up users"| node_users_api
node_auth_api -->|"sends verification"| node_mail
node_buyer_seller -.->|"browses catalog"| node_browse_ui
node_browse_ui -.->|"queries products"| node_product_api
node_buyer_seller -.->|"views listings"| node_listing_ui
node_listing_ui -.->|"requests listings"| node_listing_api
node_seller_ui -.->|"shows orders"| node_orders
node_buyer_seller -.->|"manages cart"| node_orders
node_buyer_seller -.->|"reviews sales"| node_analytics
node_buyer_seller -.->|"opens chat"| node_chat_ui
node_chat_ui -.->|"uses conversations"| node_chat_api
node_listing_api -->|"uploads images"| node_media
node_product_api -->|"uploads images"| node_media
node_users_api -->|"queries data"| node_prisma
node_listing_api -->|"queries data"| node_prisma
node_product_api -->|"queries data"| node_prisma
node_chat_api -->|"queries messages"| node_prisma
node_prisma -->|"connects to"| node_postgres
node_media -->|"uploads assets"| node_cloudinary

click node_auth_ui "https://github.com/chris-mucyo/bones1.3/blob/master/frontend/src/features/auth/services/authService.ts"
click node_auth_api "https://github.com/chris-mucyo/bones1.3/blob/master/backend/src/auth/auth.service.ts"
click node_users_api "https://github.com/chris-mucyo/bones1.3/blob/master/backend/src/users/users.service.ts"
click node_mail "https://github.com/chris-mucyo/bones1.3/blob/master/backend/src/mail/mail.service.ts"
click node_browse_ui "https://github.com/chris-mucyo/bones1.3/blob/master/frontend/src/features/home/pages/SearchPage.tsx"
click node_listing_ui "https://github.com/chris-mucyo/bones1.3/blob/master/frontend/src/features/listings/pages/ListingsPage.tsx"
click node_seller_ui "https://github.com/chris-mucyo/bones1.3/blob/master/frontend/src/features/dashboard/components/sellerOrders.tsx"
click node_product_api "https://github.com/chris-mucyo/bones1.3/blob/master/backend/src/product/product.service.ts"
click node_listing_api "https://github.com/chris-mucyo/bones1.3/blob/master/backend/src/listing/listing.service.ts"
click node_chat_ui "https://github.com/chris-mucyo/bones1.3/blob/master/frontend/src/features/chat/pages/ChatPage.tsx"
click node_chat_api "https://github.com/chris-mucyo/bones1.3/blob/master/backend/src/chat/conversation.service.ts"
click node_media "https://github.com/chris-mucyo/bones1.3/blob/master/backend/src/common/cloudinary/cloudinary.service.ts"
click node_prisma "https://github.com/chris-mucyo/bones1.3/blob/master/backend/src/prisma/prisma.service.ts"
click node_analytics "https://github.com/chris-mucyo/bones1.3/blob/master/frontend/src/features/dashboard/components/sellerAnalytics.tsx"

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_auth_api,node_users_api,node_mail toneBlue
class node_product_api,node_listing_api,node_orders,node_prisma,node_postgres,node_cloudinary toneAmber
class node_chat_api,node_media toneMint
class node_auth_ui,node_browse_ui,node_listing_ui,node_seller_ui,node_chat_ui,node_analytics toneRose
class node_buyer_seller toneIndigo
```

## Components

### Identity and Accounts

- [Authentication](https://github.com/chris-mucyo/bones1.3/blob/master/backend/src/auth/auth.service.ts): `backend/src/auth/auth.service.ts`
- [User Accounts](https://github.com/chris-mucyo/bones1.3/blob/master/backend/src/users/users.service.ts): `backend/src/users/users.service.ts`
- [Email Verification](https://github.com/chris-mucyo/bones1.3/blob/master/backend/src/mail/mail.service.ts): `backend/src/mail/mail.service.ts`

### Commerce Catalog

- [Product Management](https://github.com/chris-mucyo/bones1.3/blob/master/backend/src/product/product.service.ts): `backend/src/product/product.service.ts`
- [Listing Management](https://github.com/chris-mucyo/bones1.3/blob/master/backend/src/listing/listing.service.ts): `backend/src/listing/listing.service.ts`
- **Cart and Orders**
- [Database Access](https://github.com/chris-mucyo/bones1.3/blob/master/backend/src/prisma/prisma.service.ts): `backend/src/prisma/prisma.service.ts`

### Messaging and Media

- [Chat and Conversations](https://github.com/chris-mucyo/bones1.3/blob/master/backend/src/chat/conversation.service.ts): `backend/src/chat/conversation.service.ts`
- [Image Storage](https://github.com/chris-mucyo/bones1.3/blob/master/backend/src/common/cloudinary/cloudinary.service.ts): `backend/src/common/cloudinary/cloudinary.service.ts`

### Web Experience

- [Sign-in and Signup](https://github.com/chris-mucyo/bones1.3/blob/master/frontend/src/features/auth/services/authService.ts): `frontend/src/features/auth/services/authService.ts`
- [Product Discovery](https://github.com/chris-mucyo/bones1.3/blob/master/frontend/src/features/home/pages/SearchPage.tsx): `frontend/src/features/home/pages/SearchPage.tsx`
- [Listing Pages](https://github.com/chris-mucyo/bones1.3/blob/master/frontend/src/features/listings/pages/ListingsPage.tsx): `frontend/src/features/listings/pages/ListingsPage.tsx`
- [Seller Dashboard](https://github.com/chris-mucyo/bones1.3/blob/master/frontend/src/features/dashboard/components/sellerOrders.tsx): `frontend/src/features/dashboard/components/sellerOrders.tsx`
- [Chat Interface](https://github.com/chris-mucyo/bones1.3/blob/master/frontend/src/features/chat/pages/ChatPage.tsx): `frontend/src/features/chat/pages/ChatPage.tsx`
- [Seller Analytics](https://github.com/chris-mucyo/bones1.3/blob/master/frontend/src/features/dashboard/components/sellerAnalytics.tsx): `frontend/src/features/dashboard/components/sellerAnalytics.tsx`

### Other components

- **Buyer or Seller**
- **PostgreSQL**
- **Cloudinary**

## Connections

- Buyer or Seller → Sign-in and Signup: starts account (evidence: `frontend/src/features/auth/services/authService.ts`)
- Sign-in and Signup → Authentication: requests login (evidence: `frontend/src/features/auth/services/authService.ts`)
- Authentication → User Accounts: looks up users (evidence: `backend/src/auth/auth.service.ts`)
- Authentication → Email Verification: sends verification (evidence: `backend/src/auth/auth.service.ts`)
- Buyer or Seller → Product Discovery: browses catalog
- Product Discovery → Product Management: queries products
- Buyer or Seller → Listing Pages: views listings
- Listing Pages → Listing Management: requests listings
- Seller Dashboard → Cart and Orders: shows orders
- Buyer or Seller → Cart and Orders: manages cart (evidence: `README.md`)
- Buyer or Seller → Seller Analytics: reviews sales (evidence: `README.md`)
- Buyer or Seller → Chat Interface: opens chat
- Chat Interface → Chat and Conversations: uses conversations
- Listing Management → Image Storage: uploads images (evidence: `backend/src/listing/listing.service.ts`)
- Product Management → Image Storage: uploads images (evidence: `backend/src/product/product.service.ts`)
- User Accounts → Database Access: queries data (evidence: `backend/src/users/users.service.ts`)
- Listing Management → Database Access: queries data (evidence: `backend/src/listing/listing.service.ts`)
- Product Management → Database Access: queries data (evidence: `backend/src/product/product.service.ts`)
- Chat and Conversations → Database Access: queries messages
- Database Access → PostgreSQL: connects to (evidence: `backend/src/prisma/prisma.service.ts`)
- Image Storage → Cloudinary: uploads assets (evidence: `backend/src/common/cloudinary/cloudinary.service.ts`)
