# nihira2020/dotnetcore_api_jwttoken architecture

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

- Interactive diagram: https://gitdiagram.com/nihira2020/dotnetcore_api_jwttoken
- Repository: https://github.com/nihira2020/dotnetcore_api_jwttoken

## Overview

CustomerAPI is an ASP.NET Core service for customer, employee, designation, product, and user administration, with JWT authentication, role/menu permissions, and product-image handling. Clients call controller endpoints; controllers query or update the EF Core context, which connects to SQL Server. Product image endpoints also read and write files under wwwroot. The graph reflects sampled controller and startup code; other controller details and configuration values were not inspected.

Main entry points: [`Models/Learn_DBContext.cs`](https://github.com/nihira2020/dotnetcore_api_jwttoken/blob/master/Models/Learn_DBContext.cs) (EF Core context), [`Startup.cs`](https://github.com/nihira2020/dotnetcore_api_jwttoken/blob/master/Startup.cs) (ASP.NET configuration), [`Controllers/ProductController.cs`](https://github.com/nihira2020/dotnetcore_api_jwttoken/blob/master/Controllers/ProductController.cs) (Product endpoints), [`Controllers/UserController.cs`](https://github.com/nihira2020/dotnetcore_api_jwttoken/blob/master/Controllers/UserController.cs) (Authentication and access)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["API operations"]
  node_customer["Customer endpoints"]
  node_employee["Employee endpoints"]
  node_designation["Designation endpoints"]
end

subgraph group_identity["Identity and access"]
  node_user["Authentication and access<br/>[UserController.cs]"]
  node_usermaster["User administration"]
  node_refresh["Refresh token generator"]
end

subgraph group_data["Persistence"]
  node_context["EF Core context<br/>[Learn_DBContext.cs]"]
  node_sql[("SQL Server database")]
end

subgraph group_media["Product media"]
  node_product["Product endpoints"]
  node_images[("Product image files")]
end

subgraph group_runtime["Request runtime"]
  node_startup["ASP.NET configuration<br/>[Startup.cs]"]
  node_program["Host entry point<br/>[Program.cs]"]
end

node_client(("API client"))

node_client -->|"calls endpoints"| node_customer
node_client -->|"calls endpoints"| node_employee
node_client -->|"calls endpoints"| node_designation
node_client -->|"calls endpoints"| node_product
node_client -->|"calls endpoints"| node_user
node_client -->|"calls endpoints"| node_usermaster
node_customer -->|"queries"| node_context
node_employee -->|"reads and writes"| node_context
node_designation -->|"reads and writes"| node_context
node_product -->|"reads and writes"| node_context
node_user -->|"reads and writes"| node_context
node_usermaster -->|"reads and writes"| node_context
node_refresh -->|"reads and writes"| node_context
node_context -->|"queries and saves"| node_sql
node_product -->|"reads and writes"| node_images
node_startup -->|"registers"| node_context
node_startup -->|"registers"| node_refresh
node_startup -->|"configures authentication"| node_user
node_program -->|"starts host"| node_startup

click node_startup "https://github.com/nihira2020/dotnetcore_api_jwttoken/blob/master/Startup.cs"
click node_customer "https://github.com/nihira2020/dotnetcore_api_jwttoken/blob/master/Controllers/CustomerController.cs"
click node_employee "https://github.com/nihira2020/dotnetcore_api_jwttoken/blob/master/Controllers/EmployeeController.cs"
click node_designation "https://github.com/nihira2020/dotnetcore_api_jwttoken/blob/master/Controllers/DesignationController.cs"
click node_product "https://github.com/nihira2020/dotnetcore_api_jwttoken/blob/master/Controllers/ProductController.cs"
click node_user "https://github.com/nihira2020/dotnetcore_api_jwttoken/blob/master/Controllers/UserController.cs"
click node_usermaster "https://github.com/nihira2020/dotnetcore_api_jwttoken/blob/master/Controllers/UserMasterController.cs"
click node_refresh "https://github.com/nihira2020/dotnetcore_api_jwttoken/blob/master/RefreshTokenGenerator.cs"
click node_context "https://github.com/nihira2020/dotnetcore_api_jwttoken/blob/master/Models/Learn_DBContext.cs"
click node_images "https://github.com/nihira2020/dotnetcore_api_jwttoken/tree/master/wwwroot/Uploads/Product"
click node_program "https://github.com/nihira2020/dotnetcore_api_jwttoken/blob/master/Program.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_customer,node_employee,node_designation,node_client toneBlue
class node_user,node_usermaster,node_refresh toneAmber
class node_context,node_sql toneMint
class node_product,node_images toneRose
class node_startup,node_program toneIndigo
```

## Components

### API operations

- [Customer endpoints](https://github.com/nihira2020/dotnetcore_api_jwttoken/blob/master/Controllers/CustomerController.cs): `Controllers/CustomerController.cs`
- [Employee endpoints](https://github.com/nihira2020/dotnetcore_api_jwttoken/blob/master/Controllers/EmployeeController.cs): `Controllers/EmployeeController.cs`
- [Designation endpoints](https://github.com/nihira2020/dotnetcore_api_jwttoken/blob/master/Controllers/DesignationController.cs): `Controllers/DesignationController.cs`

### Identity and access

- [Authentication and access](https://github.com/nihira2020/dotnetcore_api_jwttoken/blob/master/Controllers/UserController.cs): `Controllers/UserController.cs`
- [User administration](https://github.com/nihira2020/dotnetcore_api_jwttoken/blob/master/Controllers/UserMasterController.cs): `Controllers/UserMasterController.cs`
- [Refresh token generator](https://github.com/nihira2020/dotnetcore_api_jwttoken/blob/master/RefreshTokenGenerator.cs): `RefreshTokenGenerator.cs`

### Persistence

- [EF Core context](https://github.com/nihira2020/dotnetcore_api_jwttoken/blob/master/Models/Learn_DBContext.cs): `Models/Learn_DBContext.cs`
- **SQL Server database**

### Product media

- [Product endpoints](https://github.com/nihira2020/dotnetcore_api_jwttoken/blob/master/Controllers/ProductController.cs): `Controllers/ProductController.cs`
- [Product image files](https://github.com/nihira2020/dotnetcore_api_jwttoken/tree/master/wwwroot/Uploads/Product): `wwwroot/Uploads/Product`

### Request runtime

- [ASP.NET configuration](https://github.com/nihira2020/dotnetcore_api_jwttoken/blob/master/Startup.cs): `Startup.cs`
- [Host entry point](https://github.com/nihira2020/dotnetcore_api_jwttoken/blob/master/Program.cs): `Program.cs`

### Other components

- **API client**

## Connections

- API client → Customer endpoints: calls endpoints
- API client → Employee endpoints: calls endpoints
- API client → Designation endpoints: calls endpoints
- API client → Product endpoints: calls endpoints
- API client → Authentication and access: calls endpoints
- API client → User administration: calls endpoints
- Customer endpoints → EF Core context: queries
- Employee endpoints → EF Core context: reads and writes
- Designation endpoints → EF Core context: reads and writes
- Product endpoints → EF Core context: reads and writes
- Authentication and access → EF Core context: reads and writes
- User administration → EF Core context: reads and writes
- Refresh token generator → EF Core context: reads and writes
- EF Core context → SQL Server database: queries and saves
- Product endpoints → Product image files: reads and writes
- ASP.NET configuration → EF Core context: registers
- ASP.NET configuration → Refresh token generator: registers
- ASP.NET configuration → Authentication and access: configures authentication
- Host entry point → ASP.NET configuration: starts host
