# er-engineer/finalproject architecture

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

- Interactive diagram: https://gitdiagram.com/er-engineer/finalproject
- Repository: https://github.com/er-engineer/finalproject

## Overview

This is a layered Northwind catalog and user-authentication application, exposed through an ASP.NET Web API. The main workflow is an API request routed to a business service, which applies product rules or authentication logic and uses data-access abstractions; product operations can also consult category counts. The tree includes EF and in-memory persistence, JWT support, and cross-cutting caching, validation, security, and interception. The README is empty, so unsampled capabilities and wiring are represented conservatively; dashed links mark relationships not established by the excerpts or source index.

Main entry points: [`Business/Concrete/ProductManager.cs`](https://github.com/er-engineer/finalproject/blob/master/Business/Concrete/ProductManager.cs) (Product service), [`Business/Concrete/AuthManager.cs`](https://github.com/er-engineer/finalproject/blob/master/Business/Concrete/AuthManager.cs) (Authentication service), [`WebAPI/Program.cs`](https://github.com/er-engineer/finalproject/blob/master/WebAPI/Program.cs) (API host), [`Business/Concrete/CategoryManager.cs`](https://github.com/er-engineer/finalproject/blob/master/Business/Concrete/CategoryManager.cs) (Category service)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["API"]
  node_api_host["API host<br/>[Program.cs]"]
  node_product_api["Products API"]
  node_category_api["Categories API"]
  node_auth_api["Authentication API<br/>[AuthController.cs]"]
end

subgraph group_business["Business services"]
  node_product_service["Product service<br/>[ProductManager.cs]"]
  node_category_service["Category service<br/>[CategoryManager.cs]"]
  node_user_service["User service<br/>[UserManager.cs]"]
  node_auth_service["Authentication service<br/>[AuthManager.cs]"]
  node_product_rules["Product rules<br/>[ProductManager.cs]"]
end

subgraph group_data["Data access"]
  node_product_data["Product data access<br/>[IProductDal.cs]"]
  node_category_data["Category data access<br/>[ICategoryDal.cs]"]
  node_user_data["User data access<br/>[IUserDal.cs]"]
  node_other_data["Order and customer access"]
  node_ef_adapters["EF adapters"]
  node_memory_product["In-memory products"]
  node_northwind[("Northwind context")]
end

subgraph group_core["Core infrastructure"]
  node_token_helper["JWT token helper<br/>[JwtHelper.cs]"]
  node_password_hash["Password hashing<br/>[HashingHelper.cs]"]
  node_cache["Memory cache"]
  node_validation["Validation aspects"]
  node_result_types["Result types"]
end

node_client(("API client"))

node_client -->|"requests"| node_product_api
node_client -->|"requests"| node_category_api
node_client -->|"requests"| node_auth_api
node_api_host -.->|"hosts"| node_product_api
node_api_host -.->|"hosts"| node_category_api
node_api_host -.->|"hosts"| node_auth_api
node_api_host -->|"registers"| node_ef_adapters
node_product_api -->|"uses service"| node_product_service
node_category_api -->|"uses service"| node_category_service
node_auth_api -->|"uses service"| node_auth_service
node_product_service -->|"queries"| node_product_data
node_product_service -->|"checks count"| node_category_service
node_category_service -->|"queries"| node_category_data
node_auth_service -->|"delegates to"| node_user_service
node_user_service -->|"queries"| node_user_data
node_auth_service -->|"verifies password"| node_password_hash
node_auth_service -->|"creates token"| node_token_helper
node_product_service -->|"checks rules"| node_product_rules
node_product_service -->|"uses aspect"| node_validation
node_product_service -.->|"caches results"| node_cache
node_ef_adapters -.->|"uses context"| node_northwind
node_memory_product -.->|"implements"| node_product_data
node_other_data -.->|"uses context"| node_northwind
node_product_service -->|"returns results"| node_result_types
node_category_service -->|"returns results"| node_result_types
node_auth_service -->|"returns results"| node_result_types

click node_api_host "https://github.com/er-engineer/finalproject/blob/master/WebAPI/Program.cs"
click node_product_api "https://github.com/er-engineer/finalproject/blob/master/WebAPI/Controllers/ProductsController.cs"
click node_category_api "https://github.com/er-engineer/finalproject/blob/master/WebAPI/Controllers/CategoriesController.cs"
click node_auth_api "https://github.com/er-engineer/finalproject/blob/master/WebAPI/Controllers/AuthController.cs"
click node_product_service "https://github.com/er-engineer/finalproject/blob/master/Business/Concrete/ProductManager.cs"
click node_category_service "https://github.com/er-engineer/finalproject/blob/master/Business/Concrete/CategoryManager.cs"
click node_user_service "https://github.com/er-engineer/finalproject/blob/master/Business/Concrete/UserManager.cs"
click node_auth_service "https://github.com/er-engineer/finalproject/blob/master/Business/Concrete/AuthManager.cs"
click node_product_data "https://github.com/er-engineer/finalproject/blob/master/DataAccess/Abstract/IProductDal.cs"
click node_category_data "https://github.com/er-engineer/finalproject/blob/master/DataAccess/Abstract/ICategoryDal.cs"
click node_user_data "https://github.com/er-engineer/finalproject/blob/master/DataAccess/Abstract/IUserDal.cs"
click node_other_data "https://github.com/er-engineer/finalproject/tree/master/DataAccess/Abstract"
click node_ef_adapters "https://github.com/er-engineer/finalproject/tree/master/DataAccess/Concrete/EntityFramework"
click node_memory_product "https://github.com/er-engineer/finalproject/blob/master/DataAccess/Concrete/InMemory/InMemoryProductDal.cs"
click node_northwind "https://github.com/er-engineer/finalproject/blob/master/DataAccess/Concrete/EntityFramework/NorthwindContext.cs"
click node_product_rules "https://github.com/er-engineer/finalproject/blob/master/Business/Concrete/ProductManager.cs"
click node_token_helper "https://github.com/er-engineer/finalproject/blob/master/Core/Utilities/Security/JWT/JwtHelper.cs"
click node_password_hash "https://github.com/er-engineer/finalproject/blob/master/Core/Utilities/Security/Hashing/HashingHelper.cs"
click node_cache "https://github.com/er-engineer/finalproject/blob/master/Core/CrossCuttingConcerns/Caching/Microsoft/MemoryCacheManager.cs"
click node_validation "https://github.com/er-engineer/finalproject/tree/master/Core/Aspects/Autofac/Validation"
click node_result_types "https://github.com/er-engineer/finalproject/tree/master/Core/Utilities/Results"

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_api_host,node_product_api,node_category_api,node_auth_api,node_client toneBlue
class node_product_service,node_category_service,node_user_service,node_auth_service,node_product_rules toneAmber
class node_product_data,node_category_data,node_user_data,node_other_data,node_ef_adapters,node_memory_product,node_northwind toneMint
class node_token_helper,node_password_hash,node_cache,node_validation,node_result_types toneRose
```

## Components

### API

- [API host](https://github.com/er-engineer/finalproject/blob/master/WebAPI/Program.cs): `WebAPI/Program.cs`
- [Products API](https://github.com/er-engineer/finalproject/blob/master/WebAPI/Controllers/ProductsController.cs): `WebAPI/Controllers/ProductsController.cs`
- [Categories API](https://github.com/er-engineer/finalproject/blob/master/WebAPI/Controllers/CategoriesController.cs): `WebAPI/Controllers/CategoriesController.cs`
- [Authentication API](https://github.com/er-engineer/finalproject/blob/master/WebAPI/Controllers/AuthController.cs): `WebAPI/Controllers/AuthController.cs`

### Business services

- [Product service](https://github.com/er-engineer/finalproject/blob/master/Business/Concrete/ProductManager.cs): `Business/Concrete/ProductManager.cs`
- [Category service](https://github.com/er-engineer/finalproject/blob/master/Business/Concrete/CategoryManager.cs): `Business/Concrete/CategoryManager.cs`
- [User service](https://github.com/er-engineer/finalproject/blob/master/Business/Concrete/UserManager.cs): `Business/Concrete/UserManager.cs`
- [Authentication service](https://github.com/er-engineer/finalproject/blob/master/Business/Concrete/AuthManager.cs): `Business/Concrete/AuthManager.cs`
- [Product rules](https://github.com/er-engineer/finalproject/blob/master/Business/Concrete/ProductManager.cs): `Business/Concrete/ProductManager.cs`

### Data access

- [Product data access](https://github.com/er-engineer/finalproject/blob/master/DataAccess/Abstract/IProductDal.cs): `DataAccess/Abstract/IProductDal.cs`
- [Category data access](https://github.com/er-engineer/finalproject/blob/master/DataAccess/Abstract/ICategoryDal.cs): `DataAccess/Abstract/ICategoryDal.cs`
- [User data access](https://github.com/er-engineer/finalproject/blob/master/DataAccess/Abstract/IUserDal.cs): `DataAccess/Abstract/IUserDal.cs`
- [Order and customer access](https://github.com/er-engineer/finalproject/tree/master/DataAccess/Abstract): `DataAccess/Abstract`
- [EF adapters](https://github.com/er-engineer/finalproject/tree/master/DataAccess/Concrete/EntityFramework): `DataAccess/Concrete/EntityFramework`
- [In-memory products](https://github.com/er-engineer/finalproject/blob/master/DataAccess/Concrete/InMemory/InMemoryProductDal.cs): `DataAccess/Concrete/InMemory/InMemoryProductDal.cs`
- [Northwind context](https://github.com/er-engineer/finalproject/blob/master/DataAccess/Concrete/EntityFramework/NorthwindContext.cs): `DataAccess/Concrete/EntityFramework/NorthwindContext.cs`

### Core infrastructure

- [JWT token helper](https://github.com/er-engineer/finalproject/blob/master/Core/Utilities/Security/JWT/JwtHelper.cs): `Core/Utilities/Security/JWT/JwtHelper.cs`
- [Password hashing](https://github.com/er-engineer/finalproject/blob/master/Core/Utilities/Security/Hashing/HashingHelper.cs): `Core/Utilities/Security/Hashing/HashingHelper.cs`
- [Memory cache](https://github.com/er-engineer/finalproject/blob/master/Core/CrossCuttingConcerns/Caching/Microsoft/MemoryCacheManager.cs): `Core/CrossCuttingConcerns/Caching/Microsoft/MemoryCacheManager.cs`
- [Validation aspects](https://github.com/er-engineer/finalproject/tree/master/Core/Aspects/Autofac/Validation): `Core/Aspects/Autofac/Validation`
- [Result types](https://github.com/er-engineer/finalproject/tree/master/Core/Utilities/Results): `Core/Utilities/Results`

### Other components

- **API client**

## Connections

- API client → Products API: requests
- API client → Categories API: requests
- API client → Authentication API: requests
- API host → Products API: hosts
- API host → Categories API: hosts
- API host → Authentication API: hosts
- API host → EF adapters: registers
- Products API → Product service: uses service (evidence: `WebAPI/Controllers/ProductsController.cs`)
- Categories API → Category service: uses service (evidence: `WebAPI/Controllers/CategoriesController.cs`)
- Authentication API → Authentication service: uses service (evidence: `WebAPI/Controllers/AuthController.cs`)
- Product service → Product data access: queries (evidence: `Business/Concrete/ProductManager.cs`)
- Product service → Category service: checks count (evidence: `Business/Concrete/ProductManager.cs`)
- Category service → Category data access: queries (evidence: `Business/Concrete/CategoryManager.cs`)
- Authentication service → User service: delegates to (evidence: `Business/Concrete/AuthManager.cs`)
- User service → User data access: queries (evidence: `Business/Concrete/UserManager.cs`)
- Authentication service → Password hashing: verifies password (evidence: `Business/Concrete/AuthManager.cs`)
- Authentication service → JWT token helper: creates token (evidence: `Business/Concrete/AuthManager.cs`)
- Product service → Product rules: checks rules (evidence: `Business/Concrete/ProductManager.cs`)
- Product service → Validation aspects: uses aspect (evidence: `Business/Concrete/ProductManager.cs`)
- Product service → Memory cache: caches results
- EF adapters → Northwind context: uses context
- In-memory products → Product data access: implements
- Order and customer access → Northwind context: uses context
- Product service → Result types: returns results (evidence: `Business/Concrete/ProductManager.cs`)
- Category service → Result types: returns results (evidence: `Business/Concrete/CategoryManager.cs`)
- Authentication service → Result types: returns results (evidence: `Business/Concrete/AuthManager.cs`)
