Files
gob-alert/docs/ARCHITECTURE.md
alexandrump 82f3464565 first commit
2026-02-09 01:02:53 +01:00

30 lines
997 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Arquitectura (2 mini-PCs)
## Objetivo
Separar la ingesta/normalización del producto (API + dashboard) para reducir carga y permitir escalado gradual.
## Mini-PC 1 — Ingesta y procesamiento
- **Servicios**: workers de ingesta, normalizadores, colas ligeras.
- **Responsabilidad**: consultar datos.gob.es, normalizar y guardar en Postgres.
- **Componentes clave**:
- Scheduler de ingesta (`INGEST_CRON`)
- Bull + Redis (opcional)
- Normalizador y clasificador
## Mini-PC 2 — Producto y entrega
- **Servicios**: API Nest, Nuxt dashboard, alertas Telegram/SMTP, backups.
- **Responsabilidad**: servir datos, dashboards y notificaciones.
- **Componentes clave**:
- API `apps/api`
- Dashboard `apps/web`
- Scheduler alertas (`ALERTS_CRON`) y backups (`BACKUP_CRON`)
## Comunicación
- API HTTP/REST entre servicios.
- Redis opcional si se utiliza colas de ingestión.
## Datos
- Postgres centralizado (en MiniPC 1 o 2 según recursos).
- Backups periódicos en `BACKUP_DIR`.