# nadeesha-d-shalom/ceymoslanka_hr-erp_system architecture

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

- Interactive diagram: https://gitdiagram.com/nadeesha-d-shalom/ceymoslanka_hr-erp_system
- Repository: https://github.com/nadeesha-d-shalom/ceymoslanka_hr-erp_system

## Overview

Ceymos Lanka ERP is a LAN-oriented staff and business administration system. Its documented staff workflow covers account onboarding with OTP, sign-in, office QR attendance, and leave/attendance administration; the repository also contains buyer management and product capabilities. The frontend provides the staff UI and API client, while Spring services implement domain operations and persist state. Edges are limited to relationships shown in excerpts, SOURCE INDEX references, or the README; several unsampled subsystem links are intentionally omitted.

Main entry points: [`ERP-system/src/main/java/com/nadeesha/ERP_system/permission/service/AdminManagementService.java`](https://github.com/nadeesha-d-shalom/ceymoslanka_hr-erp_system/blob/main/ERP-system/src/main/java/com/nadeesha/ERP_system/permission/service/AdminManagementService.java) (Staff onboarding), [`ERP-system/src/main/java/com/nadeesha/ERP_system/auth/service/AuthService.java`](https://github.com/nadeesha-d-shalom/ceymoslanka_hr-erp_system/blob/main/ERP-system/src/main/java/com/nadeesha/ERP_system/auth/service/AuthService.java) (Authentication), [`ERP-system/src/main/java/com/nadeesha/ERP_system/qr/service/QrTokenService.java`](https://github.com/nadeesha-d-shalom/ceymoslanka_hr-erp_system/blob/main/ERP-system/src/main/java/com/nadeesha/ERP_system/qr/service/QrTokenService.java) (QR tokens), [`ERP-system/src/main/java/com/nadeesha/ERP_system/attendance/service/AttendanceService.java`](https://github.com/nadeesha-d-shalom/ceymoslanka_hr-erp_system/blob/main/ERP-system/src/main/java/com/nadeesha/ERP_system/attendance/service/AttendanceService.java) (Attendance operations)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web application"]
  node_ui["ERP interface<br/>[App.jsx]"]
  node_routes["Staff routes<br/>[AppRoutes.jsx]"]
  node_authclient["Auth API client<br/>[authService.js]"]
  node_api["HTTP client<br/>[axiosClient.js]"]
end

subgraph group_identity["Identity and staff"]
  node_auth["Authentication<br/>[AuthService.java]"]
  node_admin["Staff onboarding"]
  node_userstore[("User accounts")]
  node_profiles[("Staff profiles")]
  node_permissions[("Admin permissions")]
end

subgraph group_workforce["Attendance and leave"]
  node_qr["QR tokens"]
  node_attendance["Attendance operations"]
  node_attendancestore[("Attendance records<br/>[Attendance.java]")]
  node_leave["Leave requests"]
  node_leavebalance[("Leave balances<br/>[LeaveBalance.java]")]
end

subgraph group_commercial["Business operations"]
  node_buyers["Buyer management<br/>[BuyerService.java]"]
  node_products["Product management"]
end

node_staff(("Staff user"))

node_staff -->|"uses"| node_ui
node_ui -->|"renders"| node_routes
node_authclient -->|"uses"| node_api
node_auth -->|"reads"| node_userstore
node_auth -->|"reads"| node_profiles
node_auth -->|"reads"| node_permissions
node_auth -->|"ensures QR"| node_qr
node_admin -->|"writes"| node_userstore
node_admin -->|"writes"| node_profiles
node_admin -->|"assigns"| node_permissions
node_admin -->|"creates"| node_leavebalance
node_admin -->|"ensures QR"| node_qr
node_attendance -->|"reads and writes"| node_attendancestore
node_attendance -->|"validates token"| node_qr
node_leave -->|"reads"| node_attendancestore
node_leave -->|"manages"| node_leavebalance

click node_ui "https://github.com/nadeesha-d-shalom/ceymoslanka_hr-erp_system/blob/main/frontend/src/App.jsx"
click node_routes "https://github.com/nadeesha-d-shalom/ceymoslanka_hr-erp_system/blob/main/frontend/src/routes/AppRoutes.jsx"
click node_authclient "https://github.com/nadeesha-d-shalom/ceymoslanka_hr-erp_system/blob/main/frontend/src/services/authService.js"
click node_api "https://github.com/nadeesha-d-shalom/ceymoslanka_hr-erp_system/blob/main/frontend/src/api/axiosClient.js"
click node_auth "https://github.com/nadeesha-d-shalom/ceymoslanka_hr-erp_system/blob/main/ERP-system/src/main/java/com/nadeesha/ERP_system/auth/service/AuthService.java"
click node_admin "https://github.com/nadeesha-d-shalom/ceymoslanka_hr-erp_system/blob/main/ERP-system/src/main/java/com/nadeesha/ERP_system/permission/service/AdminManagementService.java"
click node_userstore "https://github.com/nadeesha-d-shalom/ceymoslanka_hr-erp_system/blob/main/ERP-system/src/main/java/com/nadeesha/ERP_system/user/repository/UserRepository.java"
click node_profiles "https://github.com/nadeesha-d-shalom/ceymoslanka_hr-erp_system/blob/main/ERP-system/src/main/java/com/nadeesha/ERP_system/employee/repository/UserProfileRepository.java"
click node_permissions "https://github.com/nadeesha-d-shalom/ceymoslanka_hr-erp_system/blob/main/ERP-system/src/main/java/com/nadeesha/ERP_system/permission/repository/AdminPermissionRepository.java"
click node_qr "https://github.com/nadeesha-d-shalom/ceymoslanka_hr-erp_system/blob/main/ERP-system/src/main/java/com/nadeesha/ERP_system/qr/service/QrTokenService.java"
click node_attendance "https://github.com/nadeesha-d-shalom/ceymoslanka_hr-erp_system/blob/main/ERP-system/src/main/java/com/nadeesha/ERP_system/attendance/service/AttendanceService.java"
click node_attendancestore "https://github.com/nadeesha-d-shalom/ceymoslanka_hr-erp_system/blob/main/ERP-system/src/main/java/com/nadeesha/ERP_system/attendance/entity/Attendance.java"
click node_leave "https://github.com/nadeesha-d-shalom/ceymoslanka_hr-erp_system/blob/main/ERP-system/src/main/java/com/nadeesha/ERP_system/leave/service/LeaveRequestService.java"
click node_leavebalance "https://github.com/nadeesha-d-shalom/ceymoslanka_hr-erp_system/blob/main/ERP-system/src/main/java/com/nadeesha/ERP_system/leave/entity/LeaveBalance.java"
click node_buyers "https://github.com/nadeesha-d-shalom/ceymoslanka_hr-erp_system/blob/main/ERP-system/src/main/java/com/nadeesha/ERP_system/buyer/service/BuyerService.java"
click node_products "https://github.com/nadeesha-d-shalom/ceymoslanka_hr-erp_system/blob/main/ERP-system/src/main/java/com/nadeesha/ERP_system/product/service/ProductManagementService.java"

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_ui,node_routes,node_authclient,node_api,node_staff toneBlue
class node_auth,node_admin,node_userstore,node_profiles,node_permissions toneAmber
class node_qr,node_attendance,node_attendancestore,node_leave,node_leavebalance toneMint
class node_buyers,node_products toneRose
```

## Components

### Web application

- [ERP interface](https://github.com/nadeesha-d-shalom/ceymoslanka_hr-erp_system/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Staff routes](https://github.com/nadeesha-d-shalom/ceymoslanka_hr-erp_system/blob/main/frontend/src/routes/AppRoutes.jsx): `frontend/src/routes/AppRoutes.jsx`
- [Auth API client](https://github.com/nadeesha-d-shalom/ceymoslanka_hr-erp_system/blob/main/frontend/src/services/authService.js): `frontend/src/services/authService.js`
- [HTTP client](https://github.com/nadeesha-d-shalom/ceymoslanka_hr-erp_system/blob/main/frontend/src/api/axiosClient.js): `frontend/src/api/axiosClient.js`

### Identity and staff

- [Authentication](https://github.com/nadeesha-d-shalom/ceymoslanka_hr-erp_system/blob/main/ERP-system/src/main/java/com/nadeesha/ERP_system/auth/service/AuthService.java): `ERP-system/src/main/java/com/nadeesha/ERP_system/auth/service/AuthService.java`
- [Staff onboarding](https://github.com/nadeesha-d-shalom/ceymoslanka_hr-erp_system/blob/main/ERP-system/src/main/java/com/nadeesha/ERP_system/permission/service/AdminManagementService.java): `ERP-system/src/main/java/com/nadeesha/ERP_system/permission/service/AdminManagementService.java`
- [User accounts](https://github.com/nadeesha-d-shalom/ceymoslanka_hr-erp_system/blob/main/ERP-system/src/main/java/com/nadeesha/ERP_system/user/repository/UserRepository.java): `ERP-system/src/main/java/com/nadeesha/ERP_system/user/repository/UserRepository.java`
- [Staff profiles](https://github.com/nadeesha-d-shalom/ceymoslanka_hr-erp_system/blob/main/ERP-system/src/main/java/com/nadeesha/ERP_system/employee/repository/UserProfileRepository.java): `ERP-system/src/main/java/com/nadeesha/ERP_system/employee/repository/UserProfileRepository.java`
- [Admin permissions](https://github.com/nadeesha-d-shalom/ceymoslanka_hr-erp_system/blob/main/ERP-system/src/main/java/com/nadeesha/ERP_system/permission/repository/AdminPermissionRepository.java): `ERP-system/src/main/java/com/nadeesha/ERP_system/permission/repository/AdminPermissionRepository.java`

### Attendance and leave

- [QR tokens](https://github.com/nadeesha-d-shalom/ceymoslanka_hr-erp_system/blob/main/ERP-system/src/main/java/com/nadeesha/ERP_system/qr/service/QrTokenService.java): `ERP-system/src/main/java/com/nadeesha/ERP_system/qr/service/QrTokenService.java`
- [Attendance operations](https://github.com/nadeesha-d-shalom/ceymoslanka_hr-erp_system/blob/main/ERP-system/src/main/java/com/nadeesha/ERP_system/attendance/service/AttendanceService.java): `ERP-system/src/main/java/com/nadeesha/ERP_system/attendance/service/AttendanceService.java`
- [Attendance records](https://github.com/nadeesha-d-shalom/ceymoslanka_hr-erp_system/blob/main/ERP-system/src/main/java/com/nadeesha/ERP_system/attendance/entity/Attendance.java): `ERP-system/src/main/java/com/nadeesha/ERP_system/attendance/entity/Attendance.java`
- [Leave requests](https://github.com/nadeesha-d-shalom/ceymoslanka_hr-erp_system/blob/main/ERP-system/src/main/java/com/nadeesha/ERP_system/leave/service/LeaveRequestService.java): `ERP-system/src/main/java/com/nadeesha/ERP_system/leave/service/LeaveRequestService.java`
- [Leave balances](https://github.com/nadeesha-d-shalom/ceymoslanka_hr-erp_system/blob/main/ERP-system/src/main/java/com/nadeesha/ERP_system/leave/entity/LeaveBalance.java): `ERP-system/src/main/java/com/nadeesha/ERP_system/leave/entity/LeaveBalance.java`

### Business operations

- [Buyer management](https://github.com/nadeesha-d-shalom/ceymoslanka_hr-erp_system/blob/main/ERP-system/src/main/java/com/nadeesha/ERP_system/buyer/service/BuyerService.java): `ERP-system/src/main/java/com/nadeesha/ERP_system/buyer/service/BuyerService.java`
- [Product management](https://github.com/nadeesha-d-shalom/ceymoslanka_hr-erp_system/blob/main/ERP-system/src/main/java/com/nadeesha/ERP_system/product/service/ProductManagementService.java): `ERP-system/src/main/java/com/nadeesha/ERP_system/product/service/ProductManagementService.java`

### Other components

- **Staff user**

## Connections

- Staff user → ERP interface: uses (evidence: `README.md`)
- ERP interface → Staff routes: renders (evidence: `frontend/src/routes/AppRoutes.jsx`)
- Auth API client → HTTP client: uses (evidence: `frontend/src/services/authService.js`)
- Authentication → User accounts: reads (evidence: `ERP-system/src/main/java/com/nadeesha/ERP_system/auth/service/AuthService.java`)
- Authentication → Staff profiles: reads (evidence: `ERP-system/src/main/java/com/nadeesha/ERP_system/auth/service/AuthService.java`)
- Authentication → Admin permissions: reads (evidence: `ERP-system/src/main/java/com/nadeesha/ERP_system/auth/service/AuthService.java`)
- Authentication → QR tokens: ensures QR (evidence: `ERP-system/src/main/java/com/nadeesha/ERP_system/auth/service/AuthService.java`)
- Staff onboarding → User accounts: writes (evidence: `ERP-system/src/main/java/com/nadeesha/ERP_system/permission/service/AdminManagementService.java`)
- Staff onboarding → Staff profiles: writes (evidence: `ERP-system/src/main/java/com/nadeesha/ERP_system/permission/service/AdminManagementService.java`)
- Staff onboarding → Admin permissions: assigns (evidence: `ERP-system/src/main/java/com/nadeesha/ERP_system/permission/service/AdminManagementService.java`)
- Staff onboarding → Leave balances: creates (evidence: `ERP-system/src/main/java/com/nadeesha/ERP_system/permission/service/AdminManagementService.java`)
- Staff onboarding → QR tokens: ensures QR (evidence: `ERP-system/src/main/java/com/nadeesha/ERP_system/permission/service/AdminManagementService.java`)
- Attendance operations → Attendance records: reads and writes (evidence: `ERP-system/src/main/java/com/nadeesha/ERP_system/attendance/service/AttendanceService.java`)
- Attendance operations → QR tokens: validates token (evidence: `ERP-system/src/main/java/com/nadeesha/ERP_system/attendance/service/AttendanceService.java`)
- Leave requests → Attendance records: reads (evidence: `ERP-system/src/main/java/com/nadeesha/ERP_system/leave/service/LeaveRequestService.java`)
- Leave requests → Leave balances: manages (evidence: `ERP-system/src/main/java/com/nadeesha/ERP_system/leave/service/LeaveRequestService.java`)
