# bhavdeepbhardwaj/payroll-gsync architecture

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

- Interactive diagram: https://gitdiagram.com/bhavdeepbhardwaj/payroll-gsync
- Repository: https://github.com/bhavdeepbhardwaj/payroll-gsync

## Overview

This is a PHP payroll and employee-administration application, with regional variants (including India and Philippines) and several historical copies. The main user flow is login, employee and salary administration, payroll entry, then payslip viewing or download. The tree also exposes bulk employee/salary-slip operations and profile/status maintenance. Source evidence is sparse and many files are unsampled; the graph therefore focuses on documented links and represents unverified subsystem relationships as dashed rather than asserting a pipeline.

Main entry points: [`index.php`](https://github.com/bhavdeepbhardwaj/payroll-gsync/blob/master/index.php) (Login and routing), [`view_details.php`](https://github.com/bhavdeepbhardwaj/payroll-gsync/blob/master/view_details.php) (Employee details), [`pay_slip.php`](https://github.com/bhavdeepbhardwaj/payroll-gsync/blob/master/pay_slip.php) (Payslip view), [`add_new_emp.php`](https://github.com/bhavdeepbhardwaj/payroll-gsync/blob/master/add_new_emp.php) (Employee entry)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Access and navigation"]
  node_login["Login and routing<br/>[index.php]"]
  node_layout["Shared page layout<br/>[header.php]"]
end

subgraph group_employees["Employee administration"]
  node_employee_add["Employee entry<br/>[add_new_emp.php]"]
  node_employee_save["Employee insert<br/>[insert_emp.php]"]
  node_employee_list["Employee listing<br/>[view_emps.php]"]
  node_employee_detail["Employee details<br/>[view_details.php]"]
  node_employee_edit["Employee editing<br/>[edit_details.php]"]
  node_employee_bulk["Bulk employee import<br/>[bulk_employee.php]"]
  node_profile["Profile and status"]
end

subgraph group_payroll["Payroll operations"]
  node_salary_structure["Salary structure<br/>[sal_struc.php]"]
  node_salary_entry["Payroll entry<br/>[add_pay_slip.php]"]
  node_bulk_payroll["Bulk salary slips<br/>[bulk_sal_slip.php]"]
  node_payslip["Payslip view<br/>[pay_slip.php]"]
  node_payslip_download["Payslip download"]
end

subgraph group_persistence["Persistence"]
  node_database[("MySQL database")]
end

node_user(("Payroll user"))

node_user -->|"signs in"| node_login
node_login -->|"checks credentials"| node_database
node_login -->|"redirects users"| node_employee_detail
node_employee_add -->|"references insert"| node_employee_save
node_employee_detail -.->|"queries records"| node_database
node_salary_entry -.->|"records payroll for"| node_payslip
node_payslip -.->|"offers download"| node_payslip_download
node_employee_list -.->|"opens details"| node_employee_detail

click node_login "https://github.com/bhavdeepbhardwaj/payroll-gsync/blob/master/index.php"
click node_layout "https://github.com/bhavdeepbhardwaj/payroll-gsync/blob/master/header.php"
click node_employee_add "https://github.com/bhavdeepbhardwaj/payroll-gsync/blob/master/add_new_emp.php"
click node_employee_save "https://github.com/bhavdeepbhardwaj/payroll-gsync/blob/master/insert_emp.php"
click node_employee_list "https://github.com/bhavdeepbhardwaj/payroll-gsync/blob/master/view_emps.php"
click node_employee_detail "https://github.com/bhavdeepbhardwaj/payroll-gsync/blob/master/view_details.php"
click node_employee_edit "https://github.com/bhavdeepbhardwaj/payroll-gsync/blob/master/edit_details.php"
click node_employee_bulk "https://github.com/bhavdeepbhardwaj/payroll-gsync/blob/master/bulk_employee.php"
click node_profile "https://github.com/bhavdeepbhardwaj/payroll-gsync/blob/master/update_profilepic.php"
click node_salary_structure "https://github.com/bhavdeepbhardwaj/payroll-gsync/blob/master/sal_struc.php"
click node_salary_entry "https://github.com/bhavdeepbhardwaj/payroll-gsync/blob/master/add_pay_slip.php"
click node_bulk_payroll "https://github.com/bhavdeepbhardwaj/payroll-gsync/blob/master/bulk_sal_slip.php"
click node_payslip "https://github.com/bhavdeepbhardwaj/payroll-gsync/blob/master/pay_slip.php"
click node_payslip_download "https://github.com/bhavdeepbhardwaj/payroll-gsync/blob/master/download_payslip.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_layout,node_user toneBlue
class node_employee_add,node_employee_save,node_employee_list,node_employee_detail,node_employee_edit,node_employee_bulk,node_profile toneAmber
class node_salary_structure,node_salary_entry,node_bulk_payroll,node_payslip,node_payslip_download toneMint
class node_database toneRose
```

## Components

### Access and navigation

- [Login and routing](https://github.com/bhavdeepbhardwaj/payroll-gsync/blob/master/index.php): `index.php`
- [Shared page layout](https://github.com/bhavdeepbhardwaj/payroll-gsync/blob/master/header.php): `header.php`

### Employee administration

- [Employee entry](https://github.com/bhavdeepbhardwaj/payroll-gsync/blob/master/add_new_emp.php): `add_new_emp.php`
- [Employee insert](https://github.com/bhavdeepbhardwaj/payroll-gsync/blob/master/insert_emp.php): `insert_emp.php`
- [Employee listing](https://github.com/bhavdeepbhardwaj/payroll-gsync/blob/master/view_emps.php): `view_emps.php`
- [Employee details](https://github.com/bhavdeepbhardwaj/payroll-gsync/blob/master/view_details.php): `view_details.php`
- [Employee editing](https://github.com/bhavdeepbhardwaj/payroll-gsync/blob/master/edit_details.php): `edit_details.php`
- [Bulk employee import](https://github.com/bhavdeepbhardwaj/payroll-gsync/blob/master/bulk_employee.php): `bulk_employee.php`
- [Profile and status](https://github.com/bhavdeepbhardwaj/payroll-gsync/blob/master/update_profilepic.php): `update_profilepic.php`

### Payroll operations

- [Salary structure](https://github.com/bhavdeepbhardwaj/payroll-gsync/blob/master/sal_struc.php): `sal_struc.php`
- [Payroll entry](https://github.com/bhavdeepbhardwaj/payroll-gsync/blob/master/add_pay_slip.php): `add_pay_slip.php`
- [Bulk salary slips](https://github.com/bhavdeepbhardwaj/payroll-gsync/blob/master/bulk_sal_slip.php): `bulk_sal_slip.php`
- [Payslip view](https://github.com/bhavdeepbhardwaj/payroll-gsync/blob/master/pay_slip.php): `pay_slip.php`
- [Payslip download](https://github.com/bhavdeepbhardwaj/payroll-gsync/blob/master/download_payslip.php): `download_payslip.php`

### Persistence

- **MySQL database**

### Other components

- **Payroll user**

## Connections

- Payroll user → Login and routing: signs in (evidence: `index.php`)
- Login and routing → MySQL database: checks credentials (evidence: `index.php`)
- Login and routing → Employee details: redirects users (evidence: `index.php`)
- Employee entry → Employee insert: references insert (evidence: `add_new_emp.php`)
- Employee details → MySQL database: queries records
- Payroll entry → Payslip view: records payroll for
- Payslip view → Payslip download: offers download
- Employee listing → Employee details: opens details
