# khutyu/marketplace architecture

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

- Interactive diagram: https://gitdiagram.com/khutyu/marketplace
- Repository: https://github.com/khutyu/marketplace

## Overview

MarketPlace is an ASP.NET MVC marketplace for browsing and managing product listings, with account management, user profiles and reviews, chat-related data, and administrator tools. The visible browsing workflow runs from a visitor through Home or product search to product and category repositories backed by the application database. Signed-in users can manage profiles and post reviews; account and admin actions use ASP.NET Identity. Chat and notification modules are present in the tree, but their controller wiring could not be established from the sampled source; the README is empty.

Main entry points: [`MarketPlace/Data/RepositoryWrapper.cs`](https://github.com/khutyu/marketplace/blob/master/MarketPlace/Data/RepositoryWrapper.cs) (Repository wrapper), [`MarketPlace/Data/RepositoryBase.cs`](https://github.com/khutyu/marketplace/blob/master/MarketPlace/Data/RepositoryBase.cs) (Repository base), [`MarketPlace/Data/Services/UserServices.cs`](https://github.com/khutyu/marketplace/blob/master/MarketPlace/Data/Services/UserServices.cs) (User services), [`MarketPlace/Controllers/AccountController.cs`](https://github.com/khutyu/marketplace/blob/master/MarketPlace/Controllers/AccountController.cs) (Account actions)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web workflows"]
  node_home["Home browsing<br/>[HomeController.cs]"]
  node_productmgr["Product catalog"]
  node_api["API endpoints<br/>[APIController.cs]"]
  node_admin["Admin tools<br/>[AdminController.cs]"]
end

subgraph group_identity["Accounts and profiles"]
  node_account["Account actions"]
  node_user["Profiles and reviews<br/>[UserController.cs]"]
  node_identitysvc["Identity manager"]
  node_usersvc["User services<br/>[UserServices.cs]"]
  node_email["Email service<br/>[EmailService.cs]"]
end

subgraph group_catalog["Marketplace catalog"]
end

subgraph group_data["Persistence and services"]
  node_wrapper["Repository wrapper"]
  node_products["Product repository"]
  node_categories["Category repository"]
  node_usersrepo["User repository<br/>[UserRepository.cs]"]
  node_reviewsrepo["Review repository"]
  node_chatsrepo["Chat repository<br/>[ChatRepository.cs]"]
  node_baserepo["Repository base<br/>[RepositoryBase.cs]"]
  node_dbcontext[("Application context<br/>[AppDbContext.cs]")]
end

node_visitor(("Visitor / user"))
node_sql[("SQL database")]

node_visitor -->|"browses"| node_home
node_visitor -->|"searches listings"| node_productmgr
node_visitor -->|"manages account"| node_account
node_visitor -->|"views profile"| node_user
node_visitor -->|"uses API"| node_api
node_visitor -->|"administers"| node_admin
node_home -->|"reads listings"| node_wrapper
node_productmgr -->|"queries and updates"| node_wrapper
node_account -->|"uses repositories"| node_wrapper
node_account -->|"authenticates"| node_identitysvc
node_user -->|"reads and writes profile data"| node_wrapper
node_user -->|"requests user operations"| node_usersvc
node_admin -->|"manages users"| node_identitysvc
node_wrapper -->|"creates repositories"| node_products
node_wrapper -->|"creates repositories"| node_categories
node_wrapper -->|"creates repositories"| node_usersrepo
node_wrapper -->|"creates repositories"| node_reviewsrepo
node_wrapper -->|"creates repository"| node_chatsrepo
node_wrapper -->|"constructs service"| node_usersvc
node_usersvc -->|"uses identity"| node_identitysvc
node_usersvc -->|"sends email"| node_email
node_products -->|"inherits"| node_baserepo
node_categories -->|"inherits"| node_baserepo
node_usersrepo -->|"inherits"| node_baserepo
node_reviewsrepo -->|"inherits"| node_baserepo
node_chatsrepo -->|"inherits"| node_baserepo
node_baserepo -->|"queries and changes"| node_dbcontext
node_wrapper -->|"saves changes"| node_dbcontext
node_dbcontext -->|"reads and writes"| node_sql

click node_home "https://github.com/khutyu/marketplace/blob/master/MarketPlace/Controllers/HomeController.cs"
click node_productmgr "https://github.com/khutyu/marketplace/blob/master/MarketPlace/Controllers/ProductManagerController.cs"
click node_api "https://github.com/khutyu/marketplace/blob/master/MarketPlace/Controllers/APIController.cs"
click node_admin "https://github.com/khutyu/marketplace/blob/master/MarketPlace/Controllers/AdminController.cs"
click node_account "https://github.com/khutyu/marketplace/blob/master/MarketPlace/Controllers/AccountController.cs"
click node_user "https://github.com/khutyu/marketplace/blob/master/MarketPlace/Controllers/UserController.cs"
click node_usersvc "https://github.com/khutyu/marketplace/blob/master/MarketPlace/Data/Services/UserServices.cs"
click node_email "https://github.com/khutyu/marketplace/blob/master/MarketPlace/Data/Services/EmailService.cs"
click node_wrapper "https://github.com/khutyu/marketplace/blob/master/MarketPlace/Data/RepositoryWrapper.cs"
click node_products "https://github.com/khutyu/marketplace/blob/master/MarketPlace/Data/ProductRepository.cs"
click node_categories "https://github.com/khutyu/marketplace/blob/master/MarketPlace/Data/CategoryRepository.cs"
click node_usersrepo "https://github.com/khutyu/marketplace/blob/master/MarketPlace/Data/UserRepository.cs"
click node_reviewsrepo "https://github.com/khutyu/marketplace/blob/master/MarketPlace/Data/ReviewRepository.cs"
click node_chatsrepo "https://github.com/khutyu/marketplace/blob/master/MarketPlace/Data/ChatRepository.cs"
click node_baserepo "https://github.com/khutyu/marketplace/blob/master/MarketPlace/Data/RepositoryBase.cs"
click node_dbcontext "https://github.com/khutyu/marketplace/blob/master/MarketPlace/Data/AppDbContext.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_home,node_productmgr,node_api,node_admin,node_visitor toneBlue
class node_account,node_user,node_identitysvc,node_usersvc,node_email,node_sql toneAmber
class node_wrapper,node_products,node_categories,node_usersrepo,node_reviewsrepo,node_chatsrepo,node_baserepo,node_dbcontext toneRose
```

## Components

### Web workflows

- [Home browsing](https://github.com/khutyu/marketplace/blob/master/MarketPlace/Controllers/HomeController.cs): `MarketPlace/Controllers/HomeController.cs`
- [Product catalog](https://github.com/khutyu/marketplace/blob/master/MarketPlace/Controllers/ProductManagerController.cs): `MarketPlace/Controllers/ProductManagerController.cs`
- [API endpoints](https://github.com/khutyu/marketplace/blob/master/MarketPlace/Controllers/APIController.cs): `MarketPlace/Controllers/APIController.cs`
- [Admin tools](https://github.com/khutyu/marketplace/blob/master/MarketPlace/Controllers/AdminController.cs): `MarketPlace/Controllers/AdminController.cs`

### Accounts and profiles

- [Account actions](https://github.com/khutyu/marketplace/blob/master/MarketPlace/Controllers/AccountController.cs): `MarketPlace/Controllers/AccountController.cs`
- [Profiles and reviews](https://github.com/khutyu/marketplace/blob/master/MarketPlace/Controllers/UserController.cs): `MarketPlace/Controllers/UserController.cs`
- **Identity manager**
- [User services](https://github.com/khutyu/marketplace/blob/master/MarketPlace/Data/Services/UserServices.cs): `MarketPlace/Data/Services/UserServices.cs`
- [Email service](https://github.com/khutyu/marketplace/blob/master/MarketPlace/Data/Services/EmailService.cs): `MarketPlace/Data/Services/EmailService.cs`

### Persistence and services

- [Repository wrapper](https://github.com/khutyu/marketplace/blob/master/MarketPlace/Data/RepositoryWrapper.cs): `MarketPlace/Data/RepositoryWrapper.cs`
- [Product repository](https://github.com/khutyu/marketplace/blob/master/MarketPlace/Data/ProductRepository.cs): `MarketPlace/Data/ProductRepository.cs`
- [Category repository](https://github.com/khutyu/marketplace/blob/master/MarketPlace/Data/CategoryRepository.cs): `MarketPlace/Data/CategoryRepository.cs`
- [User repository](https://github.com/khutyu/marketplace/blob/master/MarketPlace/Data/UserRepository.cs): `MarketPlace/Data/UserRepository.cs`
- [Review repository](https://github.com/khutyu/marketplace/blob/master/MarketPlace/Data/ReviewRepository.cs): `MarketPlace/Data/ReviewRepository.cs`
- [Chat repository](https://github.com/khutyu/marketplace/blob/master/MarketPlace/Data/ChatRepository.cs): `MarketPlace/Data/ChatRepository.cs`
- [Repository base](https://github.com/khutyu/marketplace/blob/master/MarketPlace/Data/RepositoryBase.cs): `MarketPlace/Data/RepositoryBase.cs`
- [Application context](https://github.com/khutyu/marketplace/blob/master/MarketPlace/Data/AppDbContext.cs): `MarketPlace/Data/AppDbContext.cs`

### Other components

- **Visitor / user**
- **SQL database**

## Connections

- Visitor / user → Home browsing: browses
- Visitor / user → Product catalog: searches listings
- Visitor / user → Account actions: manages account
- Visitor / user → Profiles and reviews: views profile
- Visitor / user → API endpoints: uses API
- Visitor / user → Admin tools: administers
- Home browsing → Repository wrapper: reads listings
- Product catalog → Repository wrapper: queries and updates
- Account actions → Repository wrapper: uses repositories
- Account actions → Identity manager: authenticates
- Profiles and reviews → Repository wrapper: reads and writes profile data
- Profiles and reviews → User services: requests user operations
- Admin tools → Identity manager: manages users
- Repository wrapper → Product repository: creates repositories
- Repository wrapper → Category repository: creates repositories
- Repository wrapper → User repository: creates repositories
- Repository wrapper → Review repository: creates repositories
- Repository wrapper → Chat repository: creates repository
- Repository wrapper → User services: constructs service
- User services → Identity manager: uses identity
- User services → Email service: sends email
- Product repository → Repository base: inherits
- Category repository → Repository base: inherits
- User repository → Repository base: inherits
- Review repository → Repository base: inherits
- Chat repository → Repository base: inherits
- Repository base → Application context: queries and changes
- Repository wrapper → Application context: saves changes
- Application context → SQL database: reads and writes
