# abin368/stealth architecture

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

- Interactive diagram: https://gitdiagram.com/abin368/stealth
- Repository: https://github.com/abin368/stealth

## Overview

GENIEJACKK is an Express API for a B2B trade platform connecting destination-market buyers with Chinese manufacturers. Buyers and staff enter through HTTP routes; the product spans supplier/product listing and pricing, customer catalogue and purchasing, order/payment fulfilment, and support/loyalty, alongside supplier and admin portals. The README documents these capabilities, while the excerpts show application routing, authentication, notification dispatch and background-worker orchestration. Many domain modules are listed but unsampled, so their internal call relationships are not asserted here.

Main entry points: [`src/routes/index.js`](https://github.com/abin368/stealth/blob/main/src/routes/index.js) (API routes), [`src/modules/claims/claim.service.js`](https://github.com/abin368/stealth/blob/main/src/modules/claims/claim.service.js) (Claims and refunds), [`src/modules/auth/auth.service.js`](https://github.com/abin368/stealth/blob/main/src/modules/auth/auth.service.js) (Authentication and RBAC), [`src/app.js`](https://github.com/abin368/stealth/blob/main/src/app.js) (Express API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["API entry"]
  node_http["Express API<br/>[app.js]"]
  node_routing["API routes<br/>[index.js]"]
end

subgraph group_commerce["Trade commerce"]
  node_supplier["Supplier onboarding"]
  node_listing["Product listing review"]
  node_publishing["Catalogue publishing"]
  node_pricing["Pricing<br/>[pricing.service.js]"]
  node_catalogue["Catalogue and search"]
  node_cart["Cart and packing<br/>[cart.service.js]"]
  node_rfq["RFQs<br/>[rfq.service.js]"]
  node_orders["Order lifecycle<br/>[order.service.js]"]
end

subgraph group_portals["Buyer and supplier portals"]
  node_supplierportal["Supplier portal"]
  node_customerportal["Customer portal"]
end

subgraph group_operations["Finance and support"]
  node_payments["Payments and finance<br/>[payment.service.js]"]
  node_claims["Claims and refunds<br/>[claim.service.js]"]
  node_loyalty["Loyalty and CAQ<br/>[loyalty.service.js]"]
  node_support["Support cases<br/>[support.service.js]"]
end

subgraph group_runtime["Shared runtime"]
  node_auth["Authentication and RBAC<br/>[auth.service.js]"]
  node_notifications["Notification dispatch"]
  node_storage["Upload storage"]
  node_database[("PostgreSQL via Prisma<br/>[prisma.js]")]
  node_worker["Scheduled jobs<br/>[job-worker.js]"]
end

node_buyer(("Business buyer"))
node_staff(("Platform staff"))

node_buyer -->|"sends requests"| node_http
node_staff -->|"sends requests"| node_http
node_http -->|"mounts routes"| node_routing
node_routing -->|"routes auth"| node_auth
node_routing -->|"routes suppliers"| node_supplier
node_routing -->|"routes review"| node_listing
node_routing -->|"routes publishing"| node_publishing
node_routing -->|"routes pricing"| node_pricing
node_routing -->|"routes catalogue"| node_catalogue
node_routing -->|"routes cart"| node_cart
node_routing -->|"routes RFQs"| node_rfq
node_routing -->|"routes orders"| node_orders
node_routing -->|"routes portal"| node_supplierportal
node_routing -->|"routes portal"| node_customerportal
node_routing -.->|"routes payments"| node_payments
node_routing -.->|"routes claims"| node_claims
node_routing -.->|"routes loyalty"| node_loyalty
node_routing -.->|"routes support"| node_support
node_auth -.->|"reads accounts"| node_database
node_auth -->|"sends account mail"| node_notifications
node_notifications -->|"logs delivery"| node_database
node_worker -->|"locks jobs"| node_database
node_worker -.->|"runs reminders"| node_notifications
node_buyer -.->|"browses goods"| node_catalogue
node_buyer -.->|"builds purchase"| node_cart
node_buyer -.->|"requests quotes"| node_rfq
node_buyer -.->|"tracks orders"| node_orders
node_staff -.->|"verifies payments"| node_payments
node_staff -.->|"resolves claims"| node_claims
node_buyer -.->|"requests help"| node_support
node_supplier -.->|"submits products"| node_listing
node_listing -.->|"approves listings"| node_publishing
node_publishing -.->|"checks readiness"| node_pricing
node_orders -.->|"accrues after delivery"| node_loyalty
node_claims -.->|"credits loyalty"| node_loyalty
node_claims -.->|"hands off refunds"| node_payments

click node_http "https://github.com/abin368/stealth/blob/main/src/app.js"
click node_routing "https://github.com/abin368/stealth/blob/main/src/routes/index.js"
click node_auth "https://github.com/abin368/stealth/blob/main/src/modules/auth/auth.service.js"
click node_supplier "https://github.com/abin368/stealth/blob/main/src/modules/suppliers/supplier.service.js"
click node_listing "https://github.com/abin368/stealth/blob/main/src/modules/product-reviews/product-review.service.js"
click node_publishing "https://github.com/abin368/stealth/blob/main/src/modules/catalogue-publishing/catalogue-publishing.service.js"
click node_pricing "https://github.com/abin368/stealth/blob/main/src/modules/pricing/pricing.service.js"
click node_catalogue "https://github.com/abin368/stealth/blob/main/src/modules/catalogue/catalogue.service.js"
click node_cart "https://github.com/abin368/stealth/blob/main/src/modules/cart/cart.service.js"
click node_rfq "https://github.com/abin368/stealth/blob/main/src/modules/rfqs/rfq.service.js"
click node_orders "https://github.com/abin368/stealth/blob/main/src/modules/orders/order.service.js"
click node_supplierportal "https://github.com/abin368/stealth/blob/main/src/modules/supplier-dashboard/supplier-dashboard.service.js"
click node_customerportal "https://github.com/abin368/stealth/blob/main/src/modules/customer-dashboard/customer-dashboard.service.js"
click node_payments "https://github.com/abin368/stealth/blob/main/src/modules/payments/payment.service.js"
click node_claims "https://github.com/abin368/stealth/blob/main/src/modules/claims/claim.service.js"
click node_loyalty "https://github.com/abin368/stealth/blob/main/src/modules/loyalty/loyalty.service.js"
click node_support "https://github.com/abin368/stealth/blob/main/src/modules/support/support.service.js"
click node_notifications "https://github.com/abin368/stealth/blob/main/src/modules/notifications/notification.service.js"
click node_storage "https://github.com/abin368/stealth/blob/main/src/modules/uploads/storage/storage-provider.js"
click node_database "https://github.com/abin368/stealth/blob/main/src/config/prisma.js"
click node_worker "https://github.com/abin368/stealth/blob/main/src/jobs/job-worker.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_http,node_routing toneBlue
class node_supplier,node_listing,node_publishing,node_pricing,node_catalogue,node_cart,node_rfq,node_orders toneAmber
class node_supplierportal,node_customerportal toneMint
class node_payments,node_claims,node_loyalty,node_support toneRose
class node_auth,node_notifications,node_storage,node_database,node_worker,node_buyer,node_staff toneIndigo
```

## Components

### API entry

- [Express API](https://github.com/abin368/stealth/blob/main/src/app.js): `src/app.js`
- [API routes](https://github.com/abin368/stealth/blob/main/src/routes/index.js): `src/routes/index.js`

### Trade commerce

- [Supplier onboarding](https://github.com/abin368/stealth/blob/main/src/modules/suppliers/supplier.service.js): `src/modules/suppliers/supplier.service.js`
- [Product listing review](https://github.com/abin368/stealth/blob/main/src/modules/product-reviews/product-review.service.js): `src/modules/product-reviews/product-review.service.js`
- [Catalogue publishing](https://github.com/abin368/stealth/blob/main/src/modules/catalogue-publishing/catalogue-publishing.service.js): `src/modules/catalogue-publishing/catalogue-publishing.service.js`
- [Pricing](https://github.com/abin368/stealth/blob/main/src/modules/pricing/pricing.service.js): `src/modules/pricing/pricing.service.js`
- [Catalogue and search](https://github.com/abin368/stealth/blob/main/src/modules/catalogue/catalogue.service.js): `src/modules/catalogue/catalogue.service.js`
- [Cart and packing](https://github.com/abin368/stealth/blob/main/src/modules/cart/cart.service.js): `src/modules/cart/cart.service.js`
- [RFQs](https://github.com/abin368/stealth/blob/main/src/modules/rfqs/rfq.service.js): `src/modules/rfqs/rfq.service.js`
- [Order lifecycle](https://github.com/abin368/stealth/blob/main/src/modules/orders/order.service.js): `src/modules/orders/order.service.js`

### Buyer and supplier portals

- [Supplier portal](https://github.com/abin368/stealth/blob/main/src/modules/supplier-dashboard/supplier-dashboard.service.js): `src/modules/supplier-dashboard/supplier-dashboard.service.js`
- [Customer portal](https://github.com/abin368/stealth/blob/main/src/modules/customer-dashboard/customer-dashboard.service.js): `src/modules/customer-dashboard/customer-dashboard.service.js`

### Finance and support

- [Payments and finance](https://github.com/abin368/stealth/blob/main/src/modules/payments/payment.service.js): `src/modules/payments/payment.service.js`
- [Claims and refunds](https://github.com/abin368/stealth/blob/main/src/modules/claims/claim.service.js): `src/modules/claims/claim.service.js`
- [Loyalty and CAQ](https://github.com/abin368/stealth/blob/main/src/modules/loyalty/loyalty.service.js): `src/modules/loyalty/loyalty.service.js`
- [Support cases](https://github.com/abin368/stealth/blob/main/src/modules/support/support.service.js): `src/modules/support/support.service.js`

### Shared runtime

- [Authentication and RBAC](https://github.com/abin368/stealth/blob/main/src/modules/auth/auth.service.js): `src/modules/auth/auth.service.js`
- [Notification dispatch](https://github.com/abin368/stealth/blob/main/src/modules/notifications/notification.service.js): `src/modules/notifications/notification.service.js`
- [Upload storage](https://github.com/abin368/stealth/blob/main/src/modules/uploads/storage/storage-provider.js): `src/modules/uploads/storage/storage-provider.js`
- [PostgreSQL via Prisma](https://github.com/abin368/stealth/blob/main/src/config/prisma.js): `src/config/prisma.js`
- [Scheduled jobs](https://github.com/abin368/stealth/blob/main/src/jobs/job-worker.js): `src/jobs/job-worker.js`

### Other components

- **Business buyer**
- **Platform staff**

## Connections

- Business buyer → Express API: sends requests (evidence: `src/app.js`)
- Platform staff → Express API: sends requests (evidence: `src/app.js`)
- Express API → API routes: mounts routes (evidence: `src/app.js`)
- API routes → Authentication and RBAC: routes auth (evidence: `src/routes/index.js`)
- API routes → Supplier onboarding: routes suppliers (evidence: `src/routes/index.js`)
- API routes → Product listing review: routes review (evidence: `src/routes/index.js`)
- API routes → Catalogue publishing: routes publishing (evidence: `src/routes/index.js`)
- API routes → Pricing: routes pricing (evidence: `src/routes/index.js`)
- API routes → Catalogue and search: routes catalogue (evidence: `src/routes/index.js`)
- API routes → Cart and packing: routes cart (evidence: `src/routes/index.js`)
- API routes → RFQs: routes RFQs (evidence: `src/routes/index.js`)
- API routes → Order lifecycle: routes orders (evidence: `src/routes/index.js`)
- API routes → Supplier portal: routes portal (evidence: `src/routes/index.js`)
- API routes → Customer portal: routes portal (evidence: `src/routes/index.js`)
- API routes → Payments and finance: routes payments (evidence: `src/routes/index.js`)
- API routes → Claims and refunds: routes claims (evidence: `src/routes/index.js`)
- API routes → Loyalty and CAQ: routes loyalty (evidence: `src/routes/index.js`)
- API routes → Support cases: routes support (evidence: `src/routes/index.js`)
- Authentication and RBAC → PostgreSQL via Prisma: reads accounts
- Authentication and RBAC → Notification dispatch: sends account mail (evidence: `src/modules/auth/auth.service.js`)
- Notification dispatch → PostgreSQL via Prisma: logs delivery (evidence: `src/modules/notifications/notification.service.js`)
- Scheduled jobs → PostgreSQL via Prisma: locks jobs (evidence: `src/jobs/job-worker.js`)
- Scheduled jobs → Notification dispatch: runs reminders
- Business buyer → Catalogue and search: browses goods (evidence: `README.md`)
- Business buyer → Cart and packing: builds purchase (evidence: `README.md`)
- Business buyer → RFQs: requests quotes (evidence: `README.md`)
- Business buyer → Order lifecycle: tracks orders (evidence: `README.md`)
- Platform staff → Payments and finance: verifies payments (evidence: `README.md`)
- Platform staff → Claims and refunds: resolves claims (evidence: `README.md`)
- Business buyer → Support cases: requests help (evidence: `README.md`)
- Supplier onboarding → Product listing review: submits products (evidence: `README.md`)
- Product listing review → Catalogue publishing: approves listings (evidence: `README.md`)
- Catalogue publishing → Pricing: checks readiness (evidence: `README.md`)
- Order lifecycle → Loyalty and CAQ: accrues after delivery (evidence: `README.md`)
- Claims and refunds → Loyalty and CAQ: credits loyalty (evidence: `README.md`)
- Claims and refunds → Payments and finance: hands off refunds (evidence: `README.md`)
