Gestiona grupos de email y asignación por escenario en BD (natur_reservas.notification_groups / notification_scenario_recipients) en lugar de variables de entorno hardcodeadas. Incluye pantalla de ajustes, endpoint admin protegido, envío de prueba y niveles reducida/completa. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
32 lines
1.4 KiB
Plaintext
32 lines
1.4 KiB
Plaintext
# ─────────────────────────────────────────────
|
|
# apps/api — Variables de entorno
|
|
# Copia este archivo como .env y rellena los valores.
|
|
# NUNCA expongas estas variables al frontend.
|
|
# ─────────────────────────────────────────────
|
|
|
|
# Servidor
|
|
API_PORT=3001
|
|
NODE_ENV=development
|
|
|
|
# Supabase (self-hosted) — usar service_role key (bypasea RLS)
|
|
SUPABASE_URL=https://tu-supabase.tudominio.com
|
|
SUPABASE_SERVICE_ROLE_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
|
|
|
|
# n8n — relé de email vía webhook (n8n se encarga de enviar por Gmail/SMTP)
|
|
# La URL es la del webhook configurado en el workflow de n8n.
|
|
N8N_EMAIL_WEBHOOK_URL=https://n8n.tudominio.com/webhook/naturcalabacera-email
|
|
EMAIL_FROM=Naturcalabacera <reservas@tudominio.com>
|
|
|
|
# Destinatarios de notificaciones (parametrizables)
|
|
# Teneriffa admite VARIOS correos separados por coma (correo reducido).
|
|
NOTIFICATION_EMAIL_TENERIFFA=uwe.dotschkis@teneriffa2000.de, j.reichstein@teneriffa2000.de
|
|
NOTIFICATION_EMAIL_NATUR=administracion@naturcalabacera.com # correo completo
|
|
NOTIFICATION_EMAIL_POOL_HEATING=jonathan@ejemplo.com # "Jonathan o las chicas"
|
|
|
|
# URL del frontend para CORS
|
|
WEB_ORIGIN=http://localhost:5173
|
|
|
|
# Jobs — runner de notificaciones
|
|
JOB_RUNNER_INTERVAL_MS=300000 # 5 minutos (300000ms)
|
|
JOB_MAX_RETRIES=3
|