# mudiambat13/rhuman architecture

> Architecture diagram of the GitHub repository mudiambat13/rhuman, 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/mudiambat13/rhuman
- Repository: https://github.com/mudiambat13/rhuman

## Overview

This is a multi-project HR management web application: ASP.NET Core APIs and a Razor landing page expose account, employee, department, contract, leave, and salary-slip workflows. Controllers either call registered infrastructure services or directly query the EF Core context; the context persists HR entities and ASP.NET Identity data in SQL Server. Leave approval/rejection and salary-slip report generation are explicit domain stages. The tree and sampled files support these paths, but the README is empty and some controller, service, and entity implementations were not sampled, so uncertain links are omitted.

Main entry points: [`HR.WebUI/Program.cs`](https://github.com/mudiambat13/rhuman/blob/main/HR.WebUI/Program.cs) (Application host), [`HR.Infrastructure/Data/ApplicationDbContext.cs`](https://github.com/mudiambat13/rhuman/blob/main/HR.Infrastructure/Data/ApplicationDbContext.cs) (EF context), [`HR.WebUI/Controllers/EmployeesController.cs`](https://github.com/mudiambat13/rhuman/blob/main/HR.WebUI/Controllers/EmployeesController.cs) (Employee API), [`HR.WebUI/Controllers/DepartmentsController.cs`](https://github.com/mudiambat13/rhuman/blob/main/HR.WebUI/Controllers/DepartmentsController.cs) (Department API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web entrypoints"]
  node_program["Application host<br/>[Program.cs]"]
  node_razor["Razor landing page<br/>[Index.cshtml]"]
end

subgraph group_hr["HR workflows"]
  node_employees["Employee API"]
  node_departments["Department API"]
  node_contracts["Contract API"]
  node_leaveapi["Leave API"]
  node_salaryapi["Salary API"]
  node_employee_service["Employee service<br/>[EmployeeService.cs]"]
  node_leave_service["Leave service"]
  node_salary_service["Salary service"]
  node_domain["HR entities<br/>[Entities]"]
end

subgraph group_identity["Identity"]
  node_auth["Authentication API<br/>[AuthController.cs]"]
  node_identity_store["Identity manager<br/>[Program.cs]"]
end

subgraph group_persistence["Persistence"]
  node_context["EF context"]
  node_sql[("SQL Server")]
end

node_user(("HR user"))

node_user -->|"requests employee operations"| node_employees
node_user -->|"requests department operations"| node_departments
node_user -->|"requests contract operations"| node_contracts
node_user -->|"submits and reviews leave"| node_leaveapi
node_user -->|"requests salary records"| node_salaryapi
node_user -->|"registers or signs in"| node_auth
node_user -->|"opens"| node_razor
node_program -->|"maps controllers"| node_employees
node_program -->|"maps controllers"| node_departments
node_program -->|"maps controllers"| node_contracts
node_program -->|"maps controllers"| node_leaveapi
node_program -->|"maps controllers"| node_salaryapi
node_program -->|"maps controllers"| node_auth
node_program -->|"configures SQL context"| node_context
node_program -->|"configures Identity"| node_identity_store
node_employees -->|"calls"| node_employee_service
node_employee_service -->|"queries and saves"| node_context
node_departments -->|"queries and saves"| node_context
node_contracts -->|"queries and saves"| node_context
node_leaveapi -->|"calls"| node_leave_service
node_leave_service -->|"queries and saves"| node_context
node_salaryapi -->|"calls"| node_salary_service
node_salary_service -->|"queries and saves"| node_context
node_auth -->|"manages accounts and sign-in"| node_identity_store
node_context -->|"reads and writes"| node_sql
node_context -->|"maps entities"| node_domain

click node_program "https://github.com/mudiambat13/rhuman/blob/main/HR.WebUI/Program.cs"
click node_employees "https://github.com/mudiambat13/rhuman/blob/main/HR.WebUI/Controllers/EmployeesController.cs"
click node_departments "https://github.com/mudiambat13/rhuman/blob/main/HR.WebUI/Controllers/DepartmentsController.cs"
click node_contracts "https://github.com/mudiambat13/rhuman/blob/main/HR.WebUI/Controllers/ContractsController.cs"
click node_leaveapi "https://github.com/mudiambat13/rhuman/blob/main/HR.WebUI/Controllers/LeaveRequestsController.cs"
click node_salaryapi "https://github.com/mudiambat13/rhuman/blob/main/HR.WebUI/Controllers/SalarySlipsController.cs"
click node_employee_service "https://github.com/mudiambat13/rhuman/blob/main/HR.Infrastructure/Services/EmployeeService.cs"
click node_leave_service "https://github.com/mudiambat13/rhuman/blob/main/HR.Infrastructure/Services/LeaveRequestService.cs"
click node_salary_service "https://github.com/mudiambat13/rhuman/blob/main/HR.Infrastructure/Services/SalarySlipService.cs"
click node_auth "https://github.com/mudiambat13/rhuman/blob/main/HR.WebUI/Controllers/AuthController.cs"
click node_identity_store "https://github.com/mudiambat13/rhuman/blob/main/HR.WebUI/Program.cs"
click node_domain "https://github.com/mudiambat13/rhuman/tree/main/HR.Domain/Entities"
click node_context "https://github.com/mudiambat13/rhuman/blob/main/HR.Infrastructure/Data/ApplicationDbContext.cs"
click node_razor "https://github.com/mudiambat13/rhuman/blob/main/HR.WebUI/Pages/Index.cshtml"

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_program,node_razor,node_user toneBlue
class node_employees,node_departments,node_contracts,node_leaveapi,node_salaryapi,node_employee_service,node_leave_service,node_salary_service,node_domain toneAmber
class node_auth,node_identity_store toneMint
class node_context,node_sql toneRose
```

## Components

### Web entrypoints

- [Application host](https://github.com/mudiambat13/rhuman/blob/main/HR.WebUI/Program.cs): `HR.WebUI/Program.cs`
- [Razor landing page](https://github.com/mudiambat13/rhuman/blob/main/HR.WebUI/Pages/Index.cshtml): `HR.WebUI/Pages/Index.cshtml`

### HR workflows

- [Employee API](https://github.com/mudiambat13/rhuman/blob/main/HR.WebUI/Controllers/EmployeesController.cs): `HR.WebUI/Controllers/EmployeesController.cs`
- [Department API](https://github.com/mudiambat13/rhuman/blob/main/HR.WebUI/Controllers/DepartmentsController.cs): `HR.WebUI/Controllers/DepartmentsController.cs`
- [Contract API](https://github.com/mudiambat13/rhuman/blob/main/HR.WebUI/Controllers/ContractsController.cs): `HR.WebUI/Controllers/ContractsController.cs`
- [Leave API](https://github.com/mudiambat13/rhuman/blob/main/HR.WebUI/Controllers/LeaveRequestsController.cs): `HR.WebUI/Controllers/LeaveRequestsController.cs`
- [Salary API](https://github.com/mudiambat13/rhuman/blob/main/HR.WebUI/Controllers/SalarySlipsController.cs): `HR.WebUI/Controllers/SalarySlipsController.cs`
- [Employee service](https://github.com/mudiambat13/rhuman/blob/main/HR.Infrastructure/Services/EmployeeService.cs): `HR.Infrastructure/Services/EmployeeService.cs`
- [Leave service](https://github.com/mudiambat13/rhuman/blob/main/HR.Infrastructure/Services/LeaveRequestService.cs): `HR.Infrastructure/Services/LeaveRequestService.cs`
- [Salary service](https://github.com/mudiambat13/rhuman/blob/main/HR.Infrastructure/Services/SalarySlipService.cs): `HR.Infrastructure/Services/SalarySlipService.cs`
- [HR entities](https://github.com/mudiambat13/rhuman/tree/main/HR.Domain/Entities): `HR.Domain/Entities`

### Identity

- [Authentication API](https://github.com/mudiambat13/rhuman/blob/main/HR.WebUI/Controllers/AuthController.cs): `HR.WebUI/Controllers/AuthController.cs`
- [Identity manager](https://github.com/mudiambat13/rhuman/blob/main/HR.WebUI/Program.cs): `HR.WebUI/Program.cs`

### Persistence

- [EF context](https://github.com/mudiambat13/rhuman/blob/main/HR.Infrastructure/Data/ApplicationDbContext.cs): `HR.Infrastructure/Data/ApplicationDbContext.cs`
- **SQL Server**

### Other components

- **HR user**

## Connections

- HR user → Employee API: requests employee operations
- HR user → Department API: requests department operations
- HR user → Contract API: requests contract operations
- HR user → Leave API: submits and reviews leave
- HR user → Salary API: requests salary records
- HR user → Authentication API: registers or signs in
- HR user → Razor landing page: opens
- Application host → Employee API: maps controllers
- Application host → Department API: maps controllers
- Application host → Contract API: maps controllers
- Application host → Leave API: maps controllers
- Application host → Salary API: maps controllers
- Application host → Authentication API: maps controllers
- Application host → EF context: configures SQL context
- Application host → Identity manager: configures Identity
- Employee API → Employee service: calls
- Employee service → EF context: queries and saves
- Department API → EF context: queries and saves
- Contract API → EF context: queries and saves
- Leave API → Leave service: calls
- Leave service → EF context: queries and saves
- Salary API → Salary service: calls
- Salary service → EF context: queries and saves
- Authentication API → Identity manager: manages accounts and sign-in
- EF context → SQL Server: reads and writes
- EF context → HR entities: maps entities
