# youssef-ashraf88/sello architecture

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

- Interactive diagram: https://gitdiagram.com/youssef-ashraf88/sello
- Repository: https://github.com/youssef-ashraf88/sello

## Overview

Sello is an ASP.NET Core e-commerce API. Customers authenticate, browse and manage products, maintain carts and addresses, submit reviews, and check out into orders; administrators manage catalog, orders, users, reviews, and dashboard statistics. The graph separates API, application services, domain contracts, and EF Core persistence. Checkout validation, transaction handling, and several controller-to-service calls are documented or referenced, but most feature implementations were not excerpted, so uncertain call edges are omitted.

Main entry points: [`Sello.Infrastructure/Data/ApplicationDbContext.cs`](https://github.com/youssef-ashraf88/sello/blob/main/Sello.Infrastructure/Data/ApplicationDbContext.cs) (EF Core context), [`Sello.Application/Services/ReviewService.cs`](https://github.com/youssef-ashraf88/sello/blob/main/Sello.Application/Services/ReviewService.cs) (Review management), [`Sello.Application/Services`](https://github.com/youssef-ashraf88/sello/tree/main/Sello.Application/Services) (Application services), [`Sello.Domain/RepositoryContracts`](https://github.com/youssef-ashraf88/sello/tree/main/Sello.Domain/RepositoryContracts) (Repository contracts)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["API"]
  node_account_api["Account API"]
  node_catalog_api["Catalog API"]
  node_admin_api["Admin API<br/>[AdminController.cs]"]
  node_review_api["Review API"]
  node_shopping_api["Shopping APIs<br/>[CartController.cs]"]
  node_exception_handler["Exception handling"]
end

subgraph group_app["Application"]
  node_app_services["Application services<br/>[Services]"]
  node_checkout_orders["Checkout and orders<br/>[OrderService.cs]"]
  node_cart_logic["Cart management<br/>[CartService.cs]"]
  node_review_logic["Review management<br/>[ReviewService.cs]"]
  node_validation["Request validation<br/>[Validators]"]
  node_mapping["DTO mapping<br/>[MappingProfile.cs]"]
end

subgraph group_domain["Domain"]
  node_repository_contracts["Repository contracts"]
  node_product_model["Product model<br/>[Product.cs]"]
  node_review_model["Review model<br/>[Review.cs]"]
  node_order_model["Order model<br/>[Order.cs]"]
  node_user_model["User model<br/>[ApplicationUser.cs]"]
end

subgraph group_infra["Infrastructure"]
  node_persistence[("EF Core context")]
  node_repositories["Repositories<br/>[Repositories]"]
end

node_customer(("Customer"))
node_admin(("Administrator"))
node_sqlserver[("SQL Server")]

node_customer -->|"authenticates"| node_account_api
node_customer -->|"browses catalog"| node_catalog_api
node_customer -->|"manages cart"| node_shopping_api
node_customer -->|"reviews products"| node_review_api
node_admin -->|"administers store"| node_admin_api
node_catalog_api -->|"uses services"| node_app_services
node_admin_api -->|"uses services"| node_app_services
node_review_api -->|"calls"| node_review_logic
node_review_logic -->|"uses repositories"| node_repository_contracts
node_review_logic -->|"checks product"| node_product_model
node_review_logic -->|"maps review"| node_review_model
node_app_services -.->|"validates requests"| node_validation
node_app_services -.->|"maps DTOs"| node_mapping
node_checkout_orders -->|"uses repositories"| node_repository_contracts
node_cart_logic -->|"uses repositories"| node_repository_contracts
node_checkout_orders -->|"creates orders"| node_order_model
node_checkout_orders -.->|"transactional checkout"| node_persistence
node_repository_contracts -.->|"implemented by"| node_repositories
node_repositories -->|"queries"| node_persistence
node_persistence -->|"stores"| node_product_model
node_persistence -->|"stores"| node_review_model
node_persistence -->|"stores"| node_order_model
node_persistence -->|"stores"| node_user_model
node_persistence -.->|"persists to"| node_sqlserver
node_exception_handler -.->|"handles exceptions"| node_review_logic

click node_account_api "https://github.com/youssef-ashraf88/sello/blob/main/Sello/Controllers/AccountController.cs"
click node_catalog_api "https://github.com/youssef-ashraf88/sello/blob/main/Sello/Controllers/ProductsController.cs"
click node_admin_api "https://github.com/youssef-ashraf88/sello/blob/main/Sello/Controllers/AdminController.cs"
click node_review_api "https://github.com/youssef-ashraf88/sello/blob/main/Sello/Controllers/ReviewController.cs"
click node_shopping_api "https://github.com/youssef-ashraf88/sello/blob/main/Sello/Controllers/CartController.cs"
click node_app_services "https://github.com/youssef-ashraf88/sello/tree/main/Sello.Application/Services"
click node_checkout_orders "https://github.com/youssef-ashraf88/sello/blob/main/Sello.Application/Services/OrderService.cs"
click node_cart_logic "https://github.com/youssef-ashraf88/sello/blob/main/Sello.Application/Services/CartService.cs"
click node_review_logic "https://github.com/youssef-ashraf88/sello/blob/main/Sello.Application/Services/ReviewService.cs"
click node_validation "https://github.com/youssef-ashraf88/sello/tree/main/Sello.Application/Validators"
click node_mapping "https://github.com/youssef-ashraf88/sello/blob/main/Sello.Application/Mappings/MappingProfile.cs"
click node_repository_contracts "https://github.com/youssef-ashraf88/sello/tree/main/Sello.Domain/RepositoryContracts"
click node_product_model "https://github.com/youssef-ashraf88/sello/blob/main/Sello.Domain/Entities/Product.cs"
click node_review_model "https://github.com/youssef-ashraf88/sello/blob/main/Sello.Domain/Entities/Review.cs"
click node_order_model "https://github.com/youssef-ashraf88/sello/blob/main/Sello.Domain/Entities/Order.cs"
click node_user_model "https://github.com/youssef-ashraf88/sello/blob/main/Sello.Domain/Entities/Identity/ApplicationUser.cs"
click node_persistence "https://github.com/youssef-ashraf88/sello/blob/main/Sello.Infrastructure/Data/ApplicationDbContext.cs"
click node_repositories "https://github.com/youssef-ashraf88/sello/tree/main/Sello.Infrastructure/Repositories"
click node_exception_handler "https://github.com/youssef-ashraf88/sello/blob/main/Sello/ExceptionHandling/GlobalExceptionHandler.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_account_api,node_catalog_api,node_admin_api,node_review_api,node_shopping_api,node_exception_handler toneBlue
class node_app_services,node_checkout_orders,node_cart_logic,node_review_logic,node_validation,node_mapping,node_sqlserver toneAmber
class node_repository_contracts,node_product_model,node_review_model,node_order_model,node_user_model toneMint
class node_persistence,node_repositories toneRose
class node_customer,node_admin toneIndigo
```

## Components

### API

- [Account API](https://github.com/youssef-ashraf88/sello/blob/main/Sello/Controllers/AccountController.cs): `Sello/Controllers/AccountController.cs`
- [Catalog API](https://github.com/youssef-ashraf88/sello/blob/main/Sello/Controllers/ProductsController.cs): `Sello/Controllers/ProductsController.cs`
- [Admin API](https://github.com/youssef-ashraf88/sello/blob/main/Sello/Controllers/AdminController.cs): `Sello/Controllers/AdminController.cs`
- [Review API](https://github.com/youssef-ashraf88/sello/blob/main/Sello/Controllers/ReviewController.cs): `Sello/Controllers/ReviewController.cs`
- [Shopping APIs](https://github.com/youssef-ashraf88/sello/blob/main/Sello/Controllers/CartController.cs): `Sello/Controllers/CartController.cs`
- [Exception handling](https://github.com/youssef-ashraf88/sello/blob/main/Sello/ExceptionHandling/GlobalExceptionHandler.cs): `Sello/ExceptionHandling/GlobalExceptionHandler.cs`

### Application

- [Application services](https://github.com/youssef-ashraf88/sello/tree/main/Sello.Application/Services): `Sello.Application/Services`
- [Checkout and orders](https://github.com/youssef-ashraf88/sello/blob/main/Sello.Application/Services/OrderService.cs): `Sello.Application/Services/OrderService.cs`
- [Cart management](https://github.com/youssef-ashraf88/sello/blob/main/Sello.Application/Services/CartService.cs): `Sello.Application/Services/CartService.cs`
- [Review management](https://github.com/youssef-ashraf88/sello/blob/main/Sello.Application/Services/ReviewService.cs): `Sello.Application/Services/ReviewService.cs`
- [Request validation](https://github.com/youssef-ashraf88/sello/tree/main/Sello.Application/Validators): `Sello.Application/Validators`
- [DTO mapping](https://github.com/youssef-ashraf88/sello/blob/main/Sello.Application/Mappings/MappingProfile.cs): `Sello.Application/Mappings/MappingProfile.cs`

### Domain

- [Repository contracts](https://github.com/youssef-ashraf88/sello/tree/main/Sello.Domain/RepositoryContracts): `Sello.Domain/RepositoryContracts`
- [Product model](https://github.com/youssef-ashraf88/sello/blob/main/Sello.Domain/Entities/Product.cs): `Sello.Domain/Entities/Product.cs`
- [Review model](https://github.com/youssef-ashraf88/sello/blob/main/Sello.Domain/Entities/Review.cs): `Sello.Domain/Entities/Review.cs`
- [Order model](https://github.com/youssef-ashraf88/sello/blob/main/Sello.Domain/Entities/Order.cs): `Sello.Domain/Entities/Order.cs`
- [User model](https://github.com/youssef-ashraf88/sello/blob/main/Sello.Domain/Entities/Identity/ApplicationUser.cs): `Sello.Domain/Entities/Identity/ApplicationUser.cs`

### Infrastructure

- [EF Core context](https://github.com/youssef-ashraf88/sello/blob/main/Sello.Infrastructure/Data/ApplicationDbContext.cs): `Sello.Infrastructure/Data/ApplicationDbContext.cs`
- [Repositories](https://github.com/youssef-ashraf88/sello/tree/main/Sello.Infrastructure/Repositories): `Sello.Infrastructure/Repositories`

### Other components

- **Customer**
- **Administrator**
- **SQL Server**

## Connections

- Customer → Account API: authenticates (evidence: `README.md`)
- Customer → Catalog API: browses catalog (evidence: `README.md`)
- Customer → Shopping APIs: manages cart (evidence: `README.md`)
- Customer → Review API: reviews products (evidence: `README.md`)
- Administrator → Admin API: administers store (evidence: `README.md`)
- Catalog API → Application services: uses services (evidence: `Sello/Controllers/ProductsController.cs`)
- Admin API → Application services: uses services (evidence: `Sello/Controllers/AdminController.cs`)
- Review API → Review management: calls (evidence: `Sello/Controllers/ReviewController.cs`)
- Review management → Repository contracts: uses repositories (evidence: `Sello.Application/Services/ReviewService.cs`)
- Review management → Product model: checks product (evidence: `Sello.Application/Services/ReviewService.cs`)
- Review management → Review model: maps review (evidence: `Sello.Application/Services/ReviewService.cs`)
- Application services → Request validation: validates requests (evidence: `README.md`)
- Application services → DTO mapping: maps DTOs (evidence: `Sello.Application/Mappings/MappingProfile.cs`)
- Checkout and orders → Repository contracts: uses repositories (evidence: `Sello.Application/Services/OrderService.cs`)
- Cart management → Repository contracts: uses repositories (evidence: `Sello.Application/Services/CartService.cs`)
- Checkout and orders → Order model: creates orders (evidence: `Sello.Application/Services/OrderService.cs`)
- Checkout and orders → EF Core context: transactional checkout (evidence: `README.md`)
- Repository contracts → Repositories: implemented by (evidence: `Sello.Infrastructure/Repositories/ReviewRepository.cs`)
- Repositories → EF Core context: queries (evidence: `Sello.Infrastructure/Repositories/ProductRepository.cs`)
- EF Core context → Product model: stores (evidence: `Sello.Infrastructure/Data/ApplicationDbContext.cs`)
- EF Core context → Review model: stores (evidence: `Sello.Infrastructure/Data/ApplicationDbContext.cs`)
- EF Core context → Order model: stores (evidence: `Sello.Infrastructure/Data/ApplicationDbContext.cs`)
- EF Core context → User model: stores (evidence: `Sello.Infrastructure/Data/ApplicationDbContext.cs`)
- EF Core context → SQL Server: persists to (evidence: `README.md`)
- Exception handling → Review management: handles exceptions (evidence: `README.md`)
