# stephenbanz/employee-payroll architecture

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

- Interactive diagram: https://gitdiagram.com/stephenbanz/employee-payroll
- Repository: https://github.com/stephenbanz/employee-payroll

## Overview

This is a small, console-based employee payroll program. An employee or administrator enters through the main menu; employees look up their own record, while administrators can create, list, search, modify, and delete records. Lookup and listing calculate gross pay, tax, and net pay before displaying results. Records are stored as binary data in PAY.DAT. The README provides no further capability details, so this map is based on PROJECT2.CPP and the supplied file tree.

Main entry points: [`PROJECT2.CPP`](https://github.com/stephenbanz/employee-payroll/blob/master/PROJECT2.CPP) (Admin menu), [`PAY.DAT`](https://github.com/stephenbanz/employee-payroll/blob/master/PAY.DAT) (PAY.DAT)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_menus["Console menus"]
  node_main["Main menu<br/>[PROJECT2.CPP]"]
  node_admin["Admin menu<br/>[PROJECT2.CPP]"]
  node_employee["Employee menu<br/>[PROJECT2.CPP]"]
end

subgraph group_payroll["Payroll domain"]
  node_record["Payroll record<br/>[PROJECT2.CPP]"]
  node_calculator["Pay calculator<br/>[PROJECT2.CPP]"]
end

subgraph group_records["Record management"]
  node_create["Create record<br/>[PROJECT2.CPP]"]
  node_list["List records<br/>[PROJECT2.CPP]"]
  node_search["Search record<br/>[PROJECT2.CPP]"]
  node_modify["Modify record<br/>[PROJECT2.CPP]"]
  node_delete["Delete record<br/>[PROJECT2.CPP]"]
  node_payfile[("PAY.DAT<br/>[PAY.DAT]")]
end

node_user(("Employee or admin"))

node_user -->|"chooses option"| node_main
node_main -->|"opens"| node_employee
node_main -->|"opens"| node_admin
node_employee -->|"lists employees"| node_list
node_employee -->|"requests lookup"| node_search
node_admin -->|"creates"| node_create
node_admin -->|"displays all"| node_list
node_admin -->|"queries"| node_search
node_admin -->|"modifies"| node_modify
node_admin -->|"deletes"| node_delete
node_list -->|"reads records"| node_payfile
node_search -->|"reads records"| node_payfile
node_create -->|"appends record"| node_payfile
node_modify -->|"updates record"| node_payfile
node_delete -->|"rewrites records"| node_payfile
node_list -->|"calculates pay"| node_calculator
node_search -->|"calculates pay"| node_calculator
node_calculator -->|"reads pay fields"| node_record
node_create -->|"collects details"| node_record
node_modify -->|"updates details"| node_record

click node_main "https://github.com/stephenbanz/employee-payroll/blob/master/PROJECT2.CPP"
click node_admin "https://github.com/stephenbanz/employee-payroll/blob/master/PROJECT2.CPP"
click node_employee "https://github.com/stephenbanz/employee-payroll/blob/master/PROJECT2.CPP"
click node_record "https://github.com/stephenbanz/employee-payroll/blob/master/PROJECT2.CPP"
click node_calculator "https://github.com/stephenbanz/employee-payroll/blob/master/PROJECT2.CPP"
click node_create "https://github.com/stephenbanz/employee-payroll/blob/master/PROJECT2.CPP"
click node_list "https://github.com/stephenbanz/employee-payroll/blob/master/PROJECT2.CPP"
click node_search "https://github.com/stephenbanz/employee-payroll/blob/master/PROJECT2.CPP"
click node_modify "https://github.com/stephenbanz/employee-payroll/blob/master/PROJECT2.CPP"
click node_delete "https://github.com/stephenbanz/employee-payroll/blob/master/PROJECT2.CPP"
click node_payfile "https://github.com/stephenbanz/employee-payroll/blob/master/PAY.DAT"

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_main,node_admin,node_employee toneBlue
class node_record,node_calculator toneAmber
class node_create,node_list,node_search,node_modify,node_delete,node_payfile toneMint
class node_user toneIndigo
```

## Components

### Console menus

- [Main menu](https://github.com/stephenbanz/employee-payroll/blob/master/PROJECT2.CPP): `PROJECT2.CPP`
- [Admin menu](https://github.com/stephenbanz/employee-payroll/blob/master/PROJECT2.CPP): `PROJECT2.CPP`
- [Employee menu](https://github.com/stephenbanz/employee-payroll/blob/master/PROJECT2.CPP): `PROJECT2.CPP`

### Payroll domain

- [Payroll record](https://github.com/stephenbanz/employee-payroll/blob/master/PROJECT2.CPP): `PROJECT2.CPP`
- [Pay calculator](https://github.com/stephenbanz/employee-payroll/blob/master/PROJECT2.CPP): `PROJECT2.CPP`

### Record management

- [Create record](https://github.com/stephenbanz/employee-payroll/blob/master/PROJECT2.CPP): `PROJECT2.CPP`
- [List records](https://github.com/stephenbanz/employee-payroll/blob/master/PROJECT2.CPP): `PROJECT2.CPP`
- [Search record](https://github.com/stephenbanz/employee-payroll/blob/master/PROJECT2.CPP): `PROJECT2.CPP`
- [Modify record](https://github.com/stephenbanz/employee-payroll/blob/master/PROJECT2.CPP): `PROJECT2.CPP`
- [Delete record](https://github.com/stephenbanz/employee-payroll/blob/master/PROJECT2.CPP): `PROJECT2.CPP`
- [PAY.DAT](https://github.com/stephenbanz/employee-payroll/blob/master/PAY.DAT): `PAY.DAT`

### Other components

- **Employee or admin**

## Connections

- Employee or admin → Main menu: chooses option
- Main menu → Employee menu: opens
- Main menu → Admin menu: opens
- Employee menu → List records: lists employees
- Employee menu → Search record: requests lookup
- Admin menu → Create record: creates
- Admin menu → List records: displays all
- Admin menu → Search record: queries
- Admin menu → Modify record: modifies
- Admin menu → Delete record: deletes
- List records → PAY.DAT: reads records
- Search record → PAY.DAT: reads records
- Create record → PAY.DAT: appends record
- Modify record → PAY.DAT: updates record
- Delete record → PAY.DAT: rewrites records
- List records → Pay calculator: calculates pay
- Search record → Pay calculator: calculates pay
- Pay calculator → Payroll record: reads pay fields
- Create record → Payroll record: collects details
- Modify record → Payroll record: updates details
