# alexeycreator/sesterenkaapp architecture

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

- Interactive diagram: https://gitdiagram.com/alexeycreator/sesterenkaapp
- Repository: https://github.com/alexeycreator/sesterenkaapp

## Overview

«Колесо и поршень» is a React/TypeScript storefront backed by an ASP.NET Core API and SQL Server. The main customer journey is browsing and filtering auto parts, adding items to a basket, and placing an order with a pickup location; users can also register and sign in. Employee and administrator account areas support operational management, while news and informational pages provide supporting content. The graph preserves these documented capabilities and the sampled API, authentication, and persistence layers; unsampled feature wiring is shown only where the README documents it.

Main entry points: [`backend/WebApi/WebApi/Methods/ServerDbContext.cs`](https://github.com/alexeycreator/sesterenkaapp/blob/main/backend/WebApi/WebApi/Methods/ServerDbContext.cs) (Entity Framework context), [`frontend/client/src/App.tsx`](https://github.com/alexeycreator/sesterenkaapp/blob/main/frontend/client/src/App.tsx) (Application routing), [`frontend/client/src/components/servicesApi`](https://github.com/alexeycreator/sesterenkaapp/tree/main/frontend/client/src/components/servicesApi) (Frontend API clients), [`backend/WebApi/WebApi/Controllers`](https://github.com/alexeycreator/sesterenkaapp/tree/main/backend/WebApi/WebApi/Controllers) (Web API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_storefront["Storefront"]
  node_app["Application routing<br/>[App.tsx]"]
  node_catalog["Product catalog"]
  node_content["News and information"]
  node_authui["Sign-in and registration"]
  node_authstate["Authentication state<br/>[AuthContext.tsx]"]
end

subgraph group_commerce["Commerce"]
  node_cart["Basket"]
  node_checkout["Order checkout<br/>[OrderPage.tsx]"]
  node_orderdetails["Order details"]
end

subgraph group_operations["Operations"]
  node_accountui["Account area"]
  node_adminui["Admin and employee tools"]
end

subgraph group_backend["API and persistence"]
  node_clientapis["Frontend API clients"]
  node_userrequests["User requests<br/>[Requests.tsx]"]
  node_api["Web API"]
  node_usercontroller["User and auth endpoints<br/>[UsersController.cs]"]
  node_productcontroller["Product endpoints"]
  node_basketcontroller["Basket endpoints"]
  node_orderscontroller["Order endpoints"]
  node_addresscontroller["Address endpoints"]
  node_dbcontext["Entity Framework context<br/>[ServerDbContext.cs]"]
  node_database[("SQL Server data")]
  node_backup["Database backup"]
end

node_shopper(("Shopper"))

node_shopper -->|"uses"| node_app
node_app -->|"routes to"| node_catalog
node_app -->|"routes to"| node_content
node_app -->|"routes to"| node_checkout
node_app -->|"routes to"| node_orderdetails
node_shopper -->|"signs in"| node_authui
node_authui -->|"updates"| node_authstate
node_shopper -->|"browses"| node_catalog
node_catalog -->|"requests data"| node_clientapis
node_clientapis -.->|"calls"| node_api
node_shopper -->|"adds products"| node_cart
node_cart -.->|"requests basket"| node_clientapis
node_shopper -->|"places order"| node_checkout
node_checkout -.->|"submits order"| node_clientapis
node_checkout -.->|"selects pickup"| node_addresscontroller
node_accountui -->|"loads account"| node_userrequests
node_shopper -->|"opens account"| node_accountui
node_accountui -.->|"shows role tools"| node_adminui
node_adminui -.->|"manages records"| node_clientapis
node_userrequests -->|"calls"| node_usercontroller
node_api -.->|"routes requests"| node_productcontroller
node_api -.->|"routes requests"| node_basketcontroller
node_api -.->|"routes requests"| node_orderscontroller
node_usercontroller -->|"reads and writes"| node_dbcontext
node_productcontroller -->|"reads and writes"| node_dbcontext
node_basketcontroller -->|"reads and writes"| node_dbcontext
node_orderscontroller -->|"reads and writes"| node_dbcontext
node_addresscontroller -->|"reads and writes"| node_dbcontext
node_dbcontext -->|"persists entities"| node_database
node_backup -.->|"backs up"| node_database

click node_app "https://github.com/alexeycreator/sesterenkaapp/blob/main/frontend/client/src/App.tsx"
click node_catalog "https://github.com/alexeycreator/sesterenkaapp/tree/main/frontend/client/src/components/pages/Catalog"
click node_content "https://github.com/alexeycreator/sesterenkaapp/tree/main/frontend/client/src/components/pages"
click node_authui "https://github.com/alexeycreator/sesterenkaapp/tree/main/frontend/client/src/components/header/components"
click node_authstate "https://github.com/alexeycreator/sesterenkaapp/blob/main/frontend/client/src/contexts/AuthContext.tsx"
click node_accountui "https://github.com/alexeycreator/sesterenkaapp/tree/main/frontend/client/src/components/pages/Account"
click node_adminui "https://github.com/alexeycreator/sesterenkaapp/tree/main/frontend/client/src/components/pages/Account/components"
click node_cart "https://github.com/alexeycreator/sesterenkaapp/tree/main/frontend/client/src/components/pages/OrderItem"
click node_checkout "https://github.com/alexeycreator/sesterenkaapp/blob/main/frontend/client/src/components/pages/Order/OrderPage.tsx"
click node_orderdetails "https://github.com/alexeycreator/sesterenkaapp/blob/main/frontend/client/src/components/pages/Order/OrderDetailsPage.tsx"
click node_clientapis "https://github.com/alexeycreator/sesterenkaapp/tree/main/frontend/client/src/components/servicesApi"
click node_userrequests "https://github.com/alexeycreator/sesterenkaapp/blob/main/frontend/client/src/service/user/Requests.tsx"
click node_api "https://github.com/alexeycreator/sesterenkaapp/tree/main/backend/WebApi/WebApi/Controllers"
click node_usercontroller "https://github.com/alexeycreator/sesterenkaapp/blob/main/backend/WebApi/WebApi/Controllers/UsersController.cs"
click node_productcontroller "https://github.com/alexeycreator/sesterenkaapp/blob/main/backend/WebApi/WebApi/Controllers/ProductsController.cs"
click node_basketcontroller "https://github.com/alexeycreator/sesterenkaapp/blob/main/backend/WebApi/WebApi/Controllers/OrderItemsController.cs"
click node_orderscontroller "https://github.com/alexeycreator/sesterenkaapp/blob/main/backend/WebApi/WebApi/Controllers/OrdersController.cs"
click node_addresscontroller "https://github.com/alexeycreator/sesterenkaapp/blob/main/backend/WebApi/WebApi/Controllers/AddressesController.cs"
click node_dbcontext "https://github.com/alexeycreator/sesterenkaapp/blob/main/backend/WebApi/WebApi/Methods/ServerDbContext.cs"
click node_backup "https://github.com/alexeycreator/sesterenkaapp/blob/main/backend/WebApi/WebApi/Services/DatabaseBackupBackgroundService.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_app,node_catalog,node_content,node_authui,node_authstate toneBlue
class node_cart,node_checkout,node_orderdetails toneAmber
class node_accountui,node_adminui toneMint
class node_clientapis,node_userrequests,node_api,node_usercontroller,node_productcontroller,node_basketcontroller,node_orderscontroller,node_addresscontroller,node_dbcontext,node_database,node_backup toneRose
class node_shopper toneIndigo
```

## Components

### Storefront

- [Application routing](https://github.com/alexeycreator/sesterenkaapp/blob/main/frontend/client/src/App.tsx): `frontend/client/src/App.tsx`
- [Product catalog](https://github.com/alexeycreator/sesterenkaapp/tree/main/frontend/client/src/components/pages/Catalog): `frontend/client/src/components/pages/Catalog`
- [News and information](https://github.com/alexeycreator/sesterenkaapp/tree/main/frontend/client/src/components/pages): `frontend/client/src/components/pages`
- [Sign-in and registration](https://github.com/alexeycreator/sesterenkaapp/tree/main/frontend/client/src/components/header/components): `frontend/client/src/components/header/components`
- [Authentication state](https://github.com/alexeycreator/sesterenkaapp/blob/main/frontend/client/src/contexts/AuthContext.tsx): `frontend/client/src/contexts/AuthContext.tsx`

### Commerce

- [Basket](https://github.com/alexeycreator/sesterenkaapp/tree/main/frontend/client/src/components/pages/OrderItem): `frontend/client/src/components/pages/OrderItem`
- [Order checkout](https://github.com/alexeycreator/sesterenkaapp/blob/main/frontend/client/src/components/pages/Order/OrderPage.tsx): `frontend/client/src/components/pages/Order/OrderPage.tsx`
- [Order details](https://github.com/alexeycreator/sesterenkaapp/blob/main/frontend/client/src/components/pages/Order/OrderDetailsPage.tsx): `frontend/client/src/components/pages/Order/OrderDetailsPage.tsx`

### Operations

- [Account area](https://github.com/alexeycreator/sesterenkaapp/tree/main/frontend/client/src/components/pages/Account): `frontend/client/src/components/pages/Account`
- [Admin and employee tools](https://github.com/alexeycreator/sesterenkaapp/tree/main/frontend/client/src/components/pages/Account/components): `frontend/client/src/components/pages/Account/components`

### API and persistence

- [Frontend API clients](https://github.com/alexeycreator/sesterenkaapp/tree/main/frontend/client/src/components/servicesApi): `frontend/client/src/components/servicesApi`
- [User requests](https://github.com/alexeycreator/sesterenkaapp/blob/main/frontend/client/src/service/user/Requests.tsx): `frontend/client/src/service/user/Requests.tsx`
- [Web API](https://github.com/alexeycreator/sesterenkaapp/tree/main/backend/WebApi/WebApi/Controllers): `backend/WebApi/WebApi/Controllers`
- [User and auth endpoints](https://github.com/alexeycreator/sesterenkaapp/blob/main/backend/WebApi/WebApi/Controllers/UsersController.cs): `backend/WebApi/WebApi/Controllers/UsersController.cs`
- [Product endpoints](https://github.com/alexeycreator/sesterenkaapp/blob/main/backend/WebApi/WebApi/Controllers/ProductsController.cs): `backend/WebApi/WebApi/Controllers/ProductsController.cs`
- [Basket endpoints](https://github.com/alexeycreator/sesterenkaapp/blob/main/backend/WebApi/WebApi/Controllers/OrderItemsController.cs): `backend/WebApi/WebApi/Controllers/OrderItemsController.cs`
- [Order endpoints](https://github.com/alexeycreator/sesterenkaapp/blob/main/backend/WebApi/WebApi/Controllers/OrdersController.cs): `backend/WebApi/WebApi/Controllers/OrdersController.cs`
- [Address endpoints](https://github.com/alexeycreator/sesterenkaapp/blob/main/backend/WebApi/WebApi/Controllers/AddressesController.cs): `backend/WebApi/WebApi/Controllers/AddressesController.cs`
- [Entity Framework context](https://github.com/alexeycreator/sesterenkaapp/blob/main/backend/WebApi/WebApi/Methods/ServerDbContext.cs): `backend/WebApi/WebApi/Methods/ServerDbContext.cs`
- **SQL Server data**
- [Database backup](https://github.com/alexeycreator/sesterenkaapp/blob/main/backend/WebApi/WebApi/Services/DatabaseBackupBackgroundService.cs): `backend/WebApi/WebApi/Services/DatabaseBackupBackgroundService.cs`

### Other components

- **Shopper**

## Connections

- Shopper → Application routing: uses
- Application routing → Product catalog: routes to (evidence: `frontend/client/src/App.tsx`)
- Application routing → News and information: routes to (evidence: `frontend/client/src/App.tsx`)
- Application routing → Order checkout: routes to (evidence: `frontend/client/src/App.tsx`)
- Application routing → Order details: routes to (evidence: `frontend/client/src/App.tsx`)
- Shopper → Sign-in and registration: signs in
- Sign-in and registration → Authentication state: updates (evidence: `frontend/client/src/contexts/AuthContext.tsx`)
- Shopper → Product catalog: browses
- Product catalog → Frontend API clients: requests data (evidence: `frontend/client/src/components/pages/Catalog/hooks/useCatalogData.tsx`)
- Frontend API clients → Web API: calls
- Shopper → Basket: adds products
- Basket → Frontend API clients: requests basket
- Shopper → Order checkout: places order
- Order checkout → Frontend API clients: submits order (evidence: `frontend/client/src/components/pages/Order/OrderPage.tsx`)
- Order checkout → Address endpoints: selects pickup
- Account area → User requests: loads account (evidence: `frontend/client/src/components/pages/Account/hooks/useAccountData.tsx`)
- Shopper → Account area: opens account
- Account area → Admin and employee tools: shows role tools
- Admin and employee tools → Frontend API clients: manages records
- User requests → User and auth endpoints: calls
- Web API → Product endpoints: routes requests
- Web API → Basket endpoints: routes requests
- Web API → Order endpoints: routes requests
- User and auth endpoints → Entity Framework context: reads and writes (evidence: `backend/WebApi/WebApi/Controllers/UsersController.cs`)
- Product endpoints → Entity Framework context: reads and writes (evidence: `backend/WebApi/WebApi/Controllers/ProductsController.cs`)
- Basket endpoints → Entity Framework context: reads and writes (evidence: `backend/WebApi/WebApi/Controllers/OrderItemsController.cs`)
- Order endpoints → Entity Framework context: reads and writes (evidence: `backend/WebApi/WebApi/Controllers/OrdersController.cs`)
- Address endpoints → Entity Framework context: reads and writes (evidence: `backend/WebApi/WebApi/Controllers/AddressesController.cs`)
- Entity Framework context → SQL Server data: persists entities (evidence: `backend/WebApi/WebApi/Methods/ServerDbContext.cs`)
- Database backup → SQL Server data: backs up
