# sinoeun-ny/hr_management architecture

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

- Interactive diagram: https://gitdiagram.com/sinoeun-ny/hr_management
- Repository: https://github.com/sinoeun-ny/hr_management

## Overview

This is an ASP.NET Core point-of-sale and workforce-management application. Users enter through login, then access operational areas such as employee and department administration, payroll, inventory, suppliers, products, sales, reports, settings, and a dashboard. Sampled controllers call a shared SQL stored-procedure helper; inventory also has a service that reads stock and store data. The README gives no workflow detail, and several feature controllers were not sampled, so their internal links are intentionally omitted.

Main entry points: [`POS_System/POS_System/Controllers/Employee/EmployeeController.cs`](https://github.com/sinoeun-ny/hr_management/blob/main/POS_System/POS_System/Controllers/Employee/EmployeeController.cs) (Employees), [`POS_System/POS_System/Data/DbHelper.cs`](https://github.com/sinoeun-ny/hr_management/blob/main/POS_System/POS_System/Data/DbHelper.cs) (SQL Helper), [`POS_System/POS_System/Controllers/Payroll/PayrollController.cs`](https://github.com/sinoeun-ny/hr_management/blob/main/POS_System/POS_System/Controllers/Payroll/PayrollController.cs) (Payroll), [`POS_System/POS_System/Services/Inventory/InventoryService.cs`](https://github.com/sinoeun-ny/hr_management/blob/main/POS_System/POS_System/Services/Inventory/InventoryService.cs) (Stock Service)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Access and Overview"]
  node_login["Login<br/>[LoginController.cs]"]
  node_dashboard["Dashboard"]
  node_home["Home<br/>[HomeController.cs]"]
end

subgraph group_people["Workforce Management"]
  node_department["Departments"]
  node_employee["Employees"]
  node_payroll["Payroll"]
end

subgraph group_operations["POS Operations"]
  node_pos["Point of Sale<br/>[PosController.cs]"]
  node_product["Products"]
  node_inventory_controller["Inventory"]
  node_inventory_service["Stock Service"]
  node_supplier["Suppliers"]
  node_reports["Reports"]
  node_settings["Settings"]
end

subgraph group_data["Data Access"]
  node_dbhelper["SQL Helper<br/>[DbHelper.cs]"]
  node_dbcontext["Identity Context"]
end

subgraph group_models["Domain Models"]
  node_employee_model["Employee Records<br/>[Employee.cs]"]
  node_employee_details["Employee Details<br/>[EmployeeInfo.cs]"]
  node_employee_position["Employee Positions"]
  node_employee_documents["Employee Documents<br/>[DocumentStorage.cs]"]
  node_department_model["Department Record<br/>[Department.cs]"]
  node_payroll_model["Payroll Records<br/>[Payrollinfo.cs]"]
  node_store_model["Store Data<br/>[StoreModel.cs]"]
  node_stock_model["Stock Data"]
  node_supplier_model["Supplier Record<br/>[Supplier.cs]"]
  node_login_model["Login Credentials<br/>[UserLoginModel.cs]"]
end

node_user(("User"))
node_sql[("SQL Server")]

node_user -->|"signs in"| node_login
node_login -->|"accepts credentials"| node_login_model
node_login -->|"redirects after sign-in"| node_employee
node_department -->|"queries and updates"| node_dbhelper
node_department -->|"accepts department"| node_department_model
node_employee -->|"queries and updates"| node_dbhelper
node_employee -->|"loads and updates"| node_employee_model
node_employee -->|"builds lists"| node_employee_details
node_employee -->|"updates positions"| node_employee_position
node_employee -->|"loads documents"| node_employee_documents
node_payroll -->|"queries and saves"| node_dbhelper
node_payroll -->|"uses employee records"| node_employee_model
node_payroll -.->|"accepts payroll data"| node_payroll_model
node_inventory_controller -.->|"references supplier"| node_supplier_model
node_inventory_service -->|"opens SQL connection"| node_dbhelper
node_inventory_service -->|"returns store data"| node_store_model
node_inventory_service -.->|"returns stock data"| node_stock_model
node_supplier -->|"gets connection"| node_dbhelper
node_supplier -->|"accepts supplier"| node_supplier_model
node_dbhelper -->|"runs commands"| node_sql
node_dbcontext -->|"maps entity"| node_employee_model
node_dbcontext -->|"maps entity"| node_employee_position
node_dbcontext -->|"maps entity"| node_employee_documents

click node_login "https://github.com/sinoeun-ny/hr_management/blob/main/POS_System/POS_System/Controllers/Login/LoginController.cs"
click node_dashboard "https://github.com/sinoeun-ny/hr_management/blob/main/POS_System/POS_System/Controllers/Dashboard/DashboardController.cs"
click node_home "https://github.com/sinoeun-ny/hr_management/blob/main/POS_System/POS_System/Controllers/HomeController.cs"
click node_department "https://github.com/sinoeun-ny/hr_management/blob/main/POS_System/POS_System/Controllers/Department/DepartmentController.cs"
click node_employee "https://github.com/sinoeun-ny/hr_management/blob/main/POS_System/POS_System/Controllers/Employee/EmployeeController.cs"
click node_payroll "https://github.com/sinoeun-ny/hr_management/blob/main/POS_System/POS_System/Controllers/Payroll/PayrollController.cs"
click node_employee_model "https://github.com/sinoeun-ny/hr_management/blob/main/POS_System/POS_System/Models/Employee/Employee.cs"
click node_employee_details "https://github.com/sinoeun-ny/hr_management/blob/main/POS_System/POS_System/Models/Employee/EmployeeInfo.cs"
click node_employee_position "https://github.com/sinoeun-ny/hr_management/blob/main/POS_System/POS_System/Models/Employee/EmployeePosition.cs"
click node_employee_documents "https://github.com/sinoeun-ny/hr_management/blob/main/POS_System/POS_System/Models/Employee/DocumentStorage.cs"
click node_department_model "https://github.com/sinoeun-ny/hr_management/blob/main/POS_System/POS_System/Models/Department/Department.cs"
click node_payroll_model "https://github.com/sinoeun-ny/hr_management/blob/main/POS_System/POS_System/Models/Payroll/Payrollinfo.cs"
click node_pos "https://github.com/sinoeun-ny/hr_management/blob/main/POS_System/POS_System/Controllers/Pos/PosController.cs"
click node_product "https://github.com/sinoeun-ny/hr_management/blob/main/POS_System/POS_System/Controllers/Product/ProductController.cs"
click node_inventory_controller "https://github.com/sinoeun-ny/hr_management/blob/main/POS_System/POS_System/Controllers/Inventory/InventoryController.cs"
click node_inventory_service "https://github.com/sinoeun-ny/hr_management/blob/main/POS_System/POS_System/Services/Inventory/InventoryService.cs"
click node_supplier "https://github.com/sinoeun-ny/hr_management/blob/main/POS_System/POS_System/Controllers/Supplier/SupplierController.cs"
click node_reports "https://github.com/sinoeun-ny/hr_management/blob/main/POS_System/POS_System/Controllers/Report/ReportController.cs"
click node_settings "https://github.com/sinoeun-ny/hr_management/blob/main/POS_System/POS_System/Controllers/Setting/SettingController.cs"
click node_store_model "https://github.com/sinoeun-ny/hr_management/blob/main/POS_System/POS_System/Models/Inventory/StoreModel.cs"
click node_stock_model "https://github.com/sinoeun-ny/hr_management/blob/main/POS_System/POS_System/Models/Inventory/stockProductModel.cs"
click node_supplier_model "https://github.com/sinoeun-ny/hr_management/blob/main/POS_System/POS_System/Models/Suppliers/Supplier.cs"
click node_login_model "https://github.com/sinoeun-ny/hr_management/blob/main/POS_System/POS_System/Models/UserLoginModel.cs"
click node_dbhelper "https://github.com/sinoeun-ny/hr_management/blob/main/POS_System/POS_System/Data/DbHelper.cs"
click node_dbcontext "https://github.com/sinoeun-ny/hr_management/blob/main/POS_System/POS_System/Data/ApplicationDbContext.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_login,node_dashboard,node_home,node_user toneBlue
class node_department,node_employee,node_payroll,node_sql toneAmber
class node_pos,node_product,node_inventory_controller,node_inventory_service,node_supplier,node_reports,node_settings toneMint
class node_dbhelper,node_dbcontext toneRose
class node_employee_model,node_employee_details,node_employee_position,node_employee_documents,node_department_model,node_payroll_model,node_store_model,node_stock_model,node_supplier_model,node_login_model toneIndigo
```

## Components

### Access and Overview

- [Login](https://github.com/sinoeun-ny/hr_management/blob/main/POS_System/POS_System/Controllers/Login/LoginController.cs): `POS_System/POS_System/Controllers/Login/LoginController.cs`
- [Dashboard](https://github.com/sinoeun-ny/hr_management/blob/main/POS_System/POS_System/Controllers/Dashboard/DashboardController.cs): `POS_System/POS_System/Controllers/Dashboard/DashboardController.cs`
- [Home](https://github.com/sinoeun-ny/hr_management/blob/main/POS_System/POS_System/Controllers/HomeController.cs): `POS_System/POS_System/Controllers/HomeController.cs`

### Workforce Management

- [Departments](https://github.com/sinoeun-ny/hr_management/blob/main/POS_System/POS_System/Controllers/Department/DepartmentController.cs): `POS_System/POS_System/Controllers/Department/DepartmentController.cs`
- [Employees](https://github.com/sinoeun-ny/hr_management/blob/main/POS_System/POS_System/Controllers/Employee/EmployeeController.cs): `POS_System/POS_System/Controllers/Employee/EmployeeController.cs`
- [Payroll](https://github.com/sinoeun-ny/hr_management/blob/main/POS_System/POS_System/Controllers/Payroll/PayrollController.cs): `POS_System/POS_System/Controllers/Payroll/PayrollController.cs`

### POS Operations

- [Point of Sale](https://github.com/sinoeun-ny/hr_management/blob/main/POS_System/POS_System/Controllers/Pos/PosController.cs): `POS_System/POS_System/Controllers/Pos/PosController.cs`
- [Products](https://github.com/sinoeun-ny/hr_management/blob/main/POS_System/POS_System/Controllers/Product/ProductController.cs): `POS_System/POS_System/Controllers/Product/ProductController.cs`
- [Inventory](https://github.com/sinoeun-ny/hr_management/blob/main/POS_System/POS_System/Controllers/Inventory/InventoryController.cs): `POS_System/POS_System/Controllers/Inventory/InventoryController.cs`
- [Stock Service](https://github.com/sinoeun-ny/hr_management/blob/main/POS_System/POS_System/Services/Inventory/InventoryService.cs): `POS_System/POS_System/Services/Inventory/InventoryService.cs`
- [Suppliers](https://github.com/sinoeun-ny/hr_management/blob/main/POS_System/POS_System/Controllers/Supplier/SupplierController.cs): `POS_System/POS_System/Controllers/Supplier/SupplierController.cs`
- [Reports](https://github.com/sinoeun-ny/hr_management/blob/main/POS_System/POS_System/Controllers/Report/ReportController.cs): `POS_System/POS_System/Controllers/Report/ReportController.cs`
- [Settings](https://github.com/sinoeun-ny/hr_management/blob/main/POS_System/POS_System/Controllers/Setting/SettingController.cs): `POS_System/POS_System/Controllers/Setting/SettingController.cs`

### Data Access

- [SQL Helper](https://github.com/sinoeun-ny/hr_management/blob/main/POS_System/POS_System/Data/DbHelper.cs): `POS_System/POS_System/Data/DbHelper.cs`
- [Identity Context](https://github.com/sinoeun-ny/hr_management/blob/main/POS_System/POS_System/Data/ApplicationDbContext.cs): `POS_System/POS_System/Data/ApplicationDbContext.cs`

### Domain Models

- [Employee Records](https://github.com/sinoeun-ny/hr_management/blob/main/POS_System/POS_System/Models/Employee/Employee.cs): `POS_System/POS_System/Models/Employee/Employee.cs`
- [Employee Details](https://github.com/sinoeun-ny/hr_management/blob/main/POS_System/POS_System/Models/Employee/EmployeeInfo.cs): `POS_System/POS_System/Models/Employee/EmployeeInfo.cs`
- [Employee Positions](https://github.com/sinoeun-ny/hr_management/blob/main/POS_System/POS_System/Models/Employee/EmployeePosition.cs): `POS_System/POS_System/Models/Employee/EmployeePosition.cs`
- [Employee Documents](https://github.com/sinoeun-ny/hr_management/blob/main/POS_System/POS_System/Models/Employee/DocumentStorage.cs): `POS_System/POS_System/Models/Employee/DocumentStorage.cs`
- [Department Record](https://github.com/sinoeun-ny/hr_management/blob/main/POS_System/POS_System/Models/Department/Department.cs): `POS_System/POS_System/Models/Department/Department.cs`
- [Payroll Records](https://github.com/sinoeun-ny/hr_management/blob/main/POS_System/POS_System/Models/Payroll/Payrollinfo.cs): `POS_System/POS_System/Models/Payroll/Payrollinfo.cs`
- [Store Data](https://github.com/sinoeun-ny/hr_management/blob/main/POS_System/POS_System/Models/Inventory/StoreModel.cs): `POS_System/POS_System/Models/Inventory/StoreModel.cs`
- [Stock Data](https://github.com/sinoeun-ny/hr_management/blob/main/POS_System/POS_System/Models/Inventory/stockProductModel.cs): `POS_System/POS_System/Models/Inventory/stockProductModel.cs`
- [Supplier Record](https://github.com/sinoeun-ny/hr_management/blob/main/POS_System/POS_System/Models/Suppliers/Supplier.cs): `POS_System/POS_System/Models/Suppliers/Supplier.cs`
- [Login Credentials](https://github.com/sinoeun-ny/hr_management/blob/main/POS_System/POS_System/Models/UserLoginModel.cs): `POS_System/POS_System/Models/UserLoginModel.cs`

### Other components

- **User**
- **SQL Server**

## Connections

- User → Login: signs in (evidence: `POS_System/POS_System/Controllers/Login/LoginController.cs`)
- Login → Login Credentials: accepts credentials (evidence: `POS_System/POS_System/Controllers/Login/LoginController.cs`)
- Login → Employees: redirects after sign-in (evidence: `POS_System/POS_System/Controllers/Login/LoginController.cs`)
- Departments → SQL Helper: queries and updates (evidence: `POS_System/POS_System/Controllers/Department/DepartmentController.cs`)
- Departments → Department Record: accepts department (evidence: `POS_System/POS_System/Controllers/Department/DepartmentController.cs`)
- Employees → SQL Helper: queries and updates (evidence: `POS_System/POS_System/Controllers/Employee/EmployeeController.cs`)
- Employees → Employee Records: loads and updates (evidence: `POS_System/POS_System/Controllers/Employee/EmployeeController.cs`)
- Employees → Employee Details: builds lists (evidence: `POS_System/POS_System/Controllers/Employee/EmployeeController.cs`)
- Employees → Employee Positions: updates positions (evidence: `POS_System/POS_System/Controllers/Employee/EmployeeController.cs`)
- Employees → Employee Documents: loads documents (evidence: `POS_System/POS_System/Controllers/Employee/EmployeeController.cs`)
- Payroll → SQL Helper: queries and saves (evidence: `POS_System/POS_System/Controllers/Payroll/PayrollController.cs`)
- Payroll → Employee Records: uses employee records (evidence: `POS_System/POS_System/Controllers/Payroll/PayrollController.cs`)
- Payroll → Payroll Records: accepts payroll data
- Inventory → Supplier Record: references supplier (evidence: `POS_System/POS_System/Controllers/Inventory/InventoryController.cs`)
- Stock Service → SQL Helper: opens SQL connection (evidence: `POS_System/POS_System/Services/Inventory/InventoryService.cs`)
- Stock Service → Store Data: returns store data (evidence: `POS_System/POS_System/Services/Inventory/InventoryService.cs`)
- Stock Service → Stock Data: returns stock data
- Suppliers → SQL Helper: gets connection (evidence: `POS_System/POS_System/Controllers/Supplier/SupplierController.cs`)
- Suppliers → Supplier Record: accepts supplier (evidence: `POS_System/POS_System/Controllers/Supplier/SupplierController.cs`)
- SQL Helper → SQL Server: runs commands (evidence: `POS_System/POS_System/Data/DbHelper.cs`)
- Identity Context → Employee Records: maps entity (evidence: `POS_System/POS_System/Data/ApplicationDbContext.cs`)
- Identity Context → Employee Positions: maps entity (evidence: `POS_System/POS_System/Data/ApplicationDbContext.cs`)
- Identity Context → Employee Documents: maps entity (evidence: `POS_System/POS_System/Data/ApplicationDbContext.cs`)
