# davidcr08/talentflow architecture

> Architecture diagram of the GitHub repository davidcr08/talentflow, 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/davidcr08/talentflow
- Repository: https://github.com/davidcr08/talentflow

## Overview

TalentFlow is an onboarding/offboarding microservices system. The main HTTP workflow enters through the API Gateway, which routes employee and department requests to their services; employee operations validate departments, persist employee state, and publish domain events. A RabbitMQ event flow supports profiles, notifications, and vacation employee replicas, while vacation requests validate and persist periods and publish scheduled-vacation events. Internal service wiring is shown where source excerpts or the README establish it; several event-consumer internals are unsampled, so those links follow documented event topology.

Main entry points: [`microservicios/api-gateway/index.js`](https://github.com/davidcr08/talentflow/blob/main/microservicios/api-gateway/index.js) (API Gateway), [`microservicios/gestion-empleados/src/services/empleados.service.js`](https://github.com/davidcr08/talentflow/blob/main/microservicios/gestion-empleados/src/services/empleados.service.js) (Employee service), [`microservicios/vacaciones-service/app/servicio.py`](https://github.com/davidcr08/talentflow/blob/main/microservicios/vacaciones-service/app/servicio.py) (Vacation service), [`microservicios/gestion-departamentos/public/index.php`](https://github.com/davidcr08/talentflow/blob/main/microservicios/gestion-departamentos/public/index.php) (Department API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["HTTP entry"]
  node_gateway["API Gateway<br/>[index.js]"]
end

subgraph group_people["People services"]
  node_employees["Employee API<br/>[app.js]"]
  node_employee_routes["Employee routes"]
  node_employee_service["Employee service"]
  node_employee_repository["Employee repository"]
  node_employee_db[("Employee PostgreSQL")]
  node_department_api["Department API<br/>[index.php]"]
  node_department_repository["Department repository"]
  node_department_db[("Department MySQL")]
  node_department_client["Department client"]
end

subgraph group_events["Event services"]
  node_publisher["Event publisher"]
  node_rabbitmq["RabbitMQ"]
  node_profiles["Profiles service"]
  node_notifications["Notifications service"]
  node_notification_store[("Notification repository")]
end

subgraph group_vacation["Vacation management"]
  node_vacation_api["Vacation API<br/>[main.py]"]
  node_vacation_service["Vacation service<br/>[servicio.py]"]
  node_vacation_repository["Vacation repository<br/>[repository.py]"]
  node_vacation_db[("Vacation PostgreSQL")]
  node_vacation_consumer["Employee event consumer<br/>[consumidores.py]"]
end

node_client(("HTTP client"))

node_client -->|"sends requests"| node_gateway
node_gateway -->|"proxies employees"| node_employees
node_gateway -->|"proxies departments"| node_department_api
node_gateway -->|"proxies vacations"| node_vacation_api
node_gateway -.->|"proxies profiles"| node_profiles
node_gateway -.->|"proxies notifications"| node_notifications
node_employees -->|"mounts routes"| node_employee_routes
node_employee_routes -->|"calls operations"| node_employee_service
node_employee_service -->|"reads and writes"| node_employee_repository
node_employee_repository -->|"queries"| node_employee_db
node_employee_service -->|"validates department"| node_department_client
node_department_client -->|"calls over HTTP"| node_department_api
node_department_api -->|"uses repository"| node_department_repository
node_department_repository -->|"queries"| node_department_db
node_employee_service -->|"publishes events"| node_publisher
node_publisher -->|"publishes events"| node_rabbitmq
node_rabbitmq -->|"dispatches events"| node_profiles
node_rabbitmq -->|"dispatches events"| node_notifications
node_rabbitmq -->|"dispatches employee events"| node_vacation_consumer
node_notifications -.->|"stores notifications"| node_notification_store
node_vacation_api -->|"handles requests"| node_vacation_service
node_vacation_service -->|"reads and writes"| node_vacation_repository
node_vacation_repository -->|"queries"| node_vacation_db
node_vacation_service -->|"publishes scheduled event"| node_rabbitmq
node_vacation_consumer -->|"updates employee replica"| node_vacation_repository

click node_gateway "https://github.com/davidcr08/talentflow/blob/main/microservicios/api-gateway/index.js"
click node_employees "https://github.com/davidcr08/talentflow/blob/main/microservicios/gestion-empleados/src/app.js"
click node_employee_routes "https://github.com/davidcr08/talentflow/blob/main/microservicios/gestion-empleados/src/routes/empleados.routes.js"
click node_employee_service "https://github.com/davidcr08/talentflow/blob/main/microservicios/gestion-empleados/src/services/empleados.service.js"
click node_employee_repository "https://github.com/davidcr08/talentflow/blob/main/microservicios/gestion-empleados/src/repository/empleados.repository.postgres.js"
click node_department_api "https://github.com/davidcr08/talentflow/blob/main/microservicios/gestion-departamentos/public/index.php"
click node_department_repository "https://github.com/davidcr08/talentflow/blob/main/microservicios/gestion-departamentos/src/DepartamentoRepository.php"
click node_department_client "https://github.com/davidcr08/talentflow/blob/main/microservicios/gestion-empleados/src/clients/departamentos.client.js"
click node_publisher "https://github.com/davidcr08/talentflow/blob/main/microservicios/gestion-empleados/src/events/publicador-eventos.js"
click node_profiles "https://github.com/davidcr08/talentflow/tree/main/microservicios/perfiles-service/internal"
click node_notifications "https://github.com/davidcr08/talentflow/tree/main/microservicios/notificaciones-service/src/main/java/com/talentflow/notificaciones"
click node_notification_store "https://github.com/davidcr08/talentflow/blob/main/microservicios/notificaciones-service/src/main/java/com/talentflow/notificaciones/repositorio/NotificacionRepository.java"
click node_vacation_api "https://github.com/davidcr08/talentflow/blob/main/microservicios/vacaciones-service/app/main.py"
click node_vacation_service "https://github.com/davidcr08/talentflow/blob/main/microservicios/vacaciones-service/app/servicio.py"
click node_vacation_repository "https://github.com/davidcr08/talentflow/blob/main/microservicios/vacaciones-service/app/repository.py"
click node_vacation_consumer "https://github.com/davidcr08/talentflow/blob/main/microservicios/vacaciones-service/app/consumidores.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_gateway,node_client toneBlue
class node_employees,node_employee_routes,node_employee_service,node_employee_repository,node_employee_db,node_department_api,node_department_repository,node_department_db,node_department_client toneAmber
class node_publisher,node_rabbitmq,node_profiles,node_notifications,node_notification_store toneMint
class node_vacation_api,node_vacation_service,node_vacation_repository,node_vacation_db,node_vacation_consumer toneRose
```

## Components

### HTTP entry

- [API Gateway](https://github.com/davidcr08/talentflow/blob/main/microservicios/api-gateway/index.js): `microservicios/api-gateway/index.js`

### People services

- [Employee API](https://github.com/davidcr08/talentflow/blob/main/microservicios/gestion-empleados/src/app.js): `microservicios/gestion-empleados/src/app.js`
- [Employee routes](https://github.com/davidcr08/talentflow/blob/main/microservicios/gestion-empleados/src/routes/empleados.routes.js): `microservicios/gestion-empleados/src/routes/empleados.routes.js`
- [Employee service](https://github.com/davidcr08/talentflow/blob/main/microservicios/gestion-empleados/src/services/empleados.service.js): `microservicios/gestion-empleados/src/services/empleados.service.js`
- [Employee repository](https://github.com/davidcr08/talentflow/blob/main/microservicios/gestion-empleados/src/repository/empleados.repository.postgres.js): `microservicios/gestion-empleados/src/repository/empleados.repository.postgres.js`
- **Employee PostgreSQL**
- [Department API](https://github.com/davidcr08/talentflow/blob/main/microservicios/gestion-departamentos/public/index.php): `microservicios/gestion-departamentos/public/index.php`
- [Department repository](https://github.com/davidcr08/talentflow/blob/main/microservicios/gestion-departamentos/src/DepartamentoRepository.php): `microservicios/gestion-departamentos/src/DepartamentoRepository.php`
- **Department MySQL**
- [Department client](https://github.com/davidcr08/talentflow/blob/main/microservicios/gestion-empleados/src/clients/departamentos.client.js): `microservicios/gestion-empleados/src/clients/departamentos.client.js`

### Event services

- [Event publisher](https://github.com/davidcr08/talentflow/blob/main/microservicios/gestion-empleados/src/events/publicador-eventos.js): `microservicios/gestion-empleados/src/events/publicador-eventos.js`
- **RabbitMQ**
- [Profiles service](https://github.com/davidcr08/talentflow/tree/main/microservicios/perfiles-service/internal): `microservicios/perfiles-service/internal`
- [Notifications service](https://github.com/davidcr08/talentflow/tree/main/microservicios/notificaciones-service/src/main/java/com/talentflow/notificaciones): `microservicios/notificaciones-service/src/main/java/com/talentflow/notificaciones`
- [Notification repository](https://github.com/davidcr08/talentflow/blob/main/microservicios/notificaciones-service/src/main/java/com/talentflow/notificaciones/repositorio/NotificacionRepository.java): `microservicios/notificaciones-service/src/main/java/com/talentflow/notificaciones/repositorio/NotificacionRepository.java`

### Vacation management

- [Vacation API](https://github.com/davidcr08/talentflow/blob/main/microservicios/vacaciones-service/app/main.py): `microservicios/vacaciones-service/app/main.py`
- [Vacation service](https://github.com/davidcr08/talentflow/blob/main/microservicios/vacaciones-service/app/servicio.py): `microservicios/vacaciones-service/app/servicio.py`
- [Vacation repository](https://github.com/davidcr08/talentflow/blob/main/microservicios/vacaciones-service/app/repository.py): `microservicios/vacaciones-service/app/repository.py`
- **Vacation PostgreSQL**
- [Employee event consumer](https://github.com/davidcr08/talentflow/blob/main/microservicios/vacaciones-service/app/consumidores.py): `microservicios/vacaciones-service/app/consumidores.py`

### Other components

- **HTTP client**

## Connections

- HTTP client → API Gateway: sends requests (evidence: `README.md`)
- API Gateway → Employee API: proxies employees (evidence: `README.md`)
- API Gateway → Department API: proxies departments (evidence: `README.md`)
- API Gateway → Vacation API: proxies vacations (evidence: `README.md`)
- API Gateway → Profiles service: proxies profiles (evidence: `README.md`)
- API Gateway → Notifications service: proxies notifications (evidence: `README.md`)
- Employee API → Employee routes: mounts routes (evidence: `microservicios/gestion-empleados/src/app.js`)
- Employee routes → Employee service: calls operations (evidence: `microservicios/gestion-empleados/src/routes/empleados.routes.js`)
- Employee service → Employee repository: reads and writes (evidence: `microservicios/gestion-empleados/src/services/empleados.service.js`)
- Employee repository → Employee PostgreSQL: queries (evidence: `microservicios/gestion-empleados/src/repository/empleados.repository.postgres.js`)
- Employee service → Department client: validates department (evidence: `microservicios/gestion-empleados/src/services/empleados.service.js`)
- Department client → Department API: calls over HTTP (evidence: `README.md`)
- Department API → Department repository: uses repository (evidence: `microservicios/gestion-departamentos/public/index.php`)
- Department repository → Department MySQL: queries (evidence: `microservicios/gestion-departamentos/src/DepartamentoRepository.php`)
- Employee service → Event publisher: publishes events (evidence: `microservicios/gestion-empleados/src/services/empleados.service.js`)
- Event publisher → RabbitMQ: publishes events (evidence: `README.md`)
- RabbitMQ → Profiles service: dispatches events (evidence: `README.md`)
- RabbitMQ → Notifications service: dispatches events (evidence: `README.md`)
- RabbitMQ → Employee event consumer: dispatches employee events (evidence: `README.md`)
- Notifications service → Notification repository: stores notifications (evidence: `microservicios/notificaciones-service/src/main/java/com/talentflow/notificaciones/web/NotificacionController.java`)
- Vacation API → Vacation service: handles requests (evidence: `microservicios/vacaciones-service/app/main.py`)
- Vacation service → Vacation repository: reads and writes (evidence: `microservicios/vacaciones-service/app/servicio.py`)
- Vacation repository → Vacation PostgreSQL: queries (evidence: `microservicios/vacaciones-service/app/repository.py`)
- Vacation service → RabbitMQ: publishes scheduled event (evidence: `README.md`)
- Employee event consumer → Vacation repository: updates employee replica (evidence: `microservicios/vacaciones-service/app/consumidores.py`)
