# vdhjdn/campus-trade architecture

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

- Interactive diagram: https://gitdiagram.com/vdhjdn/campus-trade
- Repository: https://github.com/vdhjdn/campus-trade

## Overview

CampusTrade is a React campus marketplace. The user-facing workflow enters through the routed app, where buyers browse products and shops, manage a cart, and follow orders; sellers manage shops and listings, handle orders, and review payment or refund evidence. Account access and conversations are additional capabilities. The README documents Supabase authentication, database, and storage services, and an excerpt shows the home page querying products. The large page module is only partially sampled, so its feature-to-backend calls are not asserted.

Main entry points: [`src/App.jsx`](https://github.com/vdhjdn/campus-trade/blob/main/src/App.jsx) (Routed application), [`src/lib/supabase.js`](https://github.com/vdhjdn/campus-trade/blob/main/src/lib/supabase.js) (Supabase client), [`src/pages/Pages-temp.jsx`](https://github.com/vdhjdn/campus-trade/blob/main/src/pages/Pages-temp.jsx) (Product browsing), [`src/components/Navbar.jsx`](https://github.com/vdhjdn/campus-trade/blob/main/src/components/Navbar.jsx) (Site navigation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application shell"]
  node_app["Routed application<br/>[App.jsx]"]
  node_navigation["Site navigation<br/>[Navbar.jsx]"]
  node_footer["Site footer<br/>[Footer.jsx]"]
end

subgraph group_market["Marketplace"]
  node_catalog["Product browsing<br/>[Pages-temp.jsx]"]
  node_shops["Shop management<br/>[Pages-temp.jsx]"]
  node_listings["Product listings<br/>[Pages-temp.jsx]"]
end

subgraph group_commerce["Orders and payments"]
  node_cart["Shopping cart<br/>[Pages-temp.jsx]"]
  node_orders["Order management<br/>[Pages-temp.jsx]"]
  node_payments["Payment verification<br/>[Pages-temp.jsx]"]
  node_refunds["Refund management<br/>[Pages-temp.jsx]"]
end

subgraph group_accounts["Accounts and sellers"]
  node_accounts["Authentication and profile<br/>[Pages-temp.jsx]"]
  node_conversations["Conversations<br/>[Pages-temp.jsx]"]
end

subgraph group_backend["Backend services"]
  node_supabase_client["Supabase client<br/>[supabase.js]"]
  node_supabase[("Supabase services")]
end

node_visitor(("Campus user"))

node_visitor -->|"uses"| node_app
node_app -->|"renders"| node_navigation
node_app -->|"renders"| node_footer
node_app -->|"routes to"| node_catalog
node_app -->|"routes to"| node_shops
node_app -->|"routes to"| node_listings
node_app -->|"routes to"| node_cart
node_app -->|"routes to"| node_orders
node_app -->|"routes to"| node_payments
node_app -->|"routes to"| node_refunds
node_app -->|"routes to"| node_accounts
node_app -->|"routes to"| node_conversations
node_app -->|"queries products"| node_supabase_client
node_supabase_client -->|"connects to"| node_supabase
node_catalog -.->|"uses backend"| node_supabase_client
node_shops -.->|"uses backend"| node_supabase_client
node_listings -.->|"uses backend"| node_supabase_client
node_cart -.->|"uses backend"| node_supabase_client
node_orders -.->|"uses backend"| node_supabase_client
node_payments -.->|"uses backend"| node_supabase_client
node_refunds -.->|"uses backend"| node_supabase_client
node_accounts -.->|"uses backend"| node_supabase_client
node_conversations -.->|"uses backend"| node_supabase_client

click node_app "https://github.com/vdhjdn/campus-trade/blob/main/src/App.jsx"
click node_navigation "https://github.com/vdhjdn/campus-trade/blob/main/src/components/Navbar.jsx"
click node_footer "https://github.com/vdhjdn/campus-trade/blob/main/src/components/Footer.jsx"
click node_catalog "https://github.com/vdhjdn/campus-trade/blob/main/src/pages/Pages-temp.jsx"
click node_shops "https://github.com/vdhjdn/campus-trade/blob/main/src/pages/Pages-temp.jsx"
click node_listings "https://github.com/vdhjdn/campus-trade/blob/main/src/pages/Pages-temp.jsx"
click node_cart "https://github.com/vdhjdn/campus-trade/blob/main/src/pages/Pages-temp.jsx"
click node_orders "https://github.com/vdhjdn/campus-trade/blob/main/src/pages/Pages-temp.jsx"
click node_payments "https://github.com/vdhjdn/campus-trade/blob/main/src/pages/Pages-temp.jsx"
click node_refunds "https://github.com/vdhjdn/campus-trade/blob/main/src/pages/Pages-temp.jsx"
click node_accounts "https://github.com/vdhjdn/campus-trade/blob/main/src/pages/Pages-temp.jsx"
click node_conversations "https://github.com/vdhjdn/campus-trade/blob/main/src/pages/Pages-temp.jsx"
click node_supabase_client "https://github.com/vdhjdn/campus-trade/blob/main/src/lib/supabase.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,node_navigation,node_footer,node_visitor toneBlue
class node_catalog,node_shops,node_listings toneAmber
class node_cart,node_orders,node_payments,node_refunds toneMint
class node_accounts,node_conversations toneRose
class node_supabase_client,node_supabase toneIndigo
```

## Components

### Application shell

- [Routed application](https://github.com/vdhjdn/campus-trade/blob/main/src/App.jsx): `src/App.jsx`
- [Site navigation](https://github.com/vdhjdn/campus-trade/blob/main/src/components/Navbar.jsx): `src/components/Navbar.jsx`
- [Site footer](https://github.com/vdhjdn/campus-trade/blob/main/src/components/Footer.jsx): `src/components/Footer.jsx`

### Marketplace

- [Product browsing](https://github.com/vdhjdn/campus-trade/blob/main/src/pages/Pages-temp.jsx): `src/pages/Pages-temp.jsx`
- [Shop management](https://github.com/vdhjdn/campus-trade/blob/main/src/pages/Pages-temp.jsx): `src/pages/Pages-temp.jsx`
- [Product listings](https://github.com/vdhjdn/campus-trade/blob/main/src/pages/Pages-temp.jsx): `src/pages/Pages-temp.jsx`

### Orders and payments

- [Shopping cart](https://github.com/vdhjdn/campus-trade/blob/main/src/pages/Pages-temp.jsx): `src/pages/Pages-temp.jsx`
- [Order management](https://github.com/vdhjdn/campus-trade/blob/main/src/pages/Pages-temp.jsx): `src/pages/Pages-temp.jsx`
- [Payment verification](https://github.com/vdhjdn/campus-trade/blob/main/src/pages/Pages-temp.jsx): `src/pages/Pages-temp.jsx`
- [Refund management](https://github.com/vdhjdn/campus-trade/blob/main/src/pages/Pages-temp.jsx): `src/pages/Pages-temp.jsx`

### Accounts and sellers

- [Authentication and profile](https://github.com/vdhjdn/campus-trade/blob/main/src/pages/Pages-temp.jsx): `src/pages/Pages-temp.jsx`
- [Conversations](https://github.com/vdhjdn/campus-trade/blob/main/src/pages/Pages-temp.jsx): `src/pages/Pages-temp.jsx`

### Backend services

- [Supabase client](https://github.com/vdhjdn/campus-trade/blob/main/src/lib/supabase.js): `src/lib/supabase.js`
- **Supabase services**

### Other components

- **Campus user**

## Connections

- Campus user → Routed application: uses
- Routed application → Site navigation: renders (evidence: `src/App.jsx`)
- Routed application → Site footer: renders (evidence: `src/App.jsx`)
- Routed application → Product browsing: routes to (evidence: `src/App.jsx`)
- Routed application → Shop management: routes to (evidence: `src/App.jsx`)
- Routed application → Product listings: routes to (evidence: `src/App.jsx`)
- Routed application → Shopping cart: routes to (evidence: `src/App.jsx`)
- Routed application → Order management: routes to (evidence: `src/App.jsx`)
- Routed application → Payment verification: routes to (evidence: `src/App.jsx`)
- Routed application → Refund management: routes to (evidence: `src/App.jsx`)
- Routed application → Authentication and profile: routes to (evidence: `src/App.jsx`)
- Routed application → Conversations: routes to (evidence: `src/App.jsx`)
- Routed application → Supabase client: queries products (evidence: `src/App.jsx`)
- Supabase client → Supabase services: connects to (evidence: `src/lib/supabase.js`)
- Product browsing → Supabase client: uses backend (evidence: `src/pages/Pages-temp.jsx`)
- Shop management → Supabase client: uses backend (evidence: `src/pages/Pages-temp.jsx`)
- Product listings → Supabase client: uses backend (evidence: `src/pages/Pages-temp.jsx`)
- Shopping cart → Supabase client: uses backend (evidence: `src/pages/Pages-temp.jsx`)
- Order management → Supabase client: uses backend (evidence: `src/pages/Pages-temp.jsx`)
- Payment verification → Supabase client: uses backend (evidence: `src/pages/Pages-temp.jsx`)
- Refund management → Supabase client: uses backend (evidence: `src/pages/Pages-temp.jsx`)
- Authentication and profile → Supabase client: uses backend (evidence: `src/pages/Pages-temp.jsx`)
- Conversations → Supabase client: uses backend (evidence: `src/pages/Pages-temp.jsx`)
