# romyz123/hr-vault-201-project architecture

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

- Interactive diagram: https://gitdiagram.com/romyz123/hr-vault-201-project
- Repository: https://github.com/romyz123/hr-vault-201-project

## Overview

TESP HR 201 is a web-based HRIS for employee records and digital 201 files, with recruitment, disciplinary management, performance reviews, and document-expiry tracking. The principal workflow is staff access through the web application to manage or review HR records, with role-based security and audit logging supporting that work. The diagram includes the documented product modules and selected internal security, search, validation, and file-storage layers. Several feature pages are represented from README descriptions and the file tree; their implementation-level connections were not verified in the excerpts.

Main entry points: [`public/edit_employee.php`](https://github.com/romyz123/hr-vault-201-project/blob/main/public/edit_employee.php) (Employee records), [`public/performance_review.php`](https://github.com/romyz123/hr-vault-201-project/blob/main/public/performance_review.php) (Performance reviews), [`config/db.php`](https://github.com/romyz123/hr-vault-201-project/blob/main/config/db.php) (Database connection), [`src/Security.php`](https://github.com/romyz123/hr-vault-201-project/blob/main/src/Security.php) (Access controls)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Access and Security"]
  node_login["Sign in<br/>[login.php]"]
  node_security["Access controls<br/>[Security.php]"]
  node_authenticator["Two-factor auth"]
end

subgraph group_records["Employee Records"]
  node_dashboard["HR dashboard<br/>[index.php]"]
  node_employee_edit["Employee records<br/>[edit_employee.php]"]
  node_employee_service["Employee service"]
  node_search["Employee search<br/>[SearchHelper.php]"]
  node_documents["Document upload<br/>[upload_form.php]"]
end

subgraph group_hr["HR Workflows"]
  node_recruitment["Recruitment<br/>[recruitment.php]"]
  node_disciplinary["Disciplinary console<br/>[disciplinary.php]"]
  node_performance["Performance reviews"]
  node_expiry["Expiry tracking<br/>[tracker.php]"]
  node_approvals["Approvals<br/>[admin_approval.php]"]
  node_analytics["Reports and analytics<br/>[analytics.php]"]
end

subgraph group_platform["Shared Services"]
  node_vault["Encrypted file vault<br/>[FileService.php]"]
  node_validation["Input validation<br/>[Validator.php]"]
  node_audit["Activity logs<br/>[activity_logs.php]"]
  node_backup["Backup and recovery<br/>[manager_user.php]"]
  node_db_config["Database connection<br/>[db.php]"]
end

node_user(("HR staff"))
node_database[("MySQL database")]

node_user -->|"signs in"| node_login
node_user -->|"uses HRIS"| node_dashboard
node_dashboard -->|"loads database"| node_db_config
node_db_config -->|"connects"| node_database
node_employee_edit -->|"loads database"| node_db_config
node_performance -->|"loads database"| node_db_config
node_performance -->|"uses fuzzy search"| node_search
node_employee_edit -->|"loads access controls"| node_security
node_performance -->|"loads access controls"| node_security
node_security -->|"queries records"| node_database
node_documents -.->|"stores encrypted files"| node_vault
node_user -->|"manages hiring"| node_recruitment
node_user -->|"manages cases"| node_disciplinary
node_user -->|"reviews performance"| node_performance
node_user -->|"tracks expiries"| node_expiry
node_user -.->|"reviews requests"| node_approvals
node_user -.->|"views reports"| node_analytics
node_user -->|"reviews activity"| node_audit
node_user -->|"manages recovery"| node_backup
node_employee_edit -.->|"delegates employee logic"| node_employee_service
node_employee_edit -.->|"validates input"| node_validation
node_login -.->|"uses two-factor auth"| node_authenticator

click node_login "https://github.com/romyz123/hr-vault-201-project/blob/main/public/login.php"
click node_security "https://github.com/romyz123/hr-vault-201-project/blob/main/src/Security.php"
click node_authenticator "https://github.com/romyz123/hr-vault-201-project/blob/main/src/GoogleAuthenticator.php"
click node_dashboard "https://github.com/romyz123/hr-vault-201-project/blob/main/public/index.php"
click node_employee_edit "https://github.com/romyz123/hr-vault-201-project/blob/main/public/edit_employee.php"
click node_employee_service "https://github.com/romyz123/hr-vault-201-project/blob/main/src/EmployeeService.php"
click node_search "https://github.com/romyz123/hr-vault-201-project/blob/main/src/SearchHelper.php"
click node_documents "https://github.com/romyz123/hr-vault-201-project/blob/main/public/upload_form.php"
click node_vault "https://github.com/romyz123/hr-vault-201-project/blob/main/src/FileService.php"
click node_recruitment "https://github.com/romyz123/hr-vault-201-project/blob/main/public/recruitment.php"
click node_disciplinary "https://github.com/romyz123/hr-vault-201-project/blob/main/public/disciplinary.php"
click node_performance "https://github.com/romyz123/hr-vault-201-project/blob/main/public/performance_review.php"
click node_expiry "https://github.com/romyz123/hr-vault-201-project/blob/main/public/tracker.php"
click node_approvals "https://github.com/romyz123/hr-vault-201-project/blob/main/public/admin_approval.php"
click node_analytics "https://github.com/romyz123/hr-vault-201-project/blob/main/public/analytics.php"
click node_validation "https://github.com/romyz123/hr-vault-201-project/blob/main/src/Validator.php"
click node_audit "https://github.com/romyz123/hr-vault-201-project/blob/main/public/activity_logs.php"
click node_backup "https://github.com/romyz123/hr-vault-201-project/blob/main/public/manager_user.php"
click node_db_config "https://github.com/romyz123/hr-vault-201-project/blob/main/config/db.php"

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_security,node_authenticator toneBlue
class node_dashboard,node_employee_edit,node_employee_service,node_search,node_documents,node_database toneAmber
class node_recruitment,node_disciplinary,node_performance,node_expiry,node_approvals,node_analytics toneMint
class node_vault,node_validation,node_audit,node_backup,node_db_config toneRose
class node_user toneIndigo
```

## Components

### Access and Security

- [Sign in](https://github.com/romyz123/hr-vault-201-project/blob/main/public/login.php): `public/login.php`
- [Access controls](https://github.com/romyz123/hr-vault-201-project/blob/main/src/Security.php): `src/Security.php`
- [Two-factor auth](https://github.com/romyz123/hr-vault-201-project/blob/main/src/GoogleAuthenticator.php): `src/GoogleAuthenticator.php`

### Employee Records

- [HR dashboard](https://github.com/romyz123/hr-vault-201-project/blob/main/public/index.php): `public/index.php`
- [Employee records](https://github.com/romyz123/hr-vault-201-project/blob/main/public/edit_employee.php): `public/edit_employee.php`
- [Employee service](https://github.com/romyz123/hr-vault-201-project/blob/main/src/EmployeeService.php): `src/EmployeeService.php`
- [Employee search](https://github.com/romyz123/hr-vault-201-project/blob/main/src/SearchHelper.php): `src/SearchHelper.php`
- [Document upload](https://github.com/romyz123/hr-vault-201-project/blob/main/public/upload_form.php): `public/upload_form.php`

### HR Workflows

- [Recruitment](https://github.com/romyz123/hr-vault-201-project/blob/main/public/recruitment.php): `public/recruitment.php`
- [Disciplinary console](https://github.com/romyz123/hr-vault-201-project/blob/main/public/disciplinary.php): `public/disciplinary.php`
- [Performance reviews](https://github.com/romyz123/hr-vault-201-project/blob/main/public/performance_review.php): `public/performance_review.php`
- [Expiry tracking](https://github.com/romyz123/hr-vault-201-project/blob/main/public/tracker.php): `public/tracker.php`
- [Approvals](https://github.com/romyz123/hr-vault-201-project/blob/main/public/admin_approval.php): `public/admin_approval.php`
- [Reports and analytics](https://github.com/romyz123/hr-vault-201-project/blob/main/public/analytics.php): `public/analytics.php`

### Shared Services

- [Encrypted file vault](https://github.com/romyz123/hr-vault-201-project/blob/main/src/FileService.php): `src/FileService.php`
- [Input validation](https://github.com/romyz123/hr-vault-201-project/blob/main/src/Validator.php): `src/Validator.php`
- [Activity logs](https://github.com/romyz123/hr-vault-201-project/blob/main/public/activity_logs.php): `public/activity_logs.php`
- [Backup and recovery](https://github.com/romyz123/hr-vault-201-project/blob/main/public/manager_user.php): `public/manager_user.php`
- [Database connection](https://github.com/romyz123/hr-vault-201-project/blob/main/config/db.php): `config/db.php`

### Other components

- **HR staff**
- **MySQL database**

## Connections

- HR staff → Sign in: signs in (evidence: `README.md`)
- HR staff → HR dashboard: uses HRIS (evidence: `README.md`)
- HR dashboard → Database connection: loads database (evidence: `public/index.php`)
- Database connection → MySQL database: connects (evidence: `config/db.php`)
- Employee records → Database connection: loads database (evidence: `public/edit_employee.php`)
- Performance reviews → Database connection: loads database (evidence: `public/performance_review.php`)
- Performance reviews → Employee search: uses fuzzy search (evidence: `public/performance_review.php`)
- Employee records → Access controls: loads access controls (evidence: `public/edit_employee.php`)
- Performance reviews → Access controls: loads access controls (evidence: `public/performance_review.php`)
- Access controls → MySQL database: queries records (evidence: `src/Security.php`)
- Document upload → Encrypted file vault: stores encrypted files
- HR staff → Recruitment: manages hiring (evidence: `README.md`)
- HR staff → Disciplinary console: manages cases (evidence: `README.md`)
- HR staff → Performance reviews: reviews performance (evidence: `README.md`)
- HR staff → Expiry tracking: tracks expiries (evidence: `README.md`)
- HR staff → Approvals: reviews requests
- HR staff → Reports and analytics: views reports
- HR staff → Activity logs: reviews activity (evidence: `README.md`)
- HR staff → Backup and recovery: manages recovery (evidence: `README.md`)
- Employee records → Employee service: delegates employee logic
- Employee records → Input validation: validates input
- Sign in → Two-factor auth: uses two-factor auth
