first commit
This commit is contained in:
29
docs/ARCHITECTURE.md
Normal file
29
docs/ARCHITECTURE.md
Normal file
@@ -0,0 +1,29 @@
|
||||
# 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 Mini‑PC 1 o 2 según recursos).
|
||||
- Backups periódicos en `BACKUP_DIR`.
|
||||
|
||||
Reference in New Issue
Block a user