# ddanrom05/pcyp-proyecto-final architecture

> Architecture diagram of the GitHub repository ddanrom05/pcyp-proyecto-final, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-05). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ddanrom05/pcyp-proyecto-final
- Repository: https://github.com/ddanrom05/pcyp-proyecto-final

## Overview

This is a Java client/server pediatric vaccination clinic. Users choose patient and vaccination operations in the console client; requests travel over a line-based socket protocol to per-connection handlers, which dispatch to the clinic domain logic and return results. The clinic manages patient and dose records, searches and reports, and persists data in a text file. The excerpts show the main runtime flow and domain model; some report implementations are only partially sampled, so their individual internal relationships are not expanded.

Main entry points: [`Clinica.java`](https://github.com/ddanrom05/pcyp-proyecto-final/blob/main/Clinica.java) (Clinic operations), [`Servidor.java`](https://github.com/ddanrom05/pcyp-proyecto-final/blob/main/Servidor.java) (Server listener), [`Util.java`](https://github.com/ddanrom05/pcyp-proyecto-final/blob/main/Util.java) (Validation utilities), [`Cliente.java`](https://github.com/ddanrom05/pcyp-proyecto-final/blob/main/Cliente.java) (Client menu)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Console client"]
  node_cliente["Client menu<br/>[Cliente.java]"]
end

subgraph group_server["Network server"]
  node_servidor["Server listener<br/>[Servidor.java]"]
  node_handler["Request handler"]
end

subgraph group_domain["Clinic domain"]
  node_clinica["Clinic operations<br/>[Clinica.java]"]
  node_paciente["Patient record<br/>[Paciente.java]"]
  node_dosis["Vaccine dose<br/>[Dosis.java]"]
  node_util["Validation utilities<br/>[Util.java]"]
end

subgraph group_persistence["Persistence"]
  node_data[("Patient data file<br/>[pacientes.txt]")]
end

node_user(("Clinic user"))

node_user -->|"chooses operations"| node_cliente
node_cliente -->|"sends requests"| node_servidor
node_servidor -->|"starts per client"| node_handler
node_handler -->|"dispatches operations"| node_clinica
node_handler -->|"saves changes"| node_servidor
node_servidor -->|"loads and saves"| node_clinica
node_clinica -->|"reads and writes"| node_data
node_clinica -->|"manages records"| node_paciente
node_clinica -->|"creates doses"| node_dosis
node_clinica -->|"validates and formats"| node_util
node_paciente -->|"stores doses"| node_dosis
node_paciente -->|"parses and formats"| node_util
node_dosis -->|"normalizes vaccine names"| node_util
node_cliente -->|"validates input"| node_util

click node_cliente "https://github.com/ddanrom05/pcyp-proyecto-final/blob/main/Cliente.java"
click node_servidor "https://github.com/ddanrom05/pcyp-proyecto-final/blob/main/Servidor.java"
click node_handler "https://github.com/ddanrom05/pcyp-proyecto-final/blob/main/ManejadorCliente.java"
click node_clinica "https://github.com/ddanrom05/pcyp-proyecto-final/blob/main/Clinica.java"
click node_paciente "https://github.com/ddanrom05/pcyp-proyecto-final/blob/main/Paciente.java"
click node_dosis "https://github.com/ddanrom05/pcyp-proyecto-final/blob/main/Dosis.java"
click node_util "https://github.com/ddanrom05/pcyp-proyecto-final/blob/main/Util.java"
click node_data "https://github.com/ddanrom05/pcyp-proyecto-final/blob/main/pacientes.txt"

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_cliente,node_user toneBlue
class node_servidor,node_handler toneAmber
class node_clinica,node_paciente,node_dosis,node_util toneMint
class node_data toneRose
```

## Components

### Console client

- [Client menu](https://github.com/ddanrom05/pcyp-proyecto-final/blob/main/Cliente.java): `Cliente.java`

### Network server

- [Server listener](https://github.com/ddanrom05/pcyp-proyecto-final/blob/main/Servidor.java): `Servidor.java`
- [Request handler](https://github.com/ddanrom05/pcyp-proyecto-final/blob/main/ManejadorCliente.java): `ManejadorCliente.java`

### Clinic domain

- [Clinic operations](https://github.com/ddanrom05/pcyp-proyecto-final/blob/main/Clinica.java): `Clinica.java`
- [Patient record](https://github.com/ddanrom05/pcyp-proyecto-final/blob/main/Paciente.java): `Paciente.java`
- [Vaccine dose](https://github.com/ddanrom05/pcyp-proyecto-final/blob/main/Dosis.java): `Dosis.java`
- [Validation utilities](https://github.com/ddanrom05/pcyp-proyecto-final/blob/main/Util.java): `Util.java`

### Persistence

- [Patient data file](https://github.com/ddanrom05/pcyp-proyecto-final/blob/main/pacientes.txt): `pacientes.txt`

### Other components

- **Clinic user**

## Connections

- Clinic user → Client menu: chooses operations (evidence: `Cliente.java`)
- Client menu → Server listener: sends requests (evidence: `Cliente.java`)
- Server listener → Request handler: starts per client (evidence: `Servidor.java`)
- Request handler → Clinic operations: dispatches operations (evidence: `ManejadorCliente.java`)
- Request handler → Server listener: saves changes (evidence: `ManejadorCliente.java`)
- Server listener → Clinic operations: loads and saves (evidence: `Servidor.java`)
- Clinic operations → Patient data file: reads and writes (evidence: `Clinica.java`)
- Clinic operations → Patient record: manages records (evidence: `Clinica.java`)
- Clinic operations → Vaccine dose: creates doses (evidence: `Clinica.java`)
- Clinic operations → Validation utilities: validates and formats (evidence: `Clinica.java`)
- Patient record → Vaccine dose: stores doses (evidence: `Paciente.java`)
- Patient record → Validation utilities: parses and formats (evidence: `Paciente.java`)
- Vaccine dose → Validation utilities: normalizes vaccine names (evidence: `Dosis.java`)
- Client menu → Validation utilities: validates input (evidence: `Cliente.java`)
