# wisit23/ise architecture

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

- Interactive diagram: https://gitdiagram.com/wisit23/ise
- Repository: https://github.com/wisit23/ise

## Overview

RE-LOOP is a second-hand fashion marketplace built as a Next.js frontend behind an Express gateway, with backend services for identity, catalog, orders, chat, and support. The principal journey is browsing listings, creating an order, and completing checkout; seller listings, auctions, recommendations, reviews, disputes, and customer-service workflows are additional product branches. The graph combines README-documented capabilities with sampled gateway, order, and review code. Several feature paths are present in the tree but unsampled, so their internal wiring is not inferred.

Main entry points: [`backend/gateway/src/app.js`](https://github.com/wisit23/ise/blob/main/backend/gateway/src/app.js) (API gateway), [`backend/services/order-service/src/controllers/orderController.js`](https://github.com/wisit23/ise/blob/main/backend/services/order-service/src/controllers/orderController.js) (Orders and checkout), [`backend/services/product-service/src/controllers/productController.js`](https://github.com/wisit23/ise/blob/main/backend/services/product-service/src/controllers/productController.js) (Catalog and listings), [`backend/services/order-service/src/features/checkoutSessions/checkoutSessionService.js`](https://github.com/wisit23/ise/blob/main/backend/services/order-service/src/features/checkoutSessions/checkoutSessionService.js) (Checkout sessions)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Marketplace client"]
  node_frontend["Marketplace UI"]
  node_api["API client<br/>[api.js]"]
end

subgraph group_commerce["Commerce services"]
  node_product["Catalog and listings"]
  node_product_features["Marketplace features"]
  node_reviews["Buyer reviews"]
  node_orders["Orders and checkout<br/>[orderController.js]"]
  node_checkout["Checkout sessions"]
  node_order_model[("Order state and persistence<br/>[orderModel.js]")]
  node_shipping["Shipping workflow<br/>[shippingService.js]"]
  node_product_sync["Product synchronization"]
  node_order_clients["Order integrations<br/>[productClient.js]"]
end

subgraph group_identity["Identity services"]
  node_auth["Accounts and sessions<br/>[authService.js]"]
  node_kyc["Seller verification"]
end

subgraph group_engagement["Engagement services"]
  node_chat["Messaging and realtime"]
  node_support["Customer support"]
end

subgraph group_shared["Shared backend"]
  node_shared_config["Support configuration<br/>[validate-client.js]"]
end

node_buyer(("Marketplace user"))
node_gateway["API gateway<br/>[app.js]"]

node_buyer -->|"uses"| node_frontend
node_frontend -->|"requests data"| node_api
node_api -->|"sends API requests"| node_gateway
node_gateway -->|"proxies auth"| node_auth
node_gateway -->|"proxies products"| node_product
node_gateway -->|"proxies orders"| node_orders
node_gateway -->|"proxies chat"| node_chat
node_gateway -->|"proxies support"| node_support
node_product -->|"supports"| node_product_features
node_product -->|"serves reviews"| node_reviews
node_orders -->|"confirms checkout"| node_checkout
node_orders -->|"reads and updates"| node_order_model
node_orders -->|"marks shipped"| node_shipping
node_checkout -->|"updates orders"| node_order_model
node_order_model -->|"processes events"| node_product_sync
node_checkout -->|"uses integrations"| node_order_clients
node_orders -->|"notifies services"| node_order_clients
node_auth -.->|"supports verification"| node_kyc
node_support -.->|"uses policy settings"| node_shared_config

click node_frontend "https://github.com/wisit23/ise/tree/main/frontend/app"
click node_api "https://github.com/wisit23/ise/blob/main/frontend/lib/api.js"
click node_gateway "https://github.com/wisit23/ise/blob/main/backend/gateway/src/app.js"
click node_product "https://github.com/wisit23/ise/blob/main/backend/services/product-service/src/controllers/productController.js"
click node_product_features "https://github.com/wisit23/ise/tree/main/backend/services/product-service/src/features"
click node_reviews "https://github.com/wisit23/ise/blob/main/backend/services/product-service/src/features/reviews/controllers/reviewController.js"
click node_orders "https://github.com/wisit23/ise/blob/main/backend/services/order-service/src/controllers/orderController.js"
click node_checkout "https://github.com/wisit23/ise/blob/main/backend/services/order-service/src/features/checkoutSessions/checkoutSessionService.js"
click node_order_model "https://github.com/wisit23/ise/blob/main/backend/services/order-service/src/models/orderModel.js"
click node_shipping "https://github.com/wisit23/ise/blob/main/backend/services/order-service/src/features/shipping/shippingService.js"
click node_product_sync "https://github.com/wisit23/ise/blob/main/backend/services/order-service/src/services/productSyncService.js"
click node_order_clients "https://github.com/wisit23/ise/blob/main/backend/services/order-service/src/services/productClient.js"
click node_auth "https://github.com/wisit23/ise/blob/main/backend/services/auth-service/src/services/authService.js"
click node_kyc "https://github.com/wisit23/ise/tree/main/backend/services/auth-service/src/features/kyc"
click node_chat "https://github.com/wisit23/ise/tree/main/backend/services/chat-service/src/features/conversations"
click node_support "https://github.com/wisit23/ise/tree/main/backend/services/support-service/src/features/tickets"
click node_shared_config "https://github.com/wisit23/ise/blob/main/backend/shared/config/validate-client.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_frontend,node_api,node_buyer toneBlue
class node_product,node_product_features,node_reviews,node_orders,node_checkout,node_order_model,node_shipping,node_product_sync,node_order_clients toneAmber
class node_auth,node_kyc,node_gateway toneMint
class node_chat,node_support toneRose
class node_shared_config toneIndigo
```

## Components

### Marketplace client

- [Marketplace UI](https://github.com/wisit23/ise/tree/main/frontend/app): `frontend/app`
- [API client](https://github.com/wisit23/ise/blob/main/frontend/lib/api.js): `frontend/lib/api.js`

### Commerce services

- [Catalog and listings](https://github.com/wisit23/ise/blob/main/backend/services/product-service/src/controllers/productController.js): `backend/services/product-service/src/controllers/productController.js`
- [Marketplace features](https://github.com/wisit23/ise/tree/main/backend/services/product-service/src/features): `backend/services/product-service/src/features`
- [Buyer reviews](https://github.com/wisit23/ise/blob/main/backend/services/product-service/src/features/reviews/controllers/reviewController.js): `backend/services/product-service/src/features/reviews/controllers/reviewController.js`
- [Orders and checkout](https://github.com/wisit23/ise/blob/main/backend/services/order-service/src/controllers/orderController.js): `backend/services/order-service/src/controllers/orderController.js`
- [Checkout sessions](https://github.com/wisit23/ise/blob/main/backend/services/order-service/src/features/checkoutSessions/checkoutSessionService.js): `backend/services/order-service/src/features/checkoutSessions/checkoutSessionService.js`
- [Order state and persistence](https://github.com/wisit23/ise/blob/main/backend/services/order-service/src/models/orderModel.js): `backend/services/order-service/src/models/orderModel.js`
- [Shipping workflow](https://github.com/wisit23/ise/blob/main/backend/services/order-service/src/features/shipping/shippingService.js): `backend/services/order-service/src/features/shipping/shippingService.js`
- [Product synchronization](https://github.com/wisit23/ise/blob/main/backend/services/order-service/src/services/productSyncService.js): `backend/services/order-service/src/services/productSyncService.js`
- [Order integrations](https://github.com/wisit23/ise/blob/main/backend/services/order-service/src/services/productClient.js): `backend/services/order-service/src/services/productClient.js`

### Identity services

- [Accounts and sessions](https://github.com/wisit23/ise/blob/main/backend/services/auth-service/src/services/authService.js): `backend/services/auth-service/src/services/authService.js`
- [Seller verification](https://github.com/wisit23/ise/tree/main/backend/services/auth-service/src/features/kyc): `backend/services/auth-service/src/features/kyc`

### Engagement services

- [Messaging and realtime](https://github.com/wisit23/ise/tree/main/backend/services/chat-service/src/features/conversations): `backend/services/chat-service/src/features/conversations`
- [Customer support](https://github.com/wisit23/ise/tree/main/backend/services/support-service/src/features/tickets): `backend/services/support-service/src/features/tickets`

### Shared backend

- [Support configuration](https://github.com/wisit23/ise/blob/main/backend/shared/config/validate-client.js): `backend/shared/config/validate-client.js`

### Other components

- **Marketplace user**
- [API gateway](https://github.com/wisit23/ise/blob/main/backend/gateway/src/app.js): `backend/gateway/src/app.js`

## Connections

- Marketplace user → Marketplace UI: uses (evidence: `README.md`)
- Marketplace UI → API client: requests data (evidence: `frontend/lib/api.js`)
- API client → API gateway: sends API requests (evidence: `README.md`)
- API gateway → Accounts and sessions: proxies auth (evidence: `backend/gateway/src/app.js`)
- API gateway → Catalog and listings: proxies products (evidence: `backend/gateway/src/app.js`)
- API gateway → Orders and checkout: proxies orders (evidence: `backend/gateway/src/app.js`)
- API gateway → Messaging and realtime: proxies chat (evidence: `backend/gateway/src/app.js`)
- API gateway → Customer support: proxies support (evidence: `backend/gateway/src/app.js`)
- Catalog and listings → Marketplace features: supports (evidence: `README.md`)
- Catalog and listings → Buyer reviews: serves reviews (evidence: `backend/services/product-service/src/features/reviews/controllers/reviewController.js`)
- Orders and checkout → Checkout sessions: confirms checkout (evidence: `backend/services/order-service/src/controllers/orderController.js`)
- Orders and checkout → Order state and persistence: reads and updates (evidence: `backend/services/order-service/src/controllers/orderController.js`)
- Orders and checkout → Shipping workflow: marks shipped (evidence: `backend/services/order-service/src/controllers/orderController.js`)
- Checkout sessions → Order state and persistence: updates orders (evidence: `backend/services/order-service/src/features/checkoutSessions/checkoutSessionService.js`)
- Order state and persistence → Product synchronization: processes events (evidence: `backend/services/order-service/src/models/orderModel.js`)
- Checkout sessions → Order integrations: uses integrations (evidence: `backend/services/order-service/src/features/checkoutSessions/checkoutSessionService.js`)
- Orders and checkout → Order integrations: notifies services (evidence: `backend/services/order-service/src/controllers/orderController.js`)
- Accounts and sessions → Seller verification: supports verification
- Customer support → Support configuration: uses policy settings
