How gambaazul/dermanube works
Purpose and Entry Points
DermaNube is a dermatology-management platform: patients search specialists, reserve/cancel appointments, and trigger asynchronous notifications and document generation. Local composition starts through docker-compose.yml; the browser entry is Aplicacion/Frontend/public/index.html. AWS provisioning and activation are orchestrated by Automatizacion/DesplegarBase.sh and Automatizacion/ActivarServicios.sh.
Web Presentation and API Boundary
The static frontend is served by Nginx locally and, in AWS, from private S3 through CloudFront and WAF. Browser behavior and runtime endpoint configuration reside in Aplicacion/Frontend/public/aplicacion.js and Aplicacion/Frontend/public/configuracion.js; Aplicacion/Frontend/nginx.conf defines the container web-server boundary. Authenticated API requests pass through Cognito and API Gateway, which reaches an internal ALB via VPC Link rather than exposing services directly.
Core Domain Services
Two Node.js microservices run as ECS Fargate tasks and expose the application API:
• People/specialist management, initial data, DynamoDB persistence, and OpenSearch search: Aplicacion/ServicioPersonas/src/Servidor.js, Aplicacion/ServicioPersonas/src/Aplicacion.js, Aplicacion/ServicioPersonas/src/RepositorioPersonas.js.
• Appointment reservation/cancellation, transaction-oriented persistence, availability cache, and event publication: Aplicacion/ServicioCitas/src/Servidor.js, Aplicacion/ServicioCitas/src/RepositorioCitas.js, Aplicacion/ServicioCitas/src/CacheHorarios.js.
Service registration/discovery is supplied through Cloud Map. Images are defined by each service Dockerfile, including Aplicacion/ServicioCitas/Dockerfile and Aplicacion/ServicioPersonas/Dockerfile.
Persistence, Cache, and Search
DynamoDB is the system-of-record for persons and appointments. Redis/ElastiCache caches appointment schedules, while OpenSearch supports specialist queries. The services isolate these dependencies behind repository/cache modules rather than frontend access. AWS data, network, encryption, and container resources are principally declared in Infraestructura/Terraform/Principal/Datos.tf, Infraestructura/Terraform/Principal/Red.tf, and Infraestructura/Terraform/Principal/Contenedores.tf.
Asynchronous Processing
Appointment activity publishes FIFO events through SNS to separate SQS-backed paths. Notification handling is implemented as a Python handler, Aplicacion/ProcesadorNotificaciones/Manejador.py, intended for AWS Lambda. Document events are consumed by the Kubernetes worker, whose execution and generation logic are in Aplicacion/TrabajadorDocumentos/src/Trabajador.js and Aplicacion/TrabajadorDocumentos/src/Documento.js; its EKS deployment is Infraestructura/Kubernetes/TrabajadorDocumentos.yml. Generated documents are written to S3.
Observability and Operations
Both ECS services and the EKS worker emit metrics and logs; service-level metric/registration code is represented by Aplicacion/ServicioCitas/src/Metricas.js and Aplicacion/ServicioPersonas/src/Registro.js. Prometheus collects metrics, Loki stores logs, Alloy forwards telemetry, and Grafana provides dashboards/alerts: Observabilidad/Prometheus/Prometheus.yml, Observabilidad/Loki/Loki.yml, and Observabilidad/Grafana/Tableros/ResumenDermaNube.json.
Delivery, Governance, and AWS Control Plane
GitHub Actions performs CI, quality/security checks, and image publication; Jenkins coordinates continuous deployment: .github/workflows/IntegracionContinua.yml and Jenkinsfile. Terraform creates AWS foundations including Cognito/API access, messaging, observability, secrets, audit, backup, and budgets under Infraestructura/Terraform/Principal/; Ansible configures the automation host via Infraestructura/Ansible/Playbooks/ConfigurarAutomatizacion.yml. Checkov and OPA policy enforcement are rooted in .checkov.yml and Politicas/Terraform/Seguridad.rego.
Main entry points: Servidor.js Appointments service · Aplicacion.js People service · Contenedores.tf Terraform AWS foundation · Trabajador.js Document worker
Components 21
Web edge
- Browser application · Patient search and appointment workflows.
Aplicacion/Frontend/public/aplicacion.js - Endpoint configuration
Aplicacion/Frontend/public/configuracion.js - Nginx / S3 delivery · Nginx locally; private S3, CloudFront, and WAF in AWS.
Aplicacion/Frontend/nginx.conf - Cognito + API Gateway · Authenticated requests reach the internal load balancer through VPC Link.
Core services
- Cloud Map
- People service · Manages people, specialists, and initial data.
Aplicacion/ServicioPersonas/src/Aplicacion.js - People repository
Aplicacion/ServicioPersonas/src/RepositorioPersonas.js - Appointments service · Reserves and cancels appointments and publishes activity.
Aplicacion/ServicioCitas/src/Servidor.js - Appointment repository
Aplicacion/ServicioCitas/src/RepositorioCitas.js - Schedule cache
Aplicacion/ServicioCitas/src/CacheHorarios.js - DynamoDB · Stores persons and appointments.
- OpenSearch · Specialist queries.
- ElastiCache Redis
Async processing
- SNS FIFO events · Fans appointment activity into notification and document paths.
- Notification handler
Aplicacion/ProcesadorNotificaciones/Manejador.py - Document worker · Consumes document events and generates documents.
Aplicacion/TrabajadorDocumentos/src/Trabajador.js - Document S3
Platform operations
- Prometheus, Loki, Grafana · Collects metrics and logs and provides dashboards and alerts.
Observabilidad/Prometheus/Prometheus.yml - CI/CD pipeline · Builds, checks, publishes images, and coordinates deployment.
.github/workflows/IntegracionContinua.yml - Terraform AWS foundation · Provisions network, containers, access, messaging, and platform controls.
Infraestructura/Terraform/Principal/Contenedores.tf - Policy controls · Enforces infrastructure security policy.
Politicas/Terraform/Seguridad.rego
Connections 25
- Endpoint configuration → Browser application: configures
- Nginx / S3 delivery → Browser application: serves
- Browser application → Cognito + API Gateway: authenticated API calls
- Cognito + API Gateway → People service: routes via VPC Link / ALB
- Cognito + API Gateway → Appointments service: routes via VPC Link / ALB
- Cloud Map → People service: registers
- Cloud Map → Appointments service: registers
- People service → People repository: uses
- People repository → DynamoDB: persists
- People service → OpenSearch: indexes and queries
- Appointments service → Appointment repository: uses
- Appointment repository → DynamoDB: persists
- Appointments service → Schedule cache: uses
- Schedule cache → ElastiCache Redis: caches in
- Appointments service → SNS FIFO events: publishes FIFO activity
- SNS FIFO events → Notification handler: notification queue path
- SNS FIFO events → Document worker: document queue path
- Document worker → Document S3: writes documents
- People service → Prometheus, Loki, Grafana: metrics and logs
- Appointments service → Prometheus, Loki, Grafana: metrics and logs
- Document worker → Prometheus, Loki, Grafana: metrics and logs
- CI/CD pipeline → Terraform AWS foundation: deploys infrastructure
- Policy controls → Terraform AWS foundation: validates
- Terraform AWS foundation → Cognito + API Gateway: provisions
- Terraform AWS foundation → Cloud Map: provisions