# martinstanicio/humanresourcesdelta architecture

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

- Interactive diagram: https://gitdiagram.com/martinstanicio/humanresourcesdelta
- Repository: https://github.com/martinstanicio/humanresourcesdelta

## Overview

Human Resources Delta is an HR platform for managing employees, collective agreements, leave, and overtime. Employees and HR staff use the Angular client to access a Django REST API; domain endpoints validate and serialize requests against PostgreSQL-backed models. The principal workflow is login, then submit or manage leave and overtime records; HR can maintain employees and agreements and review requests. The README documents PostgreSQL and Nginx, but the sampled source does not show their runtime wiring, nor does it establish the Angular service-to-API request flow, so those links are omitted.

Main entry points: [`api/empleados/models.py`](https://github.com/martinstanicio/humanresourcesdelta/blob/main/api/empleados/models.py) (Employee records), [`api/convenios/models.py`](https://github.com/martinstanicio/humanresourcesdelta/blob/main/api/convenios/models.py) (Agreement records), [`api/config/urls.py`](https://github.com/martinstanicio/humanresourcesdelta/blob/main/api/config/urls.py) (API URL routing), [`api/licencias/models.py`](https://github.com/martinstanicio/humanresourcesdelta/blob/main/api/licencias/models.py) (Leave records)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web client"]
  node_app["Angular application<br/>[app.ts]"]
  node_routes["Login and app routes<br/>[app.routes.ts]"]
  node_login["Login screen<br/>[login.ts]"]
  node_convenios_service["Agreements client"]
end

subgraph group_api["API access"]
  node_api_routes["API URL routing<br/>[urls.py]"]
  node_employee_endpoints["Employee endpoints<br/>[views.py]"]
  node_agreements_endpoints["Agreement endpoints<br/>[views.py]"]
  node_leave_endpoints["Leave endpoints<br/>[views.py]"]
  node_overtime_endpoints["Overtime endpoints<br/>[views.py]"]
  node_employee_serializers["Employee serialization<br/>[serializers.py]"]
  node_agreement_serializers["Agreement serialization<br/>[serializers.py]"]
  node_leave_serializers["Leave validation<br/>[serializers.py]"]
  node_overtime_serializers["Overtime validation<br/>[serializers.py]"]
end

subgraph group_domain["HR domain"]
end

subgraph group_persistence["Domain records"]
  node_employee_records[("Employee records<br/>[models.py]")]
  node_agreement_records[("Agreement records<br/>[models.py]")]
  node_leave_records[("Leave records<br/>[models.py]")]
  node_overtime_records[("Overtime records<br/>[models.py]")]
  node_postgres[("PostgreSQL")]
end

node_employee_actor(("Employee / HR"))

node_employee_actor -.->|"uses"| node_app
node_app -->|"boots"| node_routes
node_routes -->|"routes to"| node_login
node_employee_endpoints -.->|"serializes"| node_employee_serializers
node_agreements_endpoints -->|"serializes"| node_agreement_serializers
node_leave_endpoints -->|"validates with"| node_leave_serializers
node_overtime_endpoints -->|"validates with"| node_overtime_serializers
node_employee_serializers -->|"maps"| node_employee_records
node_agreement_serializers -->|"maps"| node_agreement_records
node_leave_serializers -->|"maps"| node_leave_records
node_overtime_serializers -->|"maps"| node_overtime_records
node_employee_records -->|"references"| node_agreement_records
node_leave_records -->|"references"| node_employee_records
node_leave_records -->|"references"| node_agreement_records
node_overtime_records -->|"references"| node_employee_records
node_overtime_records -->|"references"| node_agreement_records
node_api_routes -.->|"routes"| node_employee_endpoints
node_api_routes -.->|"routes"| node_agreements_endpoints
node_api_routes -.->|"routes"| node_leave_endpoints
node_api_routes -.->|"routes"| node_overtime_endpoints
node_postgres -.->|"stores"| node_employee_records
node_postgres -.->|"stores"| node_agreement_records
node_postgres -.->|"stores"| node_leave_records
node_postgres -.->|"stores"| node_overtime_records

click node_app "https://github.com/martinstanicio/humanresourcesdelta/blob/main/client/src/app/app.ts"
click node_routes "https://github.com/martinstanicio/humanresourcesdelta/blob/main/client/src/app/app.routes.ts"
click node_login "https://github.com/martinstanicio/humanresourcesdelta/blob/main/client/src/app/login/login.ts"
click node_convenios_service "https://github.com/martinstanicio/humanresourcesdelta/blob/main/client/src/services/convenios.service.ts"
click node_api_routes "https://github.com/martinstanicio/humanresourcesdelta/blob/main/api/config/urls.py"
click node_employee_endpoints "https://github.com/martinstanicio/humanresourcesdelta/blob/main/api/empleados/views.py"
click node_agreements_endpoints "https://github.com/martinstanicio/humanresourcesdelta/blob/main/api/convenios/views.py"
click node_leave_endpoints "https://github.com/martinstanicio/humanresourcesdelta/blob/main/api/licencias/views.py"
click node_overtime_endpoints "https://github.com/martinstanicio/humanresourcesdelta/blob/main/api/horas_extras/views.py"
click node_employee_serializers "https://github.com/martinstanicio/humanresourcesdelta/blob/main/api/empleados/serializers.py"
click node_agreement_serializers "https://github.com/martinstanicio/humanresourcesdelta/blob/main/api/convenios/serializers.py"
click node_leave_serializers "https://github.com/martinstanicio/humanresourcesdelta/blob/main/api/licencias/serializers.py"
click node_overtime_serializers "https://github.com/martinstanicio/humanresourcesdelta/blob/main/api/horas_extras/serializers.py"
click node_employee_records "https://github.com/martinstanicio/humanresourcesdelta/blob/main/api/empleados/models.py"
click node_agreement_records "https://github.com/martinstanicio/humanresourcesdelta/blob/main/api/convenios/models.py"
click node_leave_records "https://github.com/martinstanicio/humanresourcesdelta/blob/main/api/licencias/models.py"
click node_overtime_records "https://github.com/martinstanicio/humanresourcesdelta/blob/main/api/horas_extras/models.py"

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_app,node_routes,node_login,node_convenios_service toneBlue
class node_api_routes,node_employee_endpoints,node_agreements_endpoints,node_leave_endpoints,node_overtime_endpoints,node_employee_serializers,node_agreement_serializers,node_leave_serializers,node_overtime_serializers toneAmber
class node_employee_records,node_agreement_records,node_leave_records,node_overtime_records,node_postgres toneRose
class node_employee_actor toneIndigo
```

## Components

### Web client

- [Angular application](https://github.com/martinstanicio/humanresourcesdelta/blob/main/client/src/app/app.ts): `client/src/app/app.ts`
- [Login and app routes](https://github.com/martinstanicio/humanresourcesdelta/blob/main/client/src/app/app.routes.ts): `client/src/app/app.routes.ts`
- [Login screen](https://github.com/martinstanicio/humanresourcesdelta/blob/main/client/src/app/login/login.ts): `client/src/app/login/login.ts`
- [Agreements client](https://github.com/martinstanicio/humanresourcesdelta/blob/main/client/src/services/convenios.service.ts): `client/src/services/convenios.service.ts`

### API access

- [API URL routing](https://github.com/martinstanicio/humanresourcesdelta/blob/main/api/config/urls.py): `api/config/urls.py`
- [Employee endpoints](https://github.com/martinstanicio/humanresourcesdelta/blob/main/api/empleados/views.py): `api/empleados/views.py`
- [Agreement endpoints](https://github.com/martinstanicio/humanresourcesdelta/blob/main/api/convenios/views.py): `api/convenios/views.py`
- [Leave endpoints](https://github.com/martinstanicio/humanresourcesdelta/blob/main/api/licencias/views.py): `api/licencias/views.py`
- [Overtime endpoints](https://github.com/martinstanicio/humanresourcesdelta/blob/main/api/horas_extras/views.py): `api/horas_extras/views.py`
- [Employee serialization](https://github.com/martinstanicio/humanresourcesdelta/blob/main/api/empleados/serializers.py): `api/empleados/serializers.py`
- [Agreement serialization](https://github.com/martinstanicio/humanresourcesdelta/blob/main/api/convenios/serializers.py): `api/convenios/serializers.py`
- [Leave validation](https://github.com/martinstanicio/humanresourcesdelta/blob/main/api/licencias/serializers.py): `api/licencias/serializers.py`
- [Overtime validation](https://github.com/martinstanicio/humanresourcesdelta/blob/main/api/horas_extras/serializers.py): `api/horas_extras/serializers.py`

### Domain records

- [Employee records](https://github.com/martinstanicio/humanresourcesdelta/blob/main/api/empleados/models.py): `api/empleados/models.py`
- [Agreement records](https://github.com/martinstanicio/humanresourcesdelta/blob/main/api/convenios/models.py): `api/convenios/models.py`
- [Leave records](https://github.com/martinstanicio/humanresourcesdelta/blob/main/api/licencias/models.py): `api/licencias/models.py`
- [Overtime records](https://github.com/martinstanicio/humanresourcesdelta/blob/main/api/horas_extras/models.py): `api/horas_extras/models.py`
- **PostgreSQL**

### Other components

- **Employee / HR**

## Connections

- Employee / HR → Angular application: uses (evidence: `README.md`)
- Angular application → Login and app routes: boots
- Login and app routes → Login screen: routes to (evidence: `client/src/app/app.routes.ts`)
- Employee endpoints → Employee serialization: serializes (evidence: `api/empleados/views.py`)
- Agreement endpoints → Agreement serialization: serializes (evidence: `api/convenios/views.py`)
- Leave endpoints → Leave validation: validates with (evidence: `api/licencias/views.py`)
- Overtime endpoints → Overtime validation: validates with (evidence: `api/horas_extras/views.py`)
- Employee serialization → Employee records: maps (evidence: `api/empleados/serializers.py`)
- Agreement serialization → Agreement records: maps (evidence: `api/convenios/serializers.py`)
- Leave validation → Leave records: maps (evidence: `api/licencias/serializers.py`)
- Overtime validation → Overtime records: maps (evidence: `api/horas_extras/serializers.py`)
- Employee records → Agreement records: references (evidence: `api/empleados/models.py`)
- Leave records → Employee records: references (evidence: `api/licencias/models.py`)
- Leave records → Agreement records: references (evidence: `api/licencias/models.py`)
- Overtime records → Employee records: references (evidence: `api/horas_extras/models.py`)
- Overtime records → Agreement records: references (evidence: `api/horas_extras/models.py`)
- API URL routing → Employee endpoints: routes
- API URL routing → Agreement endpoints: routes
- API URL routing → Leave endpoints: routes
- API URL routing → Overtime endpoints: routes
- PostgreSQL → Employee records: stores (evidence: `README.md`)
- PostgreSQL → Agreement records: stores (evidence: `README.md`)
- PostgreSQL → Leave records: stores (evidence: `README.md`)
- PostgreSQL → Overtime records: stores (evidence: `README.md`)
