# biswa-9348/mainflow-task-1-shopstream architecture

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

- Interactive diagram: https://gitdiagram.com/biswa-9348/mainflow-task-1-shopstream
- Repository: https://github.com/biswa-9348/mainflow-task-1-shopstream

## Overview

ShopStream is a full-stack commerce showcase. Shoppers browse the catalog and manage a cart; administrators curate products, with authentication supporting both roles. The README documents a React client, an Express API, MongoDB persistence, JWT authentication, and optional Cloudinary uploads. The supplied tree and source excerpt contain no client or server implementation files, so the graph reflects documented capabilities only; dashed edges mark relationships whose implementation could not be verified.

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Shopper and Admin Client"]
  node_webapp["React Client"]
end

subgraph group_api["Commerce API"]
  node_identity["Authentication"]
  node_catalog["Product Catalog"]
  node_cart["Shopping Cart"]
end

subgraph group_services["Persistence and Integrations"]
  node_database[("MongoDB")]
  node_images["Cloudinary Uploads"]
end

node_shopper(("Shopper"))
node_admin(("Administrator"))

node_shopper -.->|"uses"| node_webapp
node_admin -.->|"uses"| node_webapp
node_webapp -.->|"authenticates via"| node_identity
node_webapp -.->|"requests products"| node_catalog
node_webapp -.->|"manages cart"| node_cart
node_webapp -.->|"administers products"| node_catalog
node_identity -.->|"persists users"| node_database
node_catalog -.->|"persists products"| node_database
node_cart -.->|"persists cart"| node_database
node_catalog -.->|"uploads images"| node_images

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_webapp toneBlue
class node_identity,node_catalog,node_cart toneAmber
class node_database,node_images toneMint
class node_shopper,node_admin toneIndigo
```

## Components

### Shopper and Admin Client

- **React Client**

### Commerce API

- **Authentication**
- **Product Catalog**
- **Shopping Cart**

### Persistence and Integrations

- **MongoDB**
- **Cloudinary Uploads**

### Other components

- **Shopper**
- **Administrator**

## Connections

- Shopper → React Client: uses
- Administrator → React Client: uses
- React Client → Authentication: authenticates via
- React Client → Product Catalog: requests products
- React Client → Shopping Cart: manages cart
- React Client → Product Catalog: administers products
- Authentication → MongoDB: persists users
- Product Catalog → MongoDB: persists products
- Shopping Cart → MongoDB: persists cart
- Product Catalog → Cloudinary Uploads: uploads images
