# rzhvms/productstore architecture

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

- Interactive diagram: https://gitdiagram.com/rzhvms/productstore
- Repository: https://github.com/rzhvms/productstore

## Overview

ProductStore is a food e-commerce application: shoppers browse products, manage a cart, authenticate, provide delivery details, place orders and pay; administrators manage catalog, categories, users and reviews. The Vue client calls a .NET REST API, whose controllers dispatch to application use cases and infrastructure adapters. README documents PostgreSQL, Redis, MinIO, SMTP and Yandex address suggestions. Several implementation links below rely on README capabilities or indexed imports because their source was not sampled; these evidence limits are reflected in citations or dashed links.

Main entry points: [`front/front-food-shop/src/services/api.js`](https://github.com/rzhvms/productstore/blob/main/front/front-food-shop/src/services/api.js) (API client), [`front/front-food-shop/src/router/index.js`](https://github.com/rzhvms/productstore/blob/main/front/front-food-shop/src/router/index.js) (Storefront routes), [`api/ServiceApi/Api/Controllers/AuthController/AuthController.cs`](https://github.com/rzhvms/productstore/blob/main/api/ServiceApi/Api/Controllers/AuthController/AuthController.cs) (Authentication API), [`front/front-food-shop/src/pages/cart/Index.vue`](https://github.com/rzhvms/productstore/blob/main/front/front-food-shop/src/pages/cart/Index.vue) (Cart and checkout)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Vue storefront"]
  node_web["Storefront routes<br/>[index.js]"]
  node_authstate["Auth state<br/>[auth.js]"]
  node_cartui["Cart and checkout<br/>[Index.vue]"]
  node_catalogui["Catalog pages<br/>[ProductCard.vue]"]
  node_adminui["Admin pages<br/>[AdminProducts.vue]"]
  node_api_client["API client<br/>[api.js]"]
end

subgraph group_identity["Identity and accounts"]
  node_auth_api["Authentication API<br/>[AuthController.cs]"]
  node_auth_flow["Auth use cases<br/>[LoginUseCase.cs]"]
  node_user_api["User management<br/>[UserController.cs]"]
  node_account_flow["Account use cases"]
  node_email["SMTP email<br/>[EmailService.cs]"]
end

subgraph group_catalog["Catalog and engagement"]
  node_catalog_api["Catalog and categories"]
  node_product_flow["Product management<br/>[ProductUseCase.cs]"]
  node_review_api["Product reviews"]
  node_images["Product images<br/>[ImageUseCase.cs]"]
end

subgraph group_commerce["Cart and fulfillment"]
  node_cart_api["Cart operations<br/>[CartController.cs]"]
  node_cart_flow["Cart use case<br/>[CartUseCase.cs]"]
  node_order_api["Order operations<br/>[OrderController.cs]"]
  node_order_flow["Order use case<br/>[OrderUseCase.cs]"]
  node_payment["Payment handling<br/>[PaymentUseCase.cs]"]
  node_address["Address suggestions"]
end

subgraph group_backend["API and infrastructure"]
  node_auth_store[("User and token store<br/>[AuthRepository.cs]")]
  node_review_store[("Review persistence")]
  node_redis[("Redis cart")]
  node_postgres[("PostgreSQL")]
  node_minio[("MinIO object store")]
end

node_shopper(("Shopper"))
node_admin(("Administrator"))
node_yandex["Yandex Suggest"]

node_shopper -->|"browses and shops"| node_web
node_admin -->|"manages store"| node_web
node_web -->|"checks session"| node_authstate
node_web -->|"routes to"| node_catalogui
node_web -->|"routes to"| node_cartui
node_web -->|"routes to"| node_adminui
node_authstate -->|"calls auth methods"| node_api_client
node_catalogui -.->|"requests catalog"| node_api_client
node_cartui -.->|"requests cart"| node_api_client
node_adminui -.->|"requests admin actions"| node_api_client
node_api_client -.->|"calls REST API"| node_auth_api
node_api_client -.->|"calls REST API"| node_catalog_api
node_api_client -.->|"calls REST API"| node_cart_api
node_api_client -.->|"calls REST API"| node_order_api
node_auth_api -->|"dispatches to"| node_auth_flow
node_auth_flow -.->|"persists identity"| node_auth_store
node_auth_api -.->|"triggers verification"| node_email
node_auth_api -.->|"serves account requests"| node_user_api
node_user_api -->|"dispatches to"| node_account_flow
node_account_flow -.->|"stores account data"| node_auth_store
node_catalog_api -.->|"dispatches to"| node_product_flow
node_product_flow -.->|"reads and writes"| node_postgres
node_review_api -.->|"persists reviews"| node_review_store
node_catalog_api -.->|"manages product images"| node_images
node_images -.->|"stores product files"| node_minio
node_cart_api -->|"dispatches to"| node_cart_flow
node_cart_flow -.->|"stores cart"| node_redis
node_order_api -->|"dispatches to"| node_order_flow
node_order_flow -.->|"stores orders"| node_postgres
node_order_api -.->|"payment workflow"| node_payment
node_payment -.->|"stores payment data"| node_postgres
node_cartui -.->|"requests suggestions"| node_address
node_address -.->|"queries suggestions"| node_yandex
node_review_api -.->|"uses product domain"| node_product_flow

click node_web "https://github.com/rzhvms/productstore/blob/main/front/front-food-shop/src/router/index.js"
click node_authstate "https://github.com/rzhvms/productstore/blob/main/front/front-food-shop/src/stores/auth.js"
click node_cartui "https://github.com/rzhvms/productstore/blob/main/front/front-food-shop/src/pages/cart/Index.vue"
click node_catalogui "https://github.com/rzhvms/productstore/blob/main/front/front-food-shop/src/pages/catalog/ProductCard.vue"
click node_adminui "https://github.com/rzhvms/productstore/blob/main/front/front-food-shop/src/pages/admin/AdminProducts.vue"
click node_api_client "https://github.com/rzhvms/productstore/blob/main/front/front-food-shop/src/services/api.js"
click node_auth_api "https://github.com/rzhvms/productstore/blob/main/api/ServiceApi/Api/Controllers/AuthController/AuthController.cs"
click node_auth_flow "https://github.com/rzhvms/productstore/blob/main/api/ServiceApi/Application/UseCases/Auth/Login/LoginUseCase.cs"
click node_user_api "https://github.com/rzhvms/productstore/blob/main/api/ServiceApi/Api/Controllers/UserController/UserController.cs"
click node_account_flow "https://github.com/rzhvms/productstore/blob/main/api/ServiceApi/Application/UseCases/User/UpdateUserInfo/UpdateUserInfoUseCase.cs"
click node_auth_store "https://github.com/rzhvms/productstore/blob/main/api/ServiceApi/Infrastructure/Repositories/Auth/AuthRepository.cs"
click node_catalog_api "https://github.com/rzhvms/productstore/blob/main/api/ServiceApi/Api/Controllers/ProductController/ClientProductController.cs"
click node_product_flow "https://github.com/rzhvms/productstore/blob/main/api/ServiceApi/Application/UseCases/Product/ProductUseCase.cs"
click node_review_api "https://github.com/rzhvms/productstore/blob/main/api/ServiceApi/Api/Controllers/ProductController/ProductReviewController.cs"
click node_review_store "https://github.com/rzhvms/productstore/blob/main/api/ServiceApi/Infrastructure/Repositories/Product/ProductReviewRepository.cs"
click node_images "https://github.com/rzhvms/productstore/blob/main/api/ServiceApi/Application/UseCases/Image/ImageUseCase.cs"
click node_cart_api "https://github.com/rzhvms/productstore/blob/main/api/ServiceApi/Api/Controllers/CartController/CartController.cs"
click node_cart_flow "https://github.com/rzhvms/productstore/blob/main/api/ServiceApi/Application/UseCases/Cart/CartUseCase.cs"
click node_redis "https://github.com/rzhvms/productstore/blob/main/api/ServiceApi/Infrastructure/Repositories/Cart/RedisCartRepository.cs"
click node_order_api "https://github.com/rzhvms/productstore/blob/main/api/ServiceApi/Api/Controllers/OrderController/OrderController.cs"
click node_order_flow "https://github.com/rzhvms/productstore/blob/main/api/ServiceApi/Application/UseCases/Order/OrderUseCase.cs"
click node_payment "https://github.com/rzhvms/productstore/blob/main/api/ServiceApi/Application/UseCases/Payment/PaymentUseCase.cs"
click node_address "https://github.com/rzhvms/productstore/blob/main/api/ServiceApi/Application/UseCases/YandexMapsAddress/YandexMapsAddressUseCase.cs"
click node_email "https://github.com/rzhvms/productstore/blob/main/api/ServiceApi/Infrastructure/Services/Email/EmailService.cs"

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_web,node_authstate,node_cartui,node_catalogui,node_adminui,node_api_client toneBlue
class node_auth_api,node_auth_flow,node_user_api,node_account_flow,node_email toneAmber
class node_catalog_api,node_product_flow,node_review_api,node_images toneMint
class node_cart_api,node_cart_flow,node_order_api,node_order_flow,node_payment,node_address toneRose
class node_auth_store,node_review_store,node_redis,node_postgres,node_minio,node_shopper,node_admin,node_yandex toneIndigo
```

## Components

### Vue storefront

- [Storefront routes](https://github.com/rzhvms/productstore/blob/main/front/front-food-shop/src/router/index.js): `front/front-food-shop/src/router/index.js`
- [Auth state](https://github.com/rzhvms/productstore/blob/main/front/front-food-shop/src/stores/auth.js): `front/front-food-shop/src/stores/auth.js`
- [Cart and checkout](https://github.com/rzhvms/productstore/blob/main/front/front-food-shop/src/pages/cart/Index.vue): `front/front-food-shop/src/pages/cart/Index.vue`
- [Catalog pages](https://github.com/rzhvms/productstore/blob/main/front/front-food-shop/src/pages/catalog/ProductCard.vue): `front/front-food-shop/src/pages/catalog/ProductCard.vue`
- [Admin pages](https://github.com/rzhvms/productstore/blob/main/front/front-food-shop/src/pages/admin/AdminProducts.vue): `front/front-food-shop/src/pages/admin/AdminProducts.vue`
- [API client](https://github.com/rzhvms/productstore/blob/main/front/front-food-shop/src/services/api.js): `front/front-food-shop/src/services/api.js`

### Identity and accounts

- [Authentication API](https://github.com/rzhvms/productstore/blob/main/api/ServiceApi/Api/Controllers/AuthController/AuthController.cs): `api/ServiceApi/Api/Controllers/AuthController/AuthController.cs`
- [Auth use cases](https://github.com/rzhvms/productstore/blob/main/api/ServiceApi/Application/UseCases/Auth/Login/LoginUseCase.cs): `api/ServiceApi/Application/UseCases/Auth/Login/LoginUseCase.cs`
- [User management](https://github.com/rzhvms/productstore/blob/main/api/ServiceApi/Api/Controllers/UserController/UserController.cs): `api/ServiceApi/Api/Controllers/UserController/UserController.cs`
- [Account use cases](https://github.com/rzhvms/productstore/blob/main/api/ServiceApi/Application/UseCases/User/UpdateUserInfo/UpdateUserInfoUseCase.cs): `api/ServiceApi/Application/UseCases/User/UpdateUserInfo/UpdateUserInfoUseCase.cs`
- [SMTP email](https://github.com/rzhvms/productstore/blob/main/api/ServiceApi/Infrastructure/Services/Email/EmailService.cs): `api/ServiceApi/Infrastructure/Services/Email/EmailService.cs`

### Catalog and engagement

- [Catalog and categories](https://github.com/rzhvms/productstore/blob/main/api/ServiceApi/Api/Controllers/ProductController/ClientProductController.cs): `api/ServiceApi/Api/Controllers/ProductController/ClientProductController.cs`
- [Product management](https://github.com/rzhvms/productstore/blob/main/api/ServiceApi/Application/UseCases/Product/ProductUseCase.cs): `api/ServiceApi/Application/UseCases/Product/ProductUseCase.cs`
- [Product reviews](https://github.com/rzhvms/productstore/blob/main/api/ServiceApi/Api/Controllers/ProductController/ProductReviewController.cs): `api/ServiceApi/Api/Controllers/ProductController/ProductReviewController.cs`
- [Product images](https://github.com/rzhvms/productstore/blob/main/api/ServiceApi/Application/UseCases/Image/ImageUseCase.cs): `api/ServiceApi/Application/UseCases/Image/ImageUseCase.cs`

### Cart and fulfillment

- [Cart operations](https://github.com/rzhvms/productstore/blob/main/api/ServiceApi/Api/Controllers/CartController/CartController.cs): `api/ServiceApi/Api/Controllers/CartController/CartController.cs`
- [Cart use case](https://github.com/rzhvms/productstore/blob/main/api/ServiceApi/Application/UseCases/Cart/CartUseCase.cs): `api/ServiceApi/Application/UseCases/Cart/CartUseCase.cs`
- [Order operations](https://github.com/rzhvms/productstore/blob/main/api/ServiceApi/Api/Controllers/OrderController/OrderController.cs): `api/ServiceApi/Api/Controllers/OrderController/OrderController.cs`
- [Order use case](https://github.com/rzhvms/productstore/blob/main/api/ServiceApi/Application/UseCases/Order/OrderUseCase.cs): `api/ServiceApi/Application/UseCases/Order/OrderUseCase.cs`
- [Payment handling](https://github.com/rzhvms/productstore/blob/main/api/ServiceApi/Application/UseCases/Payment/PaymentUseCase.cs): `api/ServiceApi/Application/UseCases/Payment/PaymentUseCase.cs`
- [Address suggestions](https://github.com/rzhvms/productstore/blob/main/api/ServiceApi/Application/UseCases/YandexMapsAddress/YandexMapsAddressUseCase.cs): `api/ServiceApi/Application/UseCases/YandexMapsAddress/YandexMapsAddressUseCase.cs`

### API and infrastructure

- [User and token store](https://github.com/rzhvms/productstore/blob/main/api/ServiceApi/Infrastructure/Repositories/Auth/AuthRepository.cs): `api/ServiceApi/Infrastructure/Repositories/Auth/AuthRepository.cs`
- [Review persistence](https://github.com/rzhvms/productstore/blob/main/api/ServiceApi/Infrastructure/Repositories/Product/ProductReviewRepository.cs): `api/ServiceApi/Infrastructure/Repositories/Product/ProductReviewRepository.cs`
- [Redis cart](https://github.com/rzhvms/productstore/blob/main/api/ServiceApi/Infrastructure/Repositories/Cart/RedisCartRepository.cs): `api/ServiceApi/Infrastructure/Repositories/Cart/RedisCartRepository.cs`
- **PostgreSQL**
- **MinIO object store**

### Other components

- **Shopper**
- **Administrator**
- **Yandex Suggest**

## Connections

- Shopper → Storefront routes: browses and shops
- Administrator → Storefront routes: manages store
- Storefront routes → Auth state: checks session
- Storefront routes → Catalog pages: routes to (evidence: `front/front-food-shop/src/router/index.js`)
- Storefront routes → Cart and checkout: routes to (evidence: `front/front-food-shop/src/router/index.js`)
- Storefront routes → Admin pages: routes to (evidence: `front/front-food-shop/src/router/index.js`)
- Auth state → API client: calls auth methods (evidence: `front/front-food-shop/src/stores/auth.js`)
- Catalog pages → API client: requests catalog
- Cart and checkout → API client: requests cart
- Admin pages → API client: requests admin actions
- API client → Authentication API: calls REST API
- API client → Catalog and categories: calls REST API
- API client → Cart operations: calls REST API
- API client → Order operations: calls REST API
- Authentication API → Auth use cases: dispatches to (evidence: `api/ServiceApi/Api/Controllers/AuthController/AuthController.cs`)
- Auth use cases → User and token store: persists identity
- Authentication API → SMTP email: triggers verification
- Authentication API → User management: serves account requests
- User management → Account use cases: dispatches to (evidence: `api/ServiceApi/Api/Controllers/UserController/UserController.cs`)
- Account use cases → User and token store: stores account data
- Catalog and categories → Product management: dispatches to
- Product management → PostgreSQL: reads and writes
- Product reviews → Review persistence: persists reviews
- Catalog and categories → Product images: manages product images
- Product images → MinIO object store: stores product files
- Cart operations → Cart use case: dispatches to (evidence: `api/ServiceApi/Api/Controllers/CartController/CartController.cs`)
- Cart use case → Redis cart: stores cart
- Order operations → Order use case: dispatches to (evidence: `api/ServiceApi/Api/Controllers/OrderController/OrderController.cs`)
- Order use case → PostgreSQL: stores orders
- Order operations → Payment handling: payment workflow
- Payment handling → PostgreSQL: stores payment data
- Cart and checkout → Address suggestions: requests suggestions
- Address suggestions → Yandex Suggest: queries suggestions
- Product reviews → Product management: uses product domain
