# nextdevelopernetwork/payroll architecture

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

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

## Overview

PulseHR is an HR management application for employee records, work schedules, attendance, payroll, and related administration. An HR user works through the browser client, which calls the Express API; the server reads and updates PostgreSQL-backed data. The excerpts show schedule, employee, and settings requests, database access, and startup seeding. The README contains no usable capability details, so the additional HR domains shown here are grounded in the client excerpts and database schema; their individual server routes were not sampled.

Main entry points: [`src/client/app.ts`](https://github.com/nextdevelopernetwork/payroll/blob/main/src/client/app.ts) (HR workspace), [`src/db/index.ts`](https://github.com/nextdevelopernetwork/payroll/blob/main/src/db/index.ts) (Database access), [`src/server/seed.ts`](https://github.com/nextdevelopernetwork/payroll/blob/main/src/server/seed.ts) (Startup seeding), [`src/server/index.ts`](https://github.com/nextdevelopernetwork/payroll/blob/main/src/server/index.ts) (Employee API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["HR workspace"]
  node_browser_client["HR workspace<br/>[app.ts]"]
  node_employee_admin["Employee administration<br/>[app.ts]"]
  node_workforce_time["Schedules and time logs<br/>[app.ts]"]
  node_payroll_ui["Payroll and exports<br/>[app.ts]"]
  node_leave_ui["Leave management<br/>[app.ts]"]
  node_review_expense_ui["Reviews and expenses<br/>[app.ts]"]
end

subgraph group_services["Application services"]
  node_auth_api["Authentication and users<br/>[index.ts]"]
  node_employee_api["Employee API<br/>[index.ts]"]
  node_time_api["Schedule API<br/>[index.ts]"]
  node_hr_api["HR domain APIs<br/>[index.ts]"]
  node_startup_seed["Startup seeding<br/>[seed.ts]"]
end

subgraph group_records["HR records"]
  node_db_access["Database access<br/>[index.ts]"]
  node_hr_schema["HR data model<br/>[schema.ts]"]
end

node_hr_user(("HR user"))
node_postgres[("PostgreSQL")]

node_hr_user -->|"uses"| node_browser_client
node_browser_client -->|"opens"| node_employee_admin
node_browser_client -->|"opens"| node_workforce_time
node_browser_client -->|"opens"| node_payroll_ui
node_browser_client -->|"opens"| node_leave_ui
node_browser_client -->|"opens"| node_review_expense_ui
node_browser_client -->|"requests employee data"| node_employee_api
node_browser_client -->|"requests schedule changes"| node_time_api
node_browser_client -->|"requests settings"| node_hr_api
node_employee_api -->|"reads and writes"| node_db_access
node_time_api -->|"reads and writes"| node_db_access
node_auth_api -->|"queries users"| node_db_access
node_hr_api -->|"queries settings"| node_db_access
node_startup_seed -->|"seeds records"| node_db_access
node_db_access -->|"uses schema"| node_hr_schema
node_db_access -->|"connects to"| node_postgres
node_startup_seed -->|"seeds defined tables"| node_hr_schema

click node_browser_client "https://github.com/nextdevelopernetwork/payroll/blob/main/src/client/app.ts"
click node_employee_admin "https://github.com/nextdevelopernetwork/payroll/blob/main/src/client/app.ts"
click node_workforce_time "https://github.com/nextdevelopernetwork/payroll/blob/main/src/client/app.ts"
click node_payroll_ui "https://github.com/nextdevelopernetwork/payroll/blob/main/src/client/app.ts"
click node_leave_ui "https://github.com/nextdevelopernetwork/payroll/blob/main/src/client/app.ts"
click node_review_expense_ui "https://github.com/nextdevelopernetwork/payroll/blob/main/src/client/app.ts"
click node_auth_api "https://github.com/nextdevelopernetwork/payroll/blob/main/src/server/index.ts"
click node_employee_api "https://github.com/nextdevelopernetwork/payroll/blob/main/src/server/index.ts"
click node_time_api "https://github.com/nextdevelopernetwork/payroll/blob/main/src/server/index.ts"
click node_hr_api "https://github.com/nextdevelopernetwork/payroll/blob/main/src/server/index.ts"
click node_startup_seed "https://github.com/nextdevelopernetwork/payroll/blob/main/src/server/seed.ts"
click node_db_access "https://github.com/nextdevelopernetwork/payroll/blob/main/src/db/index.ts"
click node_hr_schema "https://github.com/nextdevelopernetwork/payroll/blob/main/src/db/schema.ts"

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_browser_client,node_employee_admin,node_workforce_time,node_payroll_ui,node_leave_ui,node_review_expense_ui,node_hr_user toneBlue
class node_auth_api,node_employee_api,node_time_api,node_hr_api,node_startup_seed,node_postgres toneAmber
class node_db_access,node_hr_schema toneMint
```

## Components

### HR workspace

- [HR workspace](https://github.com/nextdevelopernetwork/payroll/blob/main/src/client/app.ts): `src/client/app.ts`
- [Employee administration](https://github.com/nextdevelopernetwork/payroll/blob/main/src/client/app.ts): `src/client/app.ts`
- [Schedules and time logs](https://github.com/nextdevelopernetwork/payroll/blob/main/src/client/app.ts): `src/client/app.ts`
- [Payroll and exports](https://github.com/nextdevelopernetwork/payroll/blob/main/src/client/app.ts): `src/client/app.ts`
- [Leave management](https://github.com/nextdevelopernetwork/payroll/blob/main/src/client/app.ts): `src/client/app.ts`
- [Reviews and expenses](https://github.com/nextdevelopernetwork/payroll/blob/main/src/client/app.ts): `src/client/app.ts`

### Application services

- [Authentication and users](https://github.com/nextdevelopernetwork/payroll/blob/main/src/server/index.ts): `src/server/index.ts`
- [Employee API](https://github.com/nextdevelopernetwork/payroll/blob/main/src/server/index.ts): `src/server/index.ts`
- [Schedule API](https://github.com/nextdevelopernetwork/payroll/blob/main/src/server/index.ts): `src/server/index.ts`
- [HR domain APIs](https://github.com/nextdevelopernetwork/payroll/blob/main/src/server/index.ts): `src/server/index.ts`
- [Startup seeding](https://github.com/nextdevelopernetwork/payroll/blob/main/src/server/seed.ts): `src/server/seed.ts`

### HR records

- [Database access](https://github.com/nextdevelopernetwork/payroll/blob/main/src/db/index.ts): `src/db/index.ts`
- [HR data model](https://github.com/nextdevelopernetwork/payroll/blob/main/src/db/schema.ts): `src/db/schema.ts`

### Other components

- **HR user**
- **PostgreSQL**

## Connections

- HR user → HR workspace: uses (evidence: `src/client/app.ts`)
- HR workspace → Employee administration: opens (evidence: `src/client/app.ts`)
- HR workspace → Schedules and time logs: opens (evidence: `src/client/app.ts`)
- HR workspace → Payroll and exports: opens (evidence: `src/client/app.ts`)
- HR workspace → Leave management: opens (evidence: `src/client/app.ts`)
- HR workspace → Reviews and expenses: opens (evidence: `src/client/app.ts`)
- HR workspace → Employee API: requests employee data (evidence: `src/client/app.ts`)
- HR workspace → Schedule API: requests schedule changes (evidence: `src/client/app.ts`)
- HR workspace → HR domain APIs: requests settings (evidence: `src/client/app.ts`)
- Employee API → Database access: reads and writes (evidence: `src/server/index.ts`)
- Schedule API → Database access: reads and writes (evidence: `src/server/index.ts`)
- Authentication and users → Database access: queries users (evidence: `src/server/index.ts`)
- HR domain APIs → Database access: queries settings (evidence: `src/server/index.ts`)
- Startup seeding → Database access: seeds records (evidence: `src/server/seed.ts`)
- Database access → HR data model: uses schema (evidence: `src/db/index.ts`)
- Database access → PostgreSQL: connects to (evidence: `src/db/index.ts`)
- Startup seeding → HR data model: seeds defined tables (evidence: `src/server/seed.ts`)
