# najhelybs/vacunacioncard-avance1 architecture

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

- Interactive diagram: https://gitdiagram.com/najhelybs/vacunacioncard-avance1
- Repository: https://github.com/najhelybs/vacunacioncard-avance1

## Overview

1. This is a Java/Spring Boot monolith for a “Sistema de Cartilla Digital de Vacunación” (digital vaccination record system). The entry point is `VacunacioncardApplication.java`, with Maven (`pom.xml`, Maven wrapper) handling build and dependency management.

2. The repository is currently structured as a layered application, but only the domain model is populated. The `controller`, `service`, `service/impl`, `repository`, and `config` packages exist as placeholders (`.gitkeep`), which means the architecture is intended to grow into a standard presentation–service–persistence stack.

3. The core of the system is the `domain` package, which is split by business capability rather than by technical layer. The major bounded contexts are:
   - `usuario` for people using the system
   - `auth` for account and access control concepts
   - `vacunacion` for vaccines, records, and schedules
   - `cita` for appointments
   - `campania` for vaccination campaigns and centers
   - `salud` for medical conditions and contraindications
   - `notificacion` for reminders and system alerts
   - `comun` for shared value objects and audit data

4. The user model appears central. `Usuario` is the base concept, with specialized roles/entities such as `Paciente`, `Enfermero`, and `Administrador`. `SeguroMedico` suggests patient insurance data is part of the domain, likely attached to or associated with a patient profile.

5. Access control is separated into its own domain slice. `CuentaUsuario`, `Rol`, `Permiso`, and `SesionUsuario` imply authentication/authorization and session tracking are modeled explicitly rather than embedded in generic user records.

6. The vaccination workflow is represented by several linked entities: `Vacuna`, `EsquemaVacunacion`, `CartillaVacunacion`, `RegistroVacuna`, `AplicacionDosis`, `UbicacionAplicacion`, and `Laboratorio`. Together these indicate the system tracks vaccine definitions, schedules, administered doses, where doses were applied, and the resulting patient vaccination card/history.

7. Appointment and campaign management are distinct subsystems. `CitaVacunacion` and `Horario` model booking and availability, while `CampaniaVacunacion` and `CentroVacunacion` model organized vaccination campaigns and physical sites. This suggests workflows for both individual appointments and broader public-health campaigns.

8. Clinical safety is modeled separately from vaccination records. `Alergia`, `CondicionMedica`, and `Contraindicacion` indicate pre-vaccination screening or eligibility checks are part of the domain, likely used before scheduling or administering doses.

9. Notification and audit concerns are isolated into their own packages. `Notificacion`, `NotificacionRecordatorio`, and `NotificacionSistema` cover patient/system messaging, while `RegistroAuditoria` captures traceability. This implies side effects such as reminders and compliance logging are treated as cross-cutting business features.

10. The `comun` package contains shared primitives/value objects like `Calendario`, `Contacto`, and `Direccion`, which are likely reused across users, centers, appointments, and campaigns. This is the main shared boundary to avoid duplicating address/contact/time concepts across the model.

11. There is no visible persistence or API implementation yet. Because the repository and service packages are empty, a diagram should show the intended flow rather than an implemented one: external client/UI would call controllers, controllers would delegate to services, services would operate on domain entities and repositories, and repositories would persist to a database.

12. Configuration is minimal at the moment. `application.properties` exists, but no concrete infrastructure classes are present, so current runtime behavior is basically the Spring Boot application shell plus the domain model. The test package contains only the default application startup test, reinforcing that the repo is still in an initial scaffolding phase.

