# avgsaimukesh/hrm-portal architecture

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

- Interactive diagram: https://gitdiagram.com/avgsaimukesh/hrm-portal
- Repository: https://github.com/avgsaimukesh/hrm-portal

## Overview

This is a browser-based HR management application with separate pages and scripts for admin access, a dashboard, and employee, attendance, department, leave, payroll, performance, and settings features. The admin logs in, reaches the dashboard, and manages records through those feature pages; the dashboard also summarizes employee, attendance, and leave data. The sampled code shows browser localStorage as the persistence layer. The README is empty, and unsampled page scripts provide no evidence for additional cross-feature links.

Main entry points: [`index.js`](https://github.com/avgsaimukesh/hrm-portal/blob/main/index.js) (HR dashboard), [`login.js`](https://github.com/avgsaimukesh/hrm-portal/blob/main/login.js) (Admin login), [`employees.js`](https://github.com/avgsaimukesh/hrm-portal/blob/main/employees.js) (Employee management), [`attendance.js`](https://github.com/avgsaimukesh/hrm-portal/blob/main/attendance.js) (Attendance management)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Admin access"]
  node_login["Admin login<br/>[login.js]"]
end

subgraph group_overview["HR overview"]
  node_dashboard["HR dashboard<br/>[index.js]"]
end

subgraph group_people["People operations"]
  node_employees["Employee management<br/>[employees.js]"]
  node_departments["Department management<br/>[departments.js]"]
end

subgraph group_workforce["Workforce records"]
  node_attendance["Attendance management<br/>[attendance.js]"]
  node_leave["Leave management<br/>[leave.js]"]
  node_payroll["Payroll management<br/>[payroll.js]"]
  node_performance["Performance reviews<br/>[performance.js]"]
end

subgraph group_admin["Administration"]
  node_settings["Profile and settings<br/>[setting.js]"]
  node_browser_store[("Browser localStorage")]
end

node_admin_user(("Admin user"))

node_admin_user -.->|"submits credentials"| node_login
node_login -->|"reads and writes"| node_browser_store
node_login -->|"redirects after login"| node_dashboard
node_dashboard -->|"reads employees"| node_employees
node_dashboard -->|"reads attendance"| node_attendance
node_dashboard -->|"reads leave"| node_leave
node_employees -.->|"persists records"| node_browser_store
node_attendance -->|"reads records"| node_browser_store
node_leave -->|"reads and writes"| node_browser_store
node_departments -->|"reads employees"| node_employees
node_payroll -.->|"persists records"| node_browser_store
node_settings -->|"reads and writes"| node_browser_store

click node_login "https://github.com/avgsaimukesh/hrm-portal/blob/main/login.js"
click node_dashboard "https://github.com/avgsaimukesh/hrm-portal/blob/main/index.js"
click node_employees "https://github.com/avgsaimukesh/hrm-portal/blob/main/employees.js"
click node_departments "https://github.com/avgsaimukesh/hrm-portal/blob/main/departments.js"
click node_attendance "https://github.com/avgsaimukesh/hrm-portal/blob/main/attendance.js"
click node_leave "https://github.com/avgsaimukesh/hrm-portal/blob/main/leave.js"
click node_payroll "https://github.com/avgsaimukesh/hrm-portal/blob/main/payroll.js"
click node_performance "https://github.com/avgsaimukesh/hrm-portal/blob/main/performance.js"
click node_settings "https://github.com/avgsaimukesh/hrm-portal/blob/main/setting.js"

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_admin_user toneBlue
class node_dashboard toneAmber
class node_employees,node_departments toneMint
class node_attendance,node_leave,node_payroll,node_performance toneRose
class node_settings,node_browser_store toneIndigo
```

## Components

### Admin access

- [Admin login](https://github.com/avgsaimukesh/hrm-portal/blob/main/login.js): `login.js`

### HR overview

- [HR dashboard](https://github.com/avgsaimukesh/hrm-portal/blob/main/index.js): `index.js`

### People operations

- [Employee management](https://github.com/avgsaimukesh/hrm-portal/blob/main/employees.js): `employees.js`
- [Department management](https://github.com/avgsaimukesh/hrm-portal/blob/main/departments.js): `departments.js`

### Workforce records

- [Attendance management](https://github.com/avgsaimukesh/hrm-portal/blob/main/attendance.js): `attendance.js`
- [Leave management](https://github.com/avgsaimukesh/hrm-portal/blob/main/leave.js): `leave.js`
- [Payroll management](https://github.com/avgsaimukesh/hrm-portal/blob/main/payroll.js): `payroll.js`
- [Performance reviews](https://github.com/avgsaimukesh/hrm-portal/blob/main/performance.js): `performance.js`

### Administration

- [Profile and settings](https://github.com/avgsaimukesh/hrm-portal/blob/main/setting.js): `setting.js`
- **Browser localStorage**

### Other components

- **Admin user**

## Connections

- Admin user → Admin login: submits credentials
- Admin login → Browser localStorage: reads and writes (evidence: `login.js`)
- Admin login → HR dashboard: redirects after login (evidence: `login.js`)
- HR dashboard → Employee management: reads employees (evidence: `index.js`)
- HR dashboard → Attendance management: reads attendance (evidence: `index.js`)
- HR dashboard → Leave management: reads leave (evidence: `index.js`)
- Employee management → Browser localStorage: persists records
- Attendance management → Browser localStorage: reads records (evidence: `attendance.js`)
- Leave management → Browser localStorage: reads and writes (evidence: `leave.js`)
- Department management → Employee management: reads employees (evidence: `departments.js`)
- Payroll management → Browser localStorage: persists records
- Profile and settings → Browser localStorage: reads and writes (evidence: `setting.js`)
