# eneskllokoqi1/shopsphere architecture

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

- Interactive diagram: https://gitdiagram.com/eneskllokoqi1/shopsphere
- Repository: https://github.com/eneskllokoqi1/shopsphere

## Overview

ShopService is an e-commerce backend API. The principal customer journey is account access, product discovery, cart management, and order placement; catalog, category, coupon, and review operations are distinct supporting capabilities. The application separates HTTP controllers, application services, domain entities, and EF Core persistence. Source excerpts and the index support several concrete calls and persistence links; for unsampled feature implementations, the graph preserves their modules but omits unverified call relationships.

Main entry points: [`src/ShopService/ShopService.Infrastructure/Data/AppDbContext.cs`](https://github.com/eneskllokoqi1/shopsphere/blob/main/src/ShopService/ShopService.Infrastructure/Data/AppDbContext.cs) (EF Core Context), [`src/ShopService/ShopService.Application/Service/ReviewService.cs`](https://github.com/eneskllokoqi1/shopsphere/blob/main/src/ShopService/ShopService.Application/Service/ReviewService.cs) (Review Service), [`src/ShopService/ShopService.Domain/Entities/Review.cs`](https://github.com/eneskllokoqi1/shopsphere/blob/main/src/ShopService/ShopService.Domain/Entities/Review.cs) (Review), [`src/ShopService/ShopService.Infrastructure/Repositories/ReviewRepository.cs`](https://github.com/eneskllokoqi1/shopsphere/blob/main/src/ShopService/ShopService.Infrastructure/Repositories/ReviewRepository.cs) (Review Repository)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["HTTP API"]
  node_auth_api["Authentication API<br/>[AuthController.cs]"]
  node_catalog_api["Product API"]
  node_categories_api["Category API"]
  node_cart_api["Cart API<br/>[CartController.cs]"]
  node_orders_api["Order API<br/>[OrderController.cs]"]
  node_coupons_api["Coupon API"]
  node_reviews_api["Review API"]
end

subgraph group_app["Application Services"]
  node_auth_service["Identity Service<br/>[AuthService.cs]"]
  node_catalog_service["Product Service<br/>[ProductService.cs]"]
  node_category_service["Category Service<br/>[CategoryService.cs]"]
  node_cart_service["Cart Service<br/>[CartService.cs]"]
  node_order_service["Order Service<br/>[OrderService.cs]"]
  node_coupon_service["Coupon Service<br/>[CouponService.cs]"]
  node_review_service["Review Service<br/>[ReviewService.cs]"]
  node_review_repo_contract["Review Repository Contract"]
  node_coupon_repo_contract["Coupon Repository Contract"]
  node_review_response["Review Response"]
  node_order_response["Order Response"]
  node_product_response["Product Response"]
  node_coupon_response["Coupon Responses"]
end

subgraph group_domain["Commerce Domain"]
  node_user["User<br/>[User.cs]"]
  node_product["Product<br/>[Product.cs]"]
  node_coupon["Coupon<br/>[Coupon.cs]"]
  node_order["Order<br/>[Order.cs]"]
  node_order_status["Order Status<br/>[OrderStatus.cs]"]
  node_order_item["Order Item<br/>[OrderItem.cs]"]
  node_review["Review<br/>[Review.cs]"]
end

subgraph group_data["Persistence"]
  node_db[("EF Core Context<br/>[AppDbContext.cs]")]
  node_review_repo["Review Repository"]
  node_order_repo["Order Repository<br/>[OrderRepository.cs]"]
end

node_shopper(("Shopper"))

node_shopper -.->|"uses"| node_auth_api
node_shopper -.->|"browses"| node_catalog_api
node_shopper -.->|"manages"| node_cart_api
node_shopper -.->|"places orders"| node_orders_api
node_shopper -.->|"reviews products"| node_reviews_api
node_auth_api -->|"calls"| node_auth_service
node_catalog_api -->|"calls"| node_catalog_service
node_categories_api -->|"calls"| node_category_service
node_cart_api -->|"calls"| node_cart_service
node_orders_api -->|"calls"| node_order_service
node_coupons_api -->|"calls"| node_coupon_service
node_reviews_api -->|"calls"| node_review_service
node_review_service -->|"delegates to"| node_review_repo_contract
node_review_repo -->|"reads and writes"| node_db
node_order_repo -->|"reads and writes"| node_db
node_review_repo -->|"maps and persists"| node_review
node_review_service -->|"maps"| node_review
node_order_repo -->|"uses"| node_coupon_repo_contract
node_db -->|"maps"| node_order
node_db -->|"maps"| node_order_item
node_db -->|"maps"| node_review
node_db -->|"maps"| node_product
node_db -->|"maps"| node_coupon
node_db -->|"maps"| node_user
node_order -->|"tracks"| node_order_status

click node_auth_api "https://github.com/eneskllokoqi1/shopsphere/blob/main/src/ShopService/ShopService.API/Controllers/AuthController.cs"
click node_catalog_api "https://github.com/eneskllokoqi1/shopsphere/blob/main/src/ShopService/ShopService.API/Controllers/ProductController.cs"
click node_categories_api "https://github.com/eneskllokoqi1/shopsphere/blob/main/src/ShopService/ShopService.API/Controllers/CategoriesController.cs"
click node_cart_api "https://github.com/eneskllokoqi1/shopsphere/blob/main/src/ShopService/ShopService.API/Controllers/CartController.cs"
click node_orders_api "https://github.com/eneskllokoqi1/shopsphere/blob/main/src/ShopService/ShopService.API/Controllers/OrderController.cs"
click node_coupons_api "https://github.com/eneskllokoqi1/shopsphere/blob/main/src/ShopService/ShopService.API/Controllers/CouponController.cs"
click node_reviews_api "https://github.com/eneskllokoqi1/shopsphere/blob/main/src/ShopService/ShopService.API/Controllers/ReviewController.cs"
click node_auth_service "https://github.com/eneskllokoqi1/shopsphere/blob/main/src/ShopService/ShopService.Application/Service/AuthService.cs"
click node_catalog_service "https://github.com/eneskllokoqi1/shopsphere/blob/main/src/ShopService/ShopService.Application/Service/ProductService.cs"
click node_category_service "https://github.com/eneskllokoqi1/shopsphere/blob/main/src/ShopService/ShopService.Application/Service/CategoryService.cs"
click node_cart_service "https://github.com/eneskllokoqi1/shopsphere/blob/main/src/ShopService/ShopService.Application/Service/CartService.cs"
click node_order_service "https://github.com/eneskllokoqi1/shopsphere/blob/main/src/ShopService/ShopService.Application/Service/OrderService.cs"
click node_coupon_service "https://github.com/eneskllokoqi1/shopsphere/blob/main/src/ShopService/ShopService.Application/Service/CouponService.cs"
click node_review_service "https://github.com/eneskllokoqi1/shopsphere/blob/main/src/ShopService/ShopService.Application/Service/ReviewService.cs"
click node_review_repo_contract "https://github.com/eneskllokoqi1/shopsphere/blob/main/src/ShopService/ShopService.Application/Interfaces/IReviewRepository.cs"
click node_coupon_repo_contract "https://github.com/eneskllokoqi1/shopsphere/blob/main/src/ShopService/ShopService.Application/Interfaces/ICouponRepository.cs"
click node_review_response "https://github.com/eneskllokoqi1/shopsphere/blob/main/src/ShopService/ShopService.Application/DTOs/ReviewDTOs/ReviewResponseDTO.cs"
click node_order_response "https://github.com/eneskllokoqi1/shopsphere/blob/main/src/ShopService/ShopService.Application/DTOs/OrderDTOs/OrderResponseDTO.cs"
click node_product_response "https://github.com/eneskllokoqi1/shopsphere/blob/main/src/ShopService/ShopService.Application/DTOs/ProductDTOs/ProductResponseDTO.cs"
click node_coupon_response "https://github.com/eneskllokoqi1/shopsphere/blob/main/src/ShopService/ShopService.Application/DTOs/CouponDTOs/CouponResponseDTO.cs"
click node_user "https://github.com/eneskllokoqi1/shopsphere/blob/main/src/ShopService/ShopService.Domain/Entities/User.cs"
click node_product "https://github.com/eneskllokoqi1/shopsphere/blob/main/src/ShopService/ShopService.Domain/Entities/Product.cs"
click node_coupon "https://github.com/eneskllokoqi1/shopsphere/blob/main/src/ShopService/ShopService.Domain/Entities/Coupon.cs"
click node_order "https://github.com/eneskllokoqi1/shopsphere/blob/main/src/ShopService/ShopService.Domain/Entities/Order.cs"
click node_order_status "https://github.com/eneskllokoqi1/shopsphere/blob/main/src/ShopService/ShopService.Domain/Enums/OrderStatus.cs"
click node_order_item "https://github.com/eneskllokoqi1/shopsphere/blob/main/src/ShopService/ShopService.Domain/Entities/OrderItem.cs"
click node_review "https://github.com/eneskllokoqi1/shopsphere/blob/main/src/ShopService/ShopService.Domain/Entities/Review.cs"
click node_db "https://github.com/eneskllokoqi1/shopsphere/blob/main/src/ShopService/ShopService.Infrastructure/Data/AppDbContext.cs"
click node_review_repo "https://github.com/eneskllokoqi1/shopsphere/blob/main/src/ShopService/ShopService.Infrastructure/Repositories/ReviewRepository.cs"
click node_order_repo "https://github.com/eneskllokoqi1/shopsphere/blob/main/src/ShopService/ShopService.Infrastructure/Repositories/OrderRepository.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_auth_api,node_catalog_api,node_categories_api,node_cart_api,node_orders_api,node_coupons_api,node_reviews_api toneBlue
class node_auth_service,node_catalog_service,node_category_service,node_cart_service,node_order_service,node_coupon_service,node_review_service,node_review_repo_contract,node_coupon_repo_contract,node_review_response,node_order_response,node_product_response,node_coupon_response toneAmber
class node_user,node_product,node_coupon,node_order,node_order_status,node_order_item,node_review toneMint
class node_db,node_review_repo,node_order_repo toneRose
class node_shopper toneIndigo
```

## Components

### HTTP API

- [Authentication API](https://github.com/eneskllokoqi1/shopsphere/blob/main/src/ShopService/ShopService.API/Controllers/AuthController.cs): `src/ShopService/ShopService.API/Controllers/AuthController.cs`
- [Product API](https://github.com/eneskllokoqi1/shopsphere/blob/main/src/ShopService/ShopService.API/Controllers/ProductController.cs): `src/ShopService/ShopService.API/Controllers/ProductController.cs`
- [Category API](https://github.com/eneskllokoqi1/shopsphere/blob/main/src/ShopService/ShopService.API/Controllers/CategoriesController.cs): `src/ShopService/ShopService.API/Controllers/CategoriesController.cs`
- [Cart API](https://github.com/eneskllokoqi1/shopsphere/blob/main/src/ShopService/ShopService.API/Controllers/CartController.cs): `src/ShopService/ShopService.API/Controllers/CartController.cs`
- [Order API](https://github.com/eneskllokoqi1/shopsphere/blob/main/src/ShopService/ShopService.API/Controllers/OrderController.cs): `src/ShopService/ShopService.API/Controllers/OrderController.cs`
- [Coupon API](https://github.com/eneskllokoqi1/shopsphere/blob/main/src/ShopService/ShopService.API/Controllers/CouponController.cs): `src/ShopService/ShopService.API/Controllers/CouponController.cs`
- [Review API](https://github.com/eneskllokoqi1/shopsphere/blob/main/src/ShopService/ShopService.API/Controllers/ReviewController.cs): `src/ShopService/ShopService.API/Controllers/ReviewController.cs`

### Application Services

- [Identity Service](https://github.com/eneskllokoqi1/shopsphere/blob/main/src/ShopService/ShopService.Application/Service/AuthService.cs): `src/ShopService/ShopService.Application/Service/AuthService.cs`
- [Product Service](https://github.com/eneskllokoqi1/shopsphere/blob/main/src/ShopService/ShopService.Application/Service/ProductService.cs): `src/ShopService/ShopService.Application/Service/ProductService.cs`
- [Category Service](https://github.com/eneskllokoqi1/shopsphere/blob/main/src/ShopService/ShopService.Application/Service/CategoryService.cs): `src/ShopService/ShopService.Application/Service/CategoryService.cs`
- [Cart Service](https://github.com/eneskllokoqi1/shopsphere/blob/main/src/ShopService/ShopService.Application/Service/CartService.cs): `src/ShopService/ShopService.Application/Service/CartService.cs`
- [Order Service](https://github.com/eneskllokoqi1/shopsphere/blob/main/src/ShopService/ShopService.Application/Service/OrderService.cs): `src/ShopService/ShopService.Application/Service/OrderService.cs`
- [Coupon Service](https://github.com/eneskllokoqi1/shopsphere/blob/main/src/ShopService/ShopService.Application/Service/CouponService.cs): `src/ShopService/ShopService.Application/Service/CouponService.cs`
- [Review Service](https://github.com/eneskllokoqi1/shopsphere/blob/main/src/ShopService/ShopService.Application/Service/ReviewService.cs): `src/ShopService/ShopService.Application/Service/ReviewService.cs`
- [Review Repository Contract](https://github.com/eneskllokoqi1/shopsphere/blob/main/src/ShopService/ShopService.Application/Interfaces/IReviewRepository.cs): `src/ShopService/ShopService.Application/Interfaces/IReviewRepository.cs`
- [Coupon Repository Contract](https://github.com/eneskllokoqi1/shopsphere/blob/main/src/ShopService/ShopService.Application/Interfaces/ICouponRepository.cs): `src/ShopService/ShopService.Application/Interfaces/ICouponRepository.cs`
- [Review Response](https://github.com/eneskllokoqi1/shopsphere/blob/main/src/ShopService/ShopService.Application/DTOs/ReviewDTOs/ReviewResponseDTO.cs): `src/ShopService/ShopService.Application/DTOs/ReviewDTOs/ReviewResponseDTO.cs`
- [Order Response](https://github.com/eneskllokoqi1/shopsphere/blob/main/src/ShopService/ShopService.Application/DTOs/OrderDTOs/OrderResponseDTO.cs): `src/ShopService/ShopService.Application/DTOs/OrderDTOs/OrderResponseDTO.cs`
- [Product Response](https://github.com/eneskllokoqi1/shopsphere/blob/main/src/ShopService/ShopService.Application/DTOs/ProductDTOs/ProductResponseDTO.cs): `src/ShopService/ShopService.Application/DTOs/ProductDTOs/ProductResponseDTO.cs`
- [Coupon Responses](https://github.com/eneskllokoqi1/shopsphere/blob/main/src/ShopService/ShopService.Application/DTOs/CouponDTOs/CouponResponseDTO.cs): `src/ShopService/ShopService.Application/DTOs/CouponDTOs/CouponResponseDTO.cs`

### Commerce Domain

- [User](https://github.com/eneskllokoqi1/shopsphere/blob/main/src/ShopService/ShopService.Domain/Entities/User.cs): `src/ShopService/ShopService.Domain/Entities/User.cs`
- [Product](https://github.com/eneskllokoqi1/shopsphere/blob/main/src/ShopService/ShopService.Domain/Entities/Product.cs): `src/ShopService/ShopService.Domain/Entities/Product.cs`
- [Coupon](https://github.com/eneskllokoqi1/shopsphere/blob/main/src/ShopService/ShopService.Domain/Entities/Coupon.cs): `src/ShopService/ShopService.Domain/Entities/Coupon.cs`
- [Order](https://github.com/eneskllokoqi1/shopsphere/blob/main/src/ShopService/ShopService.Domain/Entities/Order.cs): `src/ShopService/ShopService.Domain/Entities/Order.cs`
- [Order Status](https://github.com/eneskllokoqi1/shopsphere/blob/main/src/ShopService/ShopService.Domain/Enums/OrderStatus.cs): `src/ShopService/ShopService.Domain/Enums/OrderStatus.cs`
- [Order Item](https://github.com/eneskllokoqi1/shopsphere/blob/main/src/ShopService/ShopService.Domain/Entities/OrderItem.cs): `src/ShopService/ShopService.Domain/Entities/OrderItem.cs`
- [Review](https://github.com/eneskllokoqi1/shopsphere/blob/main/src/ShopService/ShopService.Domain/Entities/Review.cs): `src/ShopService/ShopService.Domain/Entities/Review.cs`

### Persistence

- [EF Core Context](https://github.com/eneskllokoqi1/shopsphere/blob/main/src/ShopService/ShopService.Infrastructure/Data/AppDbContext.cs): `src/ShopService/ShopService.Infrastructure/Data/AppDbContext.cs`
- [Review Repository](https://github.com/eneskllokoqi1/shopsphere/blob/main/src/ShopService/ShopService.Infrastructure/Repositories/ReviewRepository.cs): `src/ShopService/ShopService.Infrastructure/Repositories/ReviewRepository.cs`
- [Order Repository](https://github.com/eneskllokoqi1/shopsphere/blob/main/src/ShopService/ShopService.Infrastructure/Repositories/OrderRepository.cs): `src/ShopService/ShopService.Infrastructure/Repositories/OrderRepository.cs`

### Other components

- **Shopper**

## Connections

- Shopper → Authentication API: uses
- Shopper → Product API: browses
- Shopper → Cart API: manages
- Shopper → Order API: places orders
- Shopper → Review API: reviews products
- Authentication API → Identity Service: calls
- Product API → Product Service: calls
- Category API → Category Service: calls
- Cart API → Cart Service: calls (evidence: `src/ShopService/ShopService.API/Controllers/CartController.cs`)
- Order API → Order Service: calls (evidence: `src/ShopService/ShopService.API/Controllers/OrderController.cs`)
- Coupon API → Coupon Service: calls (evidence: `src/ShopService/ShopService.API/Controllers/CouponController.cs`)
- Review API → Review Service: calls (evidence: `src/ShopService/ShopService.API/Controllers/ReviewController.cs`)
- Review Service → Review Repository Contract: delegates to (evidence: `src/ShopService/ShopService.Application/Service/ReviewService.cs`)
- Review Repository → EF Core Context: reads and writes (evidence: `src/ShopService/ShopService.Infrastructure/Repositories/ReviewRepository.cs`)
- Order Repository → EF Core Context: reads and writes (evidence: `src/ShopService/ShopService.Infrastructure/Repositories/OrderRepository.cs`)
- Review Repository → Review: maps and persists (evidence: `src/ShopService/ShopService.Infrastructure/Repositories/ReviewRepository.cs`)
- Review Service → Review: maps (evidence: `src/ShopService/ShopService.Application/Service/ReviewService.cs`)
- Order Repository → Coupon Repository Contract: uses (evidence: `src/ShopService/ShopService.Infrastructure/Repositories/OrderRepository.cs`)
- EF Core Context → Order: maps (evidence: `src/ShopService/ShopService.Infrastructure/Data/AppDbContext.cs`)
- EF Core Context → Order Item: maps (evidence: `src/ShopService/ShopService.Infrastructure/Data/AppDbContext.cs`)
- EF Core Context → Review: maps (evidence: `src/ShopService/ShopService.Infrastructure/Data/AppDbContext.cs`)
- EF Core Context → Product: maps (evidence: `src/ShopService/ShopService.Infrastructure/Data/AppDbContext.cs`)
- EF Core Context → Coupon: maps (evidence: `src/ShopService/ShopService.Infrastructure/Data/AppDbContext.cs`)
- EF Core Context → User: maps (evidence: `src/ShopService/ShopService.Infrastructure/Data/AppDbContext.cs`)
- Order → Order Status: tracks (evidence: `src/ShopService/ShopService.Domain/Entities/Order.cs`)
