# juangedda/ppaidsig6 architecture

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

- Interactive diagram: https://gitdiagram.com/juangedda/ppaidsig6
- Repository: https://github.com/juangedda/ppaidsig6

## Overview

This repository implements CU 28: an employee at a medical commission records receipt of a sent bolsín, reviews its remitos and documentation, chooses a reception outcome, optionally marks documents, and confirms or cancels. The React wizard drives a REST boundary and a stateful Spring service; domain state changes are persisted, and the CU 29 include prepares per-origin notifications written to the backend log. The README documents six alternate flows. Some backend calls and UI steps are unsampled, so those links are included only where excerpts, the source index, or README support them.

Main entry points: [`front/src/App.jsx`](https://github.com/juangedda/ppaidsig6/blob/main/front/src/App.jsx) (Wizard coordinator), [`back/src/main/java/ppai/bolsines/gestor/GestorRegistroRecepcionBolsines.java`](https://github.com/juangedda/ppaidsig6/blob/main/back/src/main/java/ppai/bolsines/gestor/GestorRegistroRecepcionBolsines.java) (Reception manager), [`back/src/main/java/ppai/bolsines/notificacion/NotificacionBolsinLog.java`](https://github.com/juangedda/ppaidsig6/blob/main/back/src/main/java/ppai/bolsines/notificacion/NotificacionBolsinLog.java) (Log notifier), [`front/src/services/api.js`](https://github.com/juangedda/ppaidsig6/blob/main/front/src/services/api.js) (REST client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Reception wizard"]
  node_app["Wizard coordinator<br/>[App.jsx]"]
  node_api_client["REST client<br/>[api.js]"]
  node_select_bolsin["Select bolsín"]
  node_review_bolsin["Review contents"]
  node_choose_outcome["Choose outcome"]
  node_mark_documents["Mark documents"]
  node_confirm_result["Confirm and result<br/>[Confirmacion.jsx]"]
end

subgraph group_workflow["Use-case control"]
  node_screen["REST boundary"]
  node_manager["Reception manager"]
end

subgraph group_domain["Domain and state"]
  node_bolsin["Bolsín aggregate<br/>[Bolsin.java]"]
  node_remito["Remito and details<br/>[Remito.java]"]
  node_documentation["Document state machine<br/>[Documentacion.java]"]
end

subgraph group_persistence["Persistence and notice"]
  node_repositories["JPA repositories"]
  node_database[("H2 database")]
  node_notice["Receipt notification"]
  node_notice_log["Log notifier"]
end

node_employee(("Commission employee"))
node_console(("Backend console"))

node_employee -->|"uses wizard"| node_app
node_app -->|"renders step"| node_select_bolsin
node_app -->|"renders step"| node_review_bolsin
node_app -->|"renders step"| node_choose_outcome
node_app -->|"renders step"| node_mark_documents
node_app -->|"renders step"| node_confirm_result
node_app -->|"requests data"| node_api_client
node_api_client -->|"calls REST API"| node_screen
node_screen -->|"delegates steps"| node_manager
node_manager -->|"uses repositories"| node_repositories
node_manager -->|"processes receipt"| node_bolsin
node_bolsin -->|"reads and updates"| node_remito
node_remito -->|"delegates transitions"| node_documentation
node_repositories -->|"persists entities"| node_database
node_manager -->|"prepares CU 29"| node_notice
node_notice_log -->|"logs notification"| node_notice
node_notice_log -->|"writes log"| node_console

click node_app "https://github.com/juangedda/ppaidsig6/blob/main/front/src/App.jsx"
click node_api_client "https://github.com/juangedda/ppaidsig6/blob/main/front/src/services/api.js"
click node_select_bolsin "https://github.com/juangedda/ppaidsig6/blob/main/front/src/components/pasos/SeleccionBolsin.jsx"
click node_review_bolsin "https://github.com/juangedda/ppaidsig6/blob/main/front/src/components/pasos/ContenidoBolsin.jsx"
click node_choose_outcome "https://github.com/juangedda/ppaidsig6/blob/main/front/src/components/pasos/OpcionRecepcion.jsx"
click node_mark_documents "https://github.com/juangedda/ppaidsig6/blob/main/front/src/components/pasos/SeleccionDocumentacion.jsx"
click node_confirm_result "https://github.com/juangedda/ppaidsig6/blob/main/front/src/components/pasos/Confirmacion.jsx"
click node_screen "https://github.com/juangedda/ppaidsig6/blob/main/back/src/main/java/ppai/bolsines/pantalla/PantallaRegistroRecepcionBolsines.java"
click node_manager "https://github.com/juangedda/ppaidsig6/blob/main/back/src/main/java/ppai/bolsines/gestor/GestorRegistroRecepcionBolsines.java"
click node_bolsin "https://github.com/juangedda/ppaidsig6/blob/main/back/src/main/java/ppai/bolsines/modelo/bolsin/Bolsin.java"
click node_remito "https://github.com/juangedda/ppaidsig6/blob/main/back/src/main/java/ppai/bolsines/modelo/remito/Remito.java"
click node_documentation "https://github.com/juangedda/ppaidsig6/blob/main/back/src/main/java/ppai/bolsines/modelo/documentacion/Documentacion.java"
click node_repositories "https://github.com/juangedda/ppaidsig6/tree/main/back/src/main/java/ppai/bolsines/repositorio"
click node_notice "https://github.com/juangedda/ppaidsig6/blob/main/back/src/main/java/ppai/bolsines/notificacion/NotificacionRecepcionBolsin.java"
click node_notice_log "https://github.com/juangedda/ppaidsig6/blob/main/back/src/main/java/ppai/bolsines/notificacion/NotificacionBolsinLog.java"

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_api_client,node_select_bolsin,node_review_bolsin,node_choose_outcome,node_mark_documents,node_confirm_result toneBlue
class node_screen,node_manager toneAmber
class node_bolsin,node_remito,node_documentation toneMint
class node_repositories,node_database,node_notice,node_notice_log toneRose
class node_employee,node_console toneIndigo
```

## Components

### Reception wizard

- [Wizard coordinator](https://github.com/juangedda/ppaidsig6/blob/main/front/src/App.jsx): `front/src/App.jsx`
- [REST client](https://github.com/juangedda/ppaidsig6/blob/main/front/src/services/api.js): `front/src/services/api.js`
- [Select bolsín](https://github.com/juangedda/ppaidsig6/blob/main/front/src/components/pasos/SeleccionBolsin.jsx): `front/src/components/pasos/SeleccionBolsin.jsx`
- [Review contents](https://github.com/juangedda/ppaidsig6/blob/main/front/src/components/pasos/ContenidoBolsin.jsx): `front/src/components/pasos/ContenidoBolsin.jsx`
- [Choose outcome](https://github.com/juangedda/ppaidsig6/blob/main/front/src/components/pasos/OpcionRecepcion.jsx): `front/src/components/pasos/OpcionRecepcion.jsx`
- [Mark documents](https://github.com/juangedda/ppaidsig6/blob/main/front/src/components/pasos/SeleccionDocumentacion.jsx): `front/src/components/pasos/SeleccionDocumentacion.jsx`
- [Confirm and result](https://github.com/juangedda/ppaidsig6/blob/main/front/src/components/pasos/Confirmacion.jsx): `front/src/components/pasos/Confirmacion.jsx`

### Use-case control

- [REST boundary](https://github.com/juangedda/ppaidsig6/blob/main/back/src/main/java/ppai/bolsines/pantalla/PantallaRegistroRecepcionBolsines.java): `back/src/main/java/ppai/bolsines/pantalla/PantallaRegistroRecepcionBolsines.java`
- [Reception manager](https://github.com/juangedda/ppaidsig6/blob/main/back/src/main/java/ppai/bolsines/gestor/GestorRegistroRecepcionBolsines.java): `back/src/main/java/ppai/bolsines/gestor/GestorRegistroRecepcionBolsines.java`

### Domain and state

- [Bolsín aggregate](https://github.com/juangedda/ppaidsig6/blob/main/back/src/main/java/ppai/bolsines/modelo/bolsin/Bolsin.java): `back/src/main/java/ppai/bolsines/modelo/bolsin/Bolsin.java`
- [Remito and details](https://github.com/juangedda/ppaidsig6/blob/main/back/src/main/java/ppai/bolsines/modelo/remito/Remito.java): `back/src/main/java/ppai/bolsines/modelo/remito/Remito.java`
- [Document state machine](https://github.com/juangedda/ppaidsig6/blob/main/back/src/main/java/ppai/bolsines/modelo/documentacion/Documentacion.java): `back/src/main/java/ppai/bolsines/modelo/documentacion/Documentacion.java`

### Persistence and notice

- [JPA repositories](https://github.com/juangedda/ppaidsig6/tree/main/back/src/main/java/ppai/bolsines/repositorio): `back/src/main/java/ppai/bolsines/repositorio`
- **H2 database**
- [Receipt notification](https://github.com/juangedda/ppaidsig6/blob/main/back/src/main/java/ppai/bolsines/notificacion/NotificacionRecepcionBolsin.java): `back/src/main/java/ppai/bolsines/notificacion/NotificacionRecepcionBolsin.java`
- [Log notifier](https://github.com/juangedda/ppaidsig6/blob/main/back/src/main/java/ppai/bolsines/notificacion/NotificacionBolsinLog.java): `back/src/main/java/ppai/bolsines/notificacion/NotificacionBolsinLog.java`

### Other components

- **Commission employee**
- **Backend console**

## Connections

- Commission employee → Wizard coordinator: uses wizard (evidence: `README.md`)
- Wizard coordinator → Select bolsín: renders step (evidence: `front/src/App.jsx`)
- Wizard coordinator → Review contents: renders step (evidence: `front/src/App.jsx`)
- Wizard coordinator → Choose outcome: renders step (evidence: `front/src/App.jsx`)
- Wizard coordinator → Mark documents: renders step (evidence: `front/src/App.jsx`)
- Wizard coordinator → Confirm and result: renders step (evidence: `front/src/App.jsx`)
- Wizard coordinator → REST client: requests data (evidence: `front/src/App.jsx`)
- REST client → REST boundary: calls REST API (evidence: `README.md`)
- REST boundary → Reception manager: delegates steps (evidence: `back/src/main/java/ppai/bolsines/pantalla/PantallaRegistroRecepcionBolsines.java`)
- Reception manager → JPA repositories: uses repositories (evidence: `back/src/main/java/ppai/bolsines/gestor/GestorRegistroRecepcionBolsines.java`)
- Reception manager → Bolsín aggregate: processes receipt (evidence: `back/src/main/java/ppai/bolsines/gestor/GestorRegistroRecepcionBolsines.java`)
- Bolsín aggregate → Remito and details: reads and updates (evidence: `back/src/main/java/ppai/bolsines/modelo/bolsin/Bolsin.java`)
- Remito and details → Document state machine: delegates transitions (evidence: `back/src/main/java/ppai/bolsines/modelo/remito/Remito.java`)
- JPA repositories → H2 database: persists entities (evidence: `README.md`)
- Reception manager → Receipt notification: prepares CU 29 (evidence: `back/src/main/java/ppai/bolsines/gestor/GestorRegistroRecepcionBolsines.java`)
- Log notifier → Receipt notification: logs notification (evidence: `back/src/main/java/ppai/bolsines/notificacion/NotificacionBolsinLog.java`)
- Log notifier → Backend console: writes log (evidence: `README.md`)
