# lenve/vhr architecture

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

- Interactive diagram: https://gitdiagram.com/lenve/vhr
- Repository: https://github.com/lenve/vhr

## Overview

VHR is a web-based HR management system: HR users sign in, receive role-dependent menus, and use the Vue client to manage employee records and other HR functions through Spring Boot APIs. The employee workflow includes searching, editing, and importing/exporting records; adding an employee can also initiate a welcome-email message. The backend separates HTTP controllers, services, and MyBatis mappers. The README documents salary, permissions, chat, and notifications as additional capabilities. Some of those modules are represented by their exact enclosing directories because their implementation was not sampled.

Main entry points: [`vhr/vhrserver/vhr-web/src/main/java/org/javaboy/vhr/controller/emp/EmpBasicController.java`](https://github.com/lenve/vhr/blob/master/vhr/vhrserver/vhr-web/src/main/java/org/javaboy/vhr/controller/emp/EmpBasicController.java) (Employee endpoints), [`vhr/vhrserver/vhr-service/src/main/java/org/javaboy/vhr/service/EmployeeService.java`](https://github.com/lenve/vhr/blob/master/vhr/vhrserver/vhr-service/src/main/java/org/javaboy/vhr/service/EmployeeService.java) (Employee service), [`vuehr/src/utils/api.js`](https://github.com/lenve/vhr/blob/master/vuehr/src/utils/api.js) (API client), [`vhr/vhrserver/vhr-service/src/main/java/org/javaboy/vhr/service/HrService.java`](https://github.com/lenve/vhr/blob/master/vhr/vhrserver/vhr-service/src/main/java/org/javaboy/vhr/service/HrService.java) (HR identity service)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Vue client"]
  node_vueapp["Vue application<br/>[main.js]"]
  node_routing["Navigation and menus<br/>[router.js]"]
  node_clientapi["API client<br/>[api.js]"]
  node_employeeui["Employee records UI<br/>[EmpBasic.vue]"]
end

subgraph group_access["Identity and access"]
  node_login["Login endpoint"]
  node_security["Security configuration"]
  node_hrsvc["HR identity service<br/>[HrService.java]"]
  node_hrstore[("HR and role data")]
  node_hradmin["HR and role administration<br/>[HrController.java]"]
  node_menu["Role-based menus<br/>[MenuService.java]"]
end

subgraph group_hrdata["HR operations"]
  node_employeeapi["Employee endpoints"]
  node_employeesvc["Employee service"]
  node_employeestore[("Employee data")]
  node_excel["Excel conversion<br/>[POIUtils.java]"]
  node_salary["Salary management"]
  node_basicadmin["Organization settings"]
end

subgraph group_platform["Messaging and collaboration"]
  node_rabbit["RabbitMQ"]
  node_mail["Mail delivery service<br/>[MailReceiver.java]"]
  node_chat["Online chat"]
  node_notifications["System notifications"]
end

node_hruser(("HR user"))
node_database[("MySQL")]

node_hruser -->|"uses"| node_vueapp
node_vueapp -->|"configures"| node_routing
node_routing -->|"loads menus"| node_clientapi
node_hruser -.->|"signs in"| node_login
node_login -.->|"authenticates through"| node_security
node_security -.->|"loads users"| node_hrsvc
node_hrsvc -->|"queries identity"| node_hrstore
node_hradmin -->|"manages accounts"| node_hrsvc
node_hradmin -.->|"manages permissions"| node_menu
node_menu -->|"loads menus"| node_hrstore
node_employeeui -.->|"requests data"| node_clientapi
node_clientapi -.->|"sends API requests"| node_employeeapi
node_employeeapi -->|"handles requests"| node_employeesvc
node_employeesvc -->|"reads and writes"| node_employeestore
node_employeeapi -->|"imports and exports"| node_excel
node_employeeapi -->|"loads reference data"| node_basicadmin
node_salary -.->|"assigns employee salaries"| node_employeesvc
node_hrstore -.->|"persists records"| node_database
node_employeesvc -->|"publishes welcome mail"| node_rabbit
node_rabbit -.->|"delivers message"| node_mail
node_hruser -.->|"chats"| node_chat
node_hruser -.->|"views notifications"| node_notifications

click node_vueapp "https://github.com/lenve/vhr/blob/master/vuehr/src/main.js"
click node_routing "https://github.com/lenve/vhr/blob/master/vuehr/src/router.js"
click node_clientapi "https://github.com/lenve/vhr/blob/master/vuehr/src/utils/api.js"
click node_login "https://github.com/lenve/vhr/blob/master/vhr/vhrserver/vhr-web/src/main/java/org/javaboy/vhr/controller/LoginController.java"
click node_security "https://github.com/lenve/vhr/blob/master/vhr/vhrserver/vhr-web/src/main/java/org/javaboy/vhr/config/SecurityConfig.java"
click node_hrsvc "https://github.com/lenve/vhr/blob/master/vhr/vhrserver/vhr-service/src/main/java/org/javaboy/vhr/service/HrService.java"
click node_hrstore "https://github.com/lenve/vhr/tree/master/vhr/vhrserver/vhr-mapper/src/main/java/org/javaboy/vhr/mapper"
click node_hradmin "https://github.com/lenve/vhr/blob/master/vhr/vhrserver/vhr-web/src/main/java/org/javaboy/vhr/controller/system/HrController.java"
click node_menu "https://github.com/lenve/vhr/blob/master/vhr/vhrserver/vhr-service/src/main/java/org/javaboy/vhr/service/MenuService.java"
click node_employeeui "https://github.com/lenve/vhr/blob/master/vuehr/src/views/emp/EmpBasic.vue"
click node_employeeapi "https://github.com/lenve/vhr/blob/master/vhr/vhrserver/vhr-web/src/main/java/org/javaboy/vhr/controller/emp/EmpBasicController.java"
click node_employeesvc "https://github.com/lenve/vhr/blob/master/vhr/vhrserver/vhr-service/src/main/java/org/javaboy/vhr/service/EmployeeService.java"
click node_employeestore "https://github.com/lenve/vhr/blob/master/vhr/vhrserver/vhr-mapper/src/main/java/org/javaboy/vhr/mapper/EmployeeMapper.java"
click node_excel "https://github.com/lenve/vhr/blob/master/vhr/vhrserver/vhr-service/src/main/java/org/javaboy/vhr/utils/POIUtils.java"
click node_salary "https://github.com/lenve/vhr/tree/master/vhr/vhrserver/vhr-web/src/main/java/org/javaboy/vhr/controller/salary"
click node_basicadmin "https://github.com/lenve/vhr/tree/master/vhr/vhrserver/vhr-web/src/main/java/org/javaboy/vhr/controller/system/basic"
click node_mail "https://github.com/lenve/vhr/blob/master/vhr/mailserver/src/main/java/org/javaboy/mailserver/receiver/MailReceiver.java"
click node_chat "https://github.com/lenve/vhr/blob/master/vhr/vhrserver/vhr-web/src/main/java/org/javaboy/vhr/controller/ChatController.java"
click node_notifications "https://github.com/lenve/vhr/tree/master/vhr/vhrserver/vhr-web/src/main/java/org/javaboy/vhr/controller"

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_vueapp,node_routing,node_clientapi,node_employeeui,node_hruser toneBlue
class node_login,node_security,node_hrsvc,node_hrstore,node_hradmin,node_menu,node_database toneAmber
class node_employeeapi,node_employeesvc,node_employeestore,node_excel,node_salary,node_basicadmin toneMint
class node_rabbit,node_mail,node_chat,node_notifications toneRose
```

## Components

### Vue client

- [Vue application](https://github.com/lenve/vhr/blob/master/vuehr/src/main.js): `vuehr/src/main.js`
- [Navigation and menus](https://github.com/lenve/vhr/blob/master/vuehr/src/router.js): `vuehr/src/router.js`
- [API client](https://github.com/lenve/vhr/blob/master/vuehr/src/utils/api.js): `vuehr/src/utils/api.js`
- [Employee records UI](https://github.com/lenve/vhr/blob/master/vuehr/src/views/emp/EmpBasic.vue): `vuehr/src/views/emp/EmpBasic.vue`

### Identity and access

- [Login endpoint](https://github.com/lenve/vhr/blob/master/vhr/vhrserver/vhr-web/src/main/java/org/javaboy/vhr/controller/LoginController.java): `vhr/vhrserver/vhr-web/src/main/java/org/javaboy/vhr/controller/LoginController.java`
- [Security configuration](https://github.com/lenve/vhr/blob/master/vhr/vhrserver/vhr-web/src/main/java/org/javaboy/vhr/config/SecurityConfig.java): `vhr/vhrserver/vhr-web/src/main/java/org/javaboy/vhr/config/SecurityConfig.java`
- [HR identity service](https://github.com/lenve/vhr/blob/master/vhr/vhrserver/vhr-service/src/main/java/org/javaboy/vhr/service/HrService.java): `vhr/vhrserver/vhr-service/src/main/java/org/javaboy/vhr/service/HrService.java`
- [HR and role data](https://github.com/lenve/vhr/tree/master/vhr/vhrserver/vhr-mapper/src/main/java/org/javaboy/vhr/mapper): `vhr/vhrserver/vhr-mapper/src/main/java/org/javaboy/vhr/mapper`
- [HR and role administration](https://github.com/lenve/vhr/blob/master/vhr/vhrserver/vhr-web/src/main/java/org/javaboy/vhr/controller/system/HrController.java): `vhr/vhrserver/vhr-web/src/main/java/org/javaboy/vhr/controller/system/HrController.java`
- [Role-based menus](https://github.com/lenve/vhr/blob/master/vhr/vhrserver/vhr-service/src/main/java/org/javaboy/vhr/service/MenuService.java): `vhr/vhrserver/vhr-service/src/main/java/org/javaboy/vhr/service/MenuService.java`

### HR operations

- [Employee endpoints](https://github.com/lenve/vhr/blob/master/vhr/vhrserver/vhr-web/src/main/java/org/javaboy/vhr/controller/emp/EmpBasicController.java): `vhr/vhrserver/vhr-web/src/main/java/org/javaboy/vhr/controller/emp/EmpBasicController.java`
- [Employee service](https://github.com/lenve/vhr/blob/master/vhr/vhrserver/vhr-service/src/main/java/org/javaboy/vhr/service/EmployeeService.java): `vhr/vhrserver/vhr-service/src/main/java/org/javaboy/vhr/service/EmployeeService.java`
- [Employee data](https://github.com/lenve/vhr/blob/master/vhr/vhrserver/vhr-mapper/src/main/java/org/javaboy/vhr/mapper/EmployeeMapper.java): `vhr/vhrserver/vhr-mapper/src/main/java/org/javaboy/vhr/mapper/EmployeeMapper.java`
- [Excel conversion](https://github.com/lenve/vhr/blob/master/vhr/vhrserver/vhr-service/src/main/java/org/javaboy/vhr/utils/POIUtils.java): `vhr/vhrserver/vhr-service/src/main/java/org/javaboy/vhr/utils/POIUtils.java`
- [Salary management](https://github.com/lenve/vhr/tree/master/vhr/vhrserver/vhr-web/src/main/java/org/javaboy/vhr/controller/salary): `vhr/vhrserver/vhr-web/src/main/java/org/javaboy/vhr/controller/salary`
- [Organization settings](https://github.com/lenve/vhr/tree/master/vhr/vhrserver/vhr-web/src/main/java/org/javaboy/vhr/controller/system/basic): `vhr/vhrserver/vhr-web/src/main/java/org/javaboy/vhr/controller/system/basic`

### Messaging and collaboration

- **RabbitMQ**
- [Mail delivery service](https://github.com/lenve/vhr/blob/master/vhr/mailserver/src/main/java/org/javaboy/mailserver/receiver/MailReceiver.java): `vhr/mailserver/src/main/java/org/javaboy/mailserver/receiver/MailReceiver.java`
- [Online chat](https://github.com/lenve/vhr/blob/master/vhr/vhrserver/vhr-web/src/main/java/org/javaboy/vhr/controller/ChatController.java): `vhr/vhrserver/vhr-web/src/main/java/org/javaboy/vhr/controller/ChatController.java`
- [System notifications](https://github.com/lenve/vhr/tree/master/vhr/vhrserver/vhr-web/src/main/java/org/javaboy/vhr/controller): `vhr/vhrserver/vhr-web/src/main/java/org/javaboy/vhr/controller`

### Other components

- **HR user**
- **MySQL**

## Connections

- HR user → Vue application: uses (evidence: `README.md`)
- Vue application → Navigation and menus: configures (evidence: `vuehr/src/main.js`)
- Navigation and menus → API client: loads menus (evidence: `vuehr/src/main.js`)
- HR user → Login endpoint: signs in
- Login endpoint → Security configuration: authenticates through
- Security configuration → HR identity service: loads users
- HR identity service → HR and role data: queries identity (evidence: `vhr/vhrserver/vhr-service/src/main/java/org/javaboy/vhr/service/HrService.java`)
- HR and role administration → HR identity service: manages accounts (evidence: `vhr/vhrserver/vhr-web/src/main/java/org/javaboy/vhr/controller/system/HrController.java`)
- HR and role administration → Role-based menus: manages permissions
- Role-based menus → HR and role data: loads menus (evidence: `vhr/vhrserver/vhr-service/src/main/java/org/javaboy/vhr/service/MenuService.java`)
- Employee records UI → API client: requests data
- API client → Employee endpoints: sends API requests (evidence: `README.md`)
- Employee endpoints → Employee service: handles requests (evidence: `vhr/vhrserver/vhr-web/src/main/java/org/javaboy/vhr/controller/emp/EmpBasicController.java`)
- Employee service → Employee data: reads and writes (evidence: `vhr/vhrserver/vhr-service/src/main/java/org/javaboy/vhr/service/EmployeeService.java`)
- Employee endpoints → Excel conversion: imports and exports (evidence: `vhr/vhrserver/vhr-web/src/main/java/org/javaboy/vhr/controller/emp/EmpBasicController.java`)
- Employee endpoints → Organization settings: loads reference data (evidence: `vhr/vhrserver/vhr-web/src/main/java/org/javaboy/vhr/controller/emp/EmpBasicController.java`)
- Salary management → Employee service: assigns employee salaries
- HR and role data → MySQL: persists records (evidence: `README.md`)
- Employee service → RabbitMQ: publishes welcome mail (evidence: `vhr/vhrserver/vhr-service/src/main/java/org/javaboy/vhr/service/EmployeeService.java`)
- RabbitMQ → Mail delivery service: delivers message
- HR user → Online chat: chats (evidence: `README.md`)
- HR user → System notifications: views notifications (evidence: `README.md`)
