Admin home lists tenants, alerts, and connection health; header selector enables superadmin context; Meta/GA4/GSC/GTM/CRM/email slots live per tenant (manual status until OAuth). Co-authored-by: Cursor <cursoragent@cursor.com>
2.1 KiB
2.1 KiB
Runbook — Centro de Mando 4Ventures
Operador: marketing@4ventures.es
Credenciales locales (gitignored): .ops/marketing-credentials.txt
Health
curl -sf https://app.4ventures.es/api/health
# expect: serviceRoleConfigured true
./scripts/smoke.sh https://app.4ventures.es
python3 scripts/smoke_operator_login.py
python3 scripts/smoke_chat_auth.py
Deploy (Dokploy)
- Push a
mainen GiteaMarketing/4ventures-client-portal. - Dokploy → Web4Ventures / production / client-portal → Deploy
(id internoweb4ventures-clientportal-jntjhs). - Environment (runtime + build via “Create Environment File”):
NEXT_PUBLIC_SUPABASE_URLNEXT_PUBLIC_SUPABASE_ANON_KEYSUPABASE_SERVICE_ROLE_KEYANTHROPIC_API_KEY(opcional, LLM)
- Traefik:
portal.yml→http://web4ventures-clientportal-jntjhs:3000 - Smoke:
/login→ KPIs → creatividades → chat.
Portafolio agencia (admin)
- Login
marketing@→ redirige a/dashboard/agencia. - Cabecera Contexto: selector de cliente (modo superadmin) o vista global.
- Tarjetas de portafolio: salud de integraciones + Entrar / Integraciones.
- Ficha
/dashboard/agencia/cliente/[id]: Meta, Google Ads, GA4, GSC, GTM, Clientify, Klaviyo, Mailchimp (estado manual por ahora). - SQL:
sql/agency_portfolio.sql(tablasintegrations+agency_alerts).
OAuth live Meta/MCC/GA4 = siguiente fase; el esqueleto ya escala por tenant.
Atribución
<script src="https://app.4ventures.es/_4v_attr.js" defer></script>
POST https://n8n-agencia.4ventures.es/webhook/lead-inbound
Endurecer git / n8n
Aplicado 2026-09-21: IP allowlist 90.161.248.78/32 en UI de git + n8n; webhooks /webhook abiertos.
Detalle / revert: .ops/HARDEN_SURFACES.md. Re-aplicar: python3 scripts/dokploy_apply_traefik_harden.py.
app.4ventures.es y Dokploy sin allowlist.
Rotación JWT Supabase
Claves nuevas en .ops/supabase_rotated.env (gitignored). Aplicar requiere recrear el stack Supabase (ver SECURITY.md).
Incidentes
Ver SECURITY.md.