# mwasobaddy/cadebeck architecture

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

- Interactive diagram: https://gitdiagram.com/mwasobaddy/cadebeck
- Repository: https://github.com/mwasobaddy/cadebeck

## Overview

CADEBECK is an HR-management application spanning employee and organization records, attendance, leave, wellbeing, recruitment, payroll, and payslips. Its payroll workflow processes active employees, calculates tax and deductions, records payroll, and supports payslip generation and delivery. The graph also preserves the other major product areas visible in the tree. Relationship evidence is limited to the excerpts and SOURCE INDEX references; unsampled components are included where their product role is clear, but uncertain connections are omitted.

Main entry points: [`app/Models/Employee.php`](https://github.com/mwasobaddy/cadebeck/blob/main/app/Models/Employee.php) (Employee), [`app/Services/PayrollProcessingService.php`](https://github.com/mwasobaddy/cadebeck/blob/main/app/Services/PayrollProcessingService.php) (Payroll processing), [`app/Services/PayslipService.php`](https://github.com/mwasobaddy/cadebeck/blob/main/app/Services/PayslipService.php) (Payslip generation), [`routes/web.php`](https://github.com/mwasobaddy/cadebeck/blob/main/routes/web.php) (Web application)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_people["People and Organization"]
  node_employee["Employee<br/>[Employee.php]"]
  node_user["User account<br/>[User.php]"]
  node_org[("Organization records<br/>[Department.php]")]
end

subgraph group_workforce["Workforce Operations"]
  node_attendance[("Attendance<br/>[Attendance.php]")]
  node_leave[("Leave requests<br/>[LeaveRequest.php]")]
  node_wellbeing["Wellbeing"]
end

subgraph group_talent["Recruitment"]
  node_jobs[("Job adverts<br/>[JobAdvert.php]")]
  node_applications[("Applications<br/>[Application.php]")]
  node_application_ui["Candidate workflow"]
end

subgraph group_pay["Payroll and Payslips"]
  node_payroll_ui["Payroll operations"]
  node_payroll_import["Payroll import"]
  node_processing["Payroll processing"]
  node_tax["Tax calculation"]
  node_payroll[("Payroll records<br/>[Payroll.php]")]
  node_payslip_service["Payslip generation<br/>[PayslipService.php]"]
  node_payslip[("Payslip records<br/>[Payslip.php]")]
  node_notifications["Payroll notifications"]
end

subgraph group_platform["Application Platform"]
  node_web["Web application<br/>[web.php]"]
  node_auth["Authentication routes<br/>[auth.php]"]
end

node_admin(("HR staff"))

node_employee -->|"belongs to"| node_user
node_employee -->|"has many"| node_attendance
node_employee -->|"has many"| node_leave
node_employee -->|"has many"| node_wellbeing
node_employee -->|"has many"| node_payroll
node_employee -->|"has many"| node_payslip
node_applications -->|"belongs to"| node_jobs
node_application_ui -->|"uses"| node_applications
node_application_ui -->|"uses"| node_jobs
node_payroll_ui -.->|"starts"| node_processing
node_processing -->|"records"| node_payroll
node_processing -->|"processes"| node_employee
node_processing -->|"calculates tax"| node_tax
node_processing -->|"delegates"| node_payslip_service
node_processing -->|"notifies"| node_notifications
node_payslip_service -->|"generates"| node_payslip
node_payslip_service -->|"reads"| node_payroll
node_payslip_service -->|"calculates tax"| node_tax
node_payslip_service -->|"emails"| node_notifications
node_admin -.->|"uses"| node_web
node_web -.->|"routes to"| node_application_ui
node_web -.->|"routes to"| node_payroll_ui
node_auth -.->|"authenticates"| node_user

click node_employee "https://github.com/mwasobaddy/cadebeck/blob/main/app/Models/Employee.php"
click node_user "https://github.com/mwasobaddy/cadebeck/blob/main/app/Models/User.php"
click node_org "https://github.com/mwasobaddy/cadebeck/blob/main/app/Models/Department.php"
click node_attendance "https://github.com/mwasobaddy/cadebeck/blob/main/app/Models/Attendance.php"
click node_leave "https://github.com/mwasobaddy/cadebeck/blob/main/app/Models/LeaveRequest.php"
click node_wellbeing "https://github.com/mwasobaddy/cadebeck/blob/main/resources/views/livewire/wellbeing/wellbeing-manager.blade.php"
click node_jobs "https://github.com/mwasobaddy/cadebeck/blob/main/app/Models/JobAdvert.php"
click node_applications "https://github.com/mwasobaddy/cadebeck/blob/main/app/Models/Application.php"
click node_application_ui "https://github.com/mwasobaddy/cadebeck/blob/main/resources/views/livewire/job/applications.blade.php"
click node_payroll_ui "https://github.com/mwasobaddy/cadebeck/blob/main/resources/views/livewire/payroll/admin/process-payroll.blade.php"
click node_payroll_import "https://github.com/mwasobaddy/cadebeck/blob/main/app/Services/PayrollImportService.php"
click node_processing "https://github.com/mwasobaddy/cadebeck/blob/main/app/Services/PayrollProcessingService.php"
click node_tax "https://github.com/mwasobaddy/cadebeck/blob/main/app/Services/TaxCalculationService.php"
click node_payroll "https://github.com/mwasobaddy/cadebeck/blob/main/app/Models/Payroll.php"
click node_payslip_service "https://github.com/mwasobaddy/cadebeck/blob/main/app/Services/PayslipService.php"
click node_payslip "https://github.com/mwasobaddy/cadebeck/blob/main/app/Models/Payslip.php"
click node_notifications "https://github.com/mwasobaddy/cadebeck/blob/main/app/Notifications/PayrollProcessedNotification.php"
click node_web "https://github.com/mwasobaddy/cadebeck/blob/main/routes/web.php"
click node_auth "https://github.com/mwasobaddy/cadebeck/blob/main/routes/auth.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_employee,node_user,node_org toneBlue
class node_attendance,node_leave,node_wellbeing toneAmber
class node_jobs,node_applications,node_application_ui toneMint
class node_payroll_ui,node_payroll_import,node_processing,node_tax,node_payroll,node_payslip_service,node_payslip,node_notifications toneRose
class node_web,node_auth,node_admin toneIndigo
```

## Components

### People and Organization

- [Employee](https://github.com/mwasobaddy/cadebeck/blob/main/app/Models/Employee.php): `app/Models/Employee.php`
- [User account](https://github.com/mwasobaddy/cadebeck/blob/main/app/Models/User.php): `app/Models/User.php`
- [Organization records](https://github.com/mwasobaddy/cadebeck/blob/main/app/Models/Department.php): `app/Models/Department.php`

### Workforce Operations

- [Attendance](https://github.com/mwasobaddy/cadebeck/blob/main/app/Models/Attendance.php): `app/Models/Attendance.php`
- [Leave requests](https://github.com/mwasobaddy/cadebeck/blob/main/app/Models/LeaveRequest.php): `app/Models/LeaveRequest.php`
- [Wellbeing](https://github.com/mwasobaddy/cadebeck/blob/main/resources/views/livewire/wellbeing/wellbeing-manager.blade.php): `resources/views/livewire/wellbeing/wellbeing-manager.blade.php`

### Recruitment

- [Job adverts](https://github.com/mwasobaddy/cadebeck/blob/main/app/Models/JobAdvert.php): `app/Models/JobAdvert.php`
- [Applications](https://github.com/mwasobaddy/cadebeck/blob/main/app/Models/Application.php): `app/Models/Application.php`
- [Candidate workflow](https://github.com/mwasobaddy/cadebeck/blob/main/resources/views/livewire/job/applications.blade.php): `resources/views/livewire/job/applications.blade.php`

### Payroll and Payslips

- [Payroll operations](https://github.com/mwasobaddy/cadebeck/blob/main/resources/views/livewire/payroll/admin/process-payroll.blade.php): `resources/views/livewire/payroll/admin/process-payroll.blade.php`
- [Payroll import](https://github.com/mwasobaddy/cadebeck/blob/main/app/Services/PayrollImportService.php): `app/Services/PayrollImportService.php`
- [Payroll processing](https://github.com/mwasobaddy/cadebeck/blob/main/app/Services/PayrollProcessingService.php): `app/Services/PayrollProcessingService.php`
- [Tax calculation](https://github.com/mwasobaddy/cadebeck/blob/main/app/Services/TaxCalculationService.php): `app/Services/TaxCalculationService.php`
- [Payroll records](https://github.com/mwasobaddy/cadebeck/blob/main/app/Models/Payroll.php): `app/Models/Payroll.php`
- [Payslip generation](https://github.com/mwasobaddy/cadebeck/blob/main/app/Services/PayslipService.php): `app/Services/PayslipService.php`
- [Payslip records](https://github.com/mwasobaddy/cadebeck/blob/main/app/Models/Payslip.php): `app/Models/Payslip.php`
- [Payroll notifications](https://github.com/mwasobaddy/cadebeck/blob/main/app/Notifications/PayrollProcessedNotification.php): `app/Notifications/PayrollProcessedNotification.php`

### Application Platform

- [Web application](https://github.com/mwasobaddy/cadebeck/blob/main/routes/web.php): `routes/web.php`
- [Authentication routes](https://github.com/mwasobaddy/cadebeck/blob/main/routes/auth.php): `routes/auth.php`

### Other components

- **HR staff**

## Connections

- Employee → User account: belongs to (evidence: `app/Models/Employee.php`)
- Employee → Attendance: has many (evidence: `app/Models/Employee.php`)
- Employee → Leave requests: has many (evidence: `app/Models/Employee.php`)
- Employee → Wellbeing: has many (evidence: `app/Models/Employee.php`)
- Employee → Payroll records: has many (evidence: `app/Models/Employee.php`)
- Employee → Payslip records: has many (evidence: `app/Models/Employee.php`)
- Applications → Job adverts: belongs to (evidence: `app/Models/Application.php`)
- Candidate workflow → Applications: uses (evidence: `resources/views/livewire/job/applications.blade.php`)
- Candidate workflow → Job adverts: uses (evidence: `resources/views/livewire/job/applications.blade.php`)
- Payroll operations → Payroll processing: starts
- Payroll processing → Payroll records: records (evidence: `app/Services/PayrollProcessingService.php`)
- Payroll processing → Employee: processes (evidence: `app/Services/PayrollProcessingService.php`)
- Payroll processing → Tax calculation: calculates tax (evidence: `app/Services/PayrollProcessingService.php`)
- Payroll processing → Payslip generation: delegates (evidence: `app/Services/PayrollProcessingService.php`)
- Payroll processing → Payroll notifications: notifies (evidence: `app/Services/PayrollProcessingService.php`)
- Payslip generation → Payslip records: generates (evidence: `app/Services/PayslipService.php`)
- Payslip generation → Payroll records: reads (evidence: `app/Services/PayslipService.php`)
- Payslip generation → Tax calculation: calculates tax (evidence: `app/Services/PayslipService.php`)
- Payslip generation → Payroll notifications: emails (evidence: `app/Services/PayslipService.php`)
- HR staff → Web application: uses
- Web application → Candidate workflow: routes to
- Web application → Payroll operations: routes to
- Authentication routes → User account: authenticates