Main entry points: [`src/main/java/pe/utp/edu/vacunacioncard/controller/.gitkeep`](https://github.com/najhelybs/vacunacioncard-avance1/blob/main/src/main/java/pe/utp/edu/vacunacioncard/controller/.gitkeep) (Controllers), [`src/main/java/pe/utp/edu/vacunacioncard/service/.gitkeep`](https://github.com/najhelybs/vacunacioncard-avance1/blob/main/src/main/java/pe/utp/edu/vacunacioncard/service/.gitkeep) (Services), [`src/main/java/pe/utp/edu/vacunacioncard/domain/comun/Contacto.java`](https://github.com/najhelybs/vacunacioncard-avance1/blob/main/src/main/java/pe/utp/edu/vacunacioncard/domain/comun/Contacto.java) (Común), [`src/main/java/pe/utp/edu/vacunacioncard/VacunacioncardApplication.java`](https://github.com/najhelybs/vacunacioncard-avance1/blob/main/src/main/java/pe/utp/edu/vacunacioncard/VacunacioncardApplication.java) (VacunacioncardApplication)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Runtime"]
  node_app["VacunacioncardApplication<br/>spring boot entrypoint"]
  node_controller["Controllers<br/>api layer placeholder<br/>[.gitkeep]"]
  node_service["Services<br/>service layer placeholder<br/>[.gitkeep]"]
  node_service_impl["Service Impl<br/>[.gitkeep]"]
  node_repository[("Repositories<br/>persistence layer placeholder<br/>[.gitkeep]")]
end

subgraph group_domain["Domain"]
  node_usuario(("Usuario<br/>people core<br/>[Usuario.java]"))
  node_auth(("Acceso<br/>auth domain<br/>[CuentaUsuario.java]"))
  node_vacunacion(("Vacunación<br/>vaccination domain<br/>[Vacuna.java]"))
  node_cita(("Citas<br/>appointment domain"))
  node_campania(("Campañas<br/>campaign domain"))
  node_salud(("Salud<br/>clinical screening"))
  node_notificacion(("Notificaciones<br/>messaging domain<br/>[Notificacion.java]"))
  node_comun(("Común<br/>shared value objects<br/>[Contacto.java]"))
end

subgraph group_infrastructure["Infrastructure"]
  node_build["Maven Build<br/>build tooling<br/>[pom.xml]"]
  node_app_props["Config File<br/>runtime config"]
end

node_build -->|"builds"| node_app
node_app -->|"starts"| node_controller
node_controller -->|"delegates"| node_service
node_service -->|"implements"| node_service_impl
node_service_impl -->|"persists via"| node_repository
node_controller -.->|"manages"| node_usuario
node_controller -.->|"manages"| node_vacunacion
node_controller -.->|"manages"| node_cita
node_controller -.->|"manages"| node_campania
node_controller -.->|"manages"| node_notificacion
node_service -.->|"coordinates"| node_auth
node_service -.->|"coordinates"| node_salud
node_vacunacion -->|"belongs to"| node_usuario
node_vacunacion -.->|"uses"| node_campania
node_cita -.->|"uses"| node_comun
node_campania -.->|"uses"| node_comun
node_usuario -.->|"uses"| node_comun
node_notificacion -.->|"uses"| node_comun
node_app -.->|"configures"| node_app_props

click node_app "https://github.com/najhelybs/vacunacioncard-avance1/blob/main/src/main/java/pe/utp/edu/vacunacioncard/VacunacioncardApplication.java"
click node_controller "https://github.com/najhelybs/vacunacioncard-avance1/blob/main/src/main/java/pe/utp/edu/vacunacioncard/controller/.gitkeep"
click node_service "https://github.com/najhelybs/vacunacioncard-avance1/blob/main/src/main/java/pe/utp/edu/vacunacioncard/service/.gitkeep"
click node_service_impl "https://github.com/najhelybs/vacunacioncard-avance1/blob/main/src/main/java/pe/utp/edu/vacunacioncard/service/impl/.gitkeep"
click node_repository "https://github.com/najhelybs/vacunacioncard-avance1/blob/main/src/main/java/pe/utp/edu/vacunacioncard/repository/.gitkeep"
click node_usuario "https://github.com/najhelybs/vacunacioncard-avance1/blob/main/src/main/java/pe/utp/edu/vacunacioncard/domain/usuario/Usuario.java"
click node_auth "https://github.com/najhelybs/vacunacioncard-avance1/blob/main/src/main/java/pe/utp/edu/vacunacioncard/domain/auth/CuentaUsuario.java"
click node_vacunacion "https://github.com/najhelybs/vacunacioncard-avance1/blob/main/src/main/java/pe/utp/edu/vacunacioncard/domain/vacunacion/Vacuna.java"
click node_cita "https://github.com/najhelybs/vacunacioncard-avance1/blob/main/src/main/java/pe/utp/edu/vacunacioncard/domain/cita/CitaVacunacion.java"
click node_campania "https://github.com/najhelybs/vacunacioncard-avance1/blob/main/src/main/java/pe/utp/edu/vacunacioncard/domain/campania/CampaniaVacunacion.java"
click node_salud "https://github.com/najhelybs/vacunacioncard-avance1/blob/main/src/main/java/pe/utp/edu/vacunacioncard/domain/salud/Contraindicacion.java"
click node_notificacion "https://github.com/najhelybs/vacunacioncard-avance1/blob/main/src/main/java/pe/utp/edu/vacunacioncard/domain/notificacion/Notificacion.java"
click node_comun "https://github.com/najhelybs/vacunacioncard-avance1/blob/main/src/main/java/pe/utp/edu/vacunacioncard/domain/comun/Contacto.java"
click node_build "https://github.com/najhelybs/vacunacioncard-avance1/blob/main/pom.xml"
click node_app_props "https://github.com/najhelybs/vacunacioncard-avance1/blob/main/src/main/resources/application.properties"

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_controller,node_service,node_service_impl,node_repository toneBlue
class node_usuario,node_auth,node_vacunacion,node_cita,node_campania,node_salud,node_notificacion,node_comun toneAmber
class node_build,node_app_props toneMint
```

## Components

### Runtime

Spring Boot application shell and intended request flow

- [VacunacioncardApplication](https://github.com/najhelybs/vacunacioncard-avance1/blob/main/src/main/java/pe/utp/edu/vacunacioncard/VacunacioncardApplication.java): spring boot entrypoint · Application bootstrap · `src/main/java/pe/utp/edu/vacunacioncard/VacunacioncardApplication.java`
- [Controllers](https://github.com/najhelybs/vacunacioncard-avance1/blob/main/src/main/java/pe/utp/edu/vacunacioncard/controller/.gitkeep): api layer placeholder · Presentation layer intended for incoming requests · `src/main/java/pe/utp/edu/vacunacioncard/controller/.gitkeep`
- [Services](https://github.com/najhelybs/vacunacioncard-avance1/blob/main/src/main/java/pe/utp/edu/vacunacioncard/service/.gitkeep): service layer placeholder · Business orchestration layer placeholder · `src/main/java/pe/utp/edu/vacunacioncard/service/.gitkeep`
- [Service Impl](https://github.com/najhelybs/vacunacioncard-avance1/blob/main/src/main/java/pe/utp/edu/vacunacioncard/service/impl/.gitkeep): service impl placeholder · Concrete service implementations placeholder · `src/main/java/pe/utp/edu/vacunacioncard/service/impl/.gitkeep`
- [Repositories](https://github.com/najhelybs/vacunacioncard-avance1/blob/main/src/main/java/pe/utp/edu/vacunacioncard/repository/.gitkeep): persistence layer placeholder · Persistence abstraction placeholder · `src/main/java/pe/utp/edu/vacunacioncard/repository/.gitkeep`

### Domain

Business capabilities modeled in the monolith

- [Usuario](https://github.com/najhelybs/vacunacioncard-avance1/blob/main/src/main/java/pe/utp/edu/vacunacioncard/domain/usuario/Usuario.java): people core · Base user model and roles · `src/main/java/pe/utp/edu/vacunacioncard/domain/usuario/Usuario.java`
- [Acceso](https://github.com/najhelybs/vacunacioncard-avance1/blob/main/src/main/java/pe/utp/edu/vacunacioncard/domain/auth/CuentaUsuario.java): auth domain · Accounts, roles, permissions, sessions · `src/main/java/pe/utp/edu/vacunacioncard/domain/auth/CuentaUsuario.java`
- [Vacunación](https://github.com/najhelybs/vacunacioncard-avance1/blob/main/src/main/java/pe/utp/edu/vacunacioncard/domain/vacunacion/Vacuna.java): vaccination domain · Vaccines, schedules, cards and dose tracking · `src/main/java/pe/utp/edu/vacunacioncard/domain/vacunacion/Vacuna.java`
- [Citas](https://github.com/najhelybs/vacunacioncard-avance1/blob/main/src/main/java/pe/utp/edu/vacunacioncard/domain/cita/CitaVacunacion.java): appointment domain · Appointments and availability · `src/main/java/pe/utp/edu/vacunacioncard/domain/cita/CitaVacunacion.java`
- [Campañas](https://github.com/najhelybs/vacunacioncard-avance1/blob/main/src/main/java/pe/utp/edu/vacunacioncard/domain/campania/CampaniaVacunacion.java): campaign domain · Vaccination campaigns and sites · `src/main/java/pe/utp/edu/vacunacioncard/domain/campania/CampaniaVacunacion.java`
- [Salud](https://github.com/najhelybs/vacunacioncard-avance1/blob/main/src/main/java/pe/utp/edu/vacunacioncard/domain/salud/Contraindicacion.java): clinical screening · Conditions, allergies and contraindications · `src/main/java/pe/utp/edu/vacunacioncard/domain/salud/Contraindicacion.java`
- [Notificaciones](https://github.com/najhelybs/vacunacioncard-avance1/blob/main/src/main/java/pe/utp/edu/vacunacioncard/domain/notificacion/Notificacion.java): messaging domain · Reminders and system alerts · `src/main/java/pe/utp/edu/vacunacioncard/domain/notificacion/Notificacion.java`
- [Común](https://github.com/najhelybs/vacunacioncard-avance1/blob/main/src/main/java/pe/utp/edu/vacunacioncard/domain/comun/Contacto.java): shared value objects · Shared contact, address, calendar and audit concepts · `src/main/java/pe/utp/edu/vacunacioncard/domain/comun/Contacto.java`

### Infrastructure

Build and persistence scaffolding

- [Maven Build](https://github.com/najhelybs/vacunacioncard-avance1/blob/main/pom.xml): build tooling · Dependency and lifecycle management · `pom.xml`
- [Config File](https://github.com/najhelybs/vacunacioncard-avance1/blob/main/src/main/resources/application.properties): runtime config · Spring application properties · `src/main/resources/application.properties`

## Connections

- Maven Build → VacunacioncardApplication: builds · Maven compiles and packages the Spring Boot application
- VacunacioncardApplication → Controllers: starts · Application context hosts the web entry layer
- Controllers → Services: delegates · Controllers are intended to call application services
- Services → Service Impl: implements · Service contracts are expected to be realized by implementation classes
- Service Impl → Repositories: persists via · Services are expected to use repositories for storage access
- Controllers → Usuario: manages · User-facing flows center on patient and staff data
- Controllers → Vacunación: manages · Requests around vaccines, cards and dose history
- Controllers → Citas: manages · Appointment booking and availability flows
- Controllers → Campañas: manages · Campaign and site management flows
- Controllers → Notificaciones: manages · Reminder and alert flows
- Services → Acceso: coordinates · Access control is a separate business slice
- Services → Salud: coordinates · Eligibility and contraindication checks
- Vacunación → Usuario: belongs to · Vaccination records are anchored on the user/patient model
- Vacunación → Campañas: uses · Vaccination activity may occur through campaigns and sites
- Citas → Común: uses · Schedules and time/address primitives come from shared concepts
- Campañas → Común: uses · Campaigns and centers reuse shared contact/address data
- Usuario → Común: uses · People models reuse shared contact and address value objects
- Notificaciones → Común: uses · Notifications and audit traces share common primitives
- VacunacioncardApplication → Config File: configures · Application startup is driven by Spring properties
