Commit Graph

41 Commits

Author SHA1 Message Date
4Ventures
501f8203e8 Replace BPS Excel stub with multi-client calendar template.
Official download now generates a blank workbook with catalog autofill, notas_internas ignored on import, and the same template for every tenant.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-08 17:38:38 +02:00
4Ventures
67969b12cb Add batch importer for Drive RRSS editorial calendars.
Import requested months for BPS, Brava, TYD, Halal, Noberplast and 4Ventures from the shared Excel export.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-08 16:43:07 +02:00
4Ventures
71110915af Ship CRM health, cohort CAC, GHL/Shopify sync, and agency alerts.
Add WooCommerce health monitoring, 60d cohort CAC in CRM and portfolio,
incremental GHL upsert, Shopify orders→deals, and daily health-alert cron.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-08 12:28:38 +02:00
4Ventures
4baf256750 Make Clientify CRM sync daily and reliable via incremental upsert.
Webhooks alone miss WooCommerce deals; replace wipe+cap sync with lookback upsert and a dedicated Dokploy cron.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-08 11:02:51 +02:00
4Ventures
e3fe157fa5 Harden per-client isolation for calendars, Meta, creatives, and KPIs.
Validate view-as tenants, scope service-role mutations by tenant_id, add documents RLS, refuse portfolio-wide data dumps, and block Meta publish when a Page/IG is linked to another client.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-07 15:57:21 +02:00
4Ventures
83de3fb3aa Fix calendar drag snap-back, IG filter, and default to 2026.
Prefer the latest year in the archive, normalize Instagram casing so stories show under IG/FB, sync pipeline dates on move, and stop stale plan re-renders from undoing a successful drag.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-07 15:29:49 +02:00
4Ventures
26dc411647 Harden scheduled Meta publish and auto-link Drive for pipeline creatives.
Schedule save auto-approves and publishes when due; cron recovers stale jobs every 5m. Drive sync auto-matches client folders under Clientes when not linked.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-07 13:33:41 +02:00
4Ventures
b4d86e1e28 Enable in-place pipeline edits with calendar sync and timed publish cron.
Agency can edit title/copy on existing cards (optional RRSS sync); Dokploy runs pipeline-publish every 10 minutes with daily-sync as backup.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-06 18:33:10 +02:00
4Ventures
c2bbbfcd06 Link pipeline creatives to RRSS calendar pieces with pick-or-create UI.
Agency can choose a scheduled calendar post to prefill title, copy, pillar and date, or create/edit one in the calendar while adding it to the pipeline.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-06 18:01:11 +02:00
4Ventures
12ecde1b3b Add agency-only schedule fields and queue for pipeline creatives.
Approved pieces can be timed for IG/FB from the agency board; cron queues due jobs and calendar uses scheduled_at. Meta publish comes next.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-06 17:54:00 +02:00
4Ventures
0ad89e88e5 Fix GoHighLevel opportunity pagination and contact dedupe.
GHL search rejects skip; page+location_id is required so nightly CRM sync can complete.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-06 12:06:27 +02:00
4Ventures
487e2c7a2b Add GoHighLevel CRM sync for tenant locations.
Warehouse leads/deals from GHL contacts and opportunities so Métricas and CRM can use the same scorecard as Clientify.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-06 11:57:02 +02:00
Marcos Fargas
2f6e50d5a7 feat(panel-cliente): soporte de filtrado mensual, histórico instagram ene-sep 2026 y enlaces a publicaciones 2026-10-04 19:31:11 +02:00
Claude
6566b42037 feat: script de carga para las 33 creatividades de Blue Parrot (oct26-ene27)
scripts/seed_blue_parrot_pipeline.ts sube portada + slides de carrusel al
bucket tenant-assets y crea/actualiza las filas en creative_pipeline
(upsert por tenant_id+external_ref, así se puede re-ejecutar sin duplicar).

Metadata en scripts/blue-parrot-pipeline-seed.json: títulos reales
extraídos de las 33 piezas ya diseñadas (oct-01..oct-12, nov-01..nov-07,
dic-01..dic-07, ene27-01..ene27-07). Estado inicial por defecto:
revision_interna (parametrizable con --status).

Requiere ejecutarse en el propio VPS (con las credenciales reales de
Supabase ya configuradas ahí) contra la carpeta descomprimida del ZIP de
imágenes — no incluye las imágenes ni credenciales en el repo.

Añade dotenv y tsx como devDependencies (ya usados por otros scripts del
repo pero no declarados en package.json).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WqGTGPznxTp8mwMg6Yv4Ew
2026-10-04 00:25:25 +02:00
4Ventures
1a58af129d chore: scripts Dokploy/BPS (cron secret, Ads MCC, sync y probes)
Incluye utilidades de ops para CRON_SECRET, login customer Google Ads, sync de seguimiento BPS y probes de conexiones.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-29 16:48:44 +02:00
4Ventures
8c5acb626f feat: columna ad_daily.link_clicks (Meta clics enlace reales)
Persistimos link_clicks en warehouse (con backfill desde __lc), sync escribe la columna y creatividades la leen sin romper si falta.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-29 10:50:55 +02:00
4Ventures
83e2b59e83 fix: MoM mes-en-curso al mes previo real y pipelines CRM históricos
El filtro Online se aplica por rango de fechas; backfill de pipelines para que agosto/YoY no queden en 4 ventas. MoM de «este mes» usa los mismos días del mes anterior.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-28 12:46:08 +02:00
4Ventures
062c43325d fix: ventas KPI = Online Clientify (89) y atribución por fuente real
Excluye Málaga del cohort; enriquece source desde lead/Clientify para que el cruce ads vs CRM deje de volcar todo en sin-atribuir.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-28 12:19:57 +02:00
4Ventures
48fb31d247 fix: alinear KPIs BPS al milímetro con Ads Manager y Clientify Online
Meta solo cuenta registration leads; Google guarda fracciones y redondea al sumar; ventas CRM usan pipeline Online con importe > 0.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-28 12:10:09 +02:00
4Ventures
cf27eba74d feat: KPIs con totales absolutos, backfill ads y ventas en cruce canal
Comparativas WoW/MoM/YoY muestran prev/Δ además del %; sync ads admite
histórico desde 2025; tabla ads↔CRM añade cierres, ventas y ROAS.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-28 10:23:36 +02:00
4Ventures
06024cf473 feat: auditoría SEO real con histórico y avisos
Crawl técnico (HTTPS/robots/sitemap/on-page) + tabla seo_audits; UI con nota, checks y alertas.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-24 16:55:58 +02:00
4Ventures
5c90bcf940 feat: vista Orgánico con SEO (GA4/GSC) y GEO (visibilidad IA)
Nueva sección con métricas Search Console/GA4, cimientos SEO y
Share of Model por motor (ChatGPT/Gemini/AI Overviews).

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-24 11:18:26 +02:00
4Ventures
dd0e867108 feat: ficha por cliente en portafolio (conexiones, accesos, logo, módulos)
Cada tenant tiene una ficha con plataformas, invitaciones por email,
logo de marca y toggles de módulos visibles en el portal cliente.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-24 10:51:21 +02:00
4Ventures
be45df300b feat: pestaña CRM con % a cliente por canal y cruce ads vs Clientify
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-23 17:33:41 +02:00
4Ventures
fba025da76 fix: mostrar Google Ads desde ad_daily cuando kpi_weekly está vacío
kpi_weekly es una MV de solo lectura sin canales paid; canal/seguimiento
ahora hacen fallback a ad_daily. Bump Google Ads API a v21 en sync.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-23 12:13:41 +02:00
4Ventures
a1a00840d5 feat: sync Meta metrics, objetivos ppto/consecución y simulador por tenant
Rellena ad_daily desde Meta, KPIs con fallback a daily, objetivos de presupuesto vs consecución, y simulador sin TikTok anclado a métricas del cliente.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-23 10:59:15 +02:00
4Ventures
0d286dc66c feat: upload creativos, PMax formats, portada IG/FB y seguimiento con notas
Permite subir media sin URL; previews Google PMax por ratio; calendario anual estilo Miia con filtros IG/FB y LinkedIn; seguimiento con selector de fechas, KPIs y cuadro de notas.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-23 09:33:22 +02:00
4Ventures
a7704567bd feat: preview de placement en pipeline de creatividades
Cada pieza muestra mock Meta/Google Ads o RRSS (feed, Stories, LinkedIn) como el Ad Tracker, con copy, media y canal editables.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-23 03:36:28 +02:00
4Ventures
a1a3c26c30 feat: dual agency/client approval on calendar and assets
Private RRSS calendar with unified + per-network tabs, comments, and
double-check OK. Assets get review drawer with preview/comments. KPIs
gain date presets, North Star strip, channel matrix and per-channel dash.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-23 02:38:44 +02:00
4Ventures
982a9e2954 chore: Dokploy helper to merge Superhuman Docs API key
Keeps existing portal env vars and triggers deploy after merge.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-22 21:41:58 +02:00
4Ventures
64156383ca feat: interactive seguimiento timeline and channel evolution
Sync Superhuman Docs seguimiento/KPI pages into the portal (never passwords)
and show clients a dynamic timeline plus per-channel kpi_weekly charts.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-22 21:34:21 +02:00
4Ventures
c4c527072f feat: agency control panel for per-client connections
Matrix view of Meta/Google/Drive/Clientify, follow/archive clients,
and per-channel ON/OFF with account IDs in the client hub.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-22 18:47:29 +02:00
4Ventures
1eb02dac4d feat: Google Drive agency sync with auto folder match
Connect marketing@ once, match Drive folders to tenants by name,
list Drive in Activos, and mirror portal uploads to the linked folder.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-22 16:27:54 +02:00
4Ventures
ce9498e63c feat: upload any validated file to the asset library
Activos now supports multi-file/folder upload to private Storage
(PDF, Excel, CSV, images, ZIP, etc.) with per-tenant folders.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-22 15:26:33 +02:00
4Ventures
791976a3d8 feat: agency portfolio with per-client integrations hub
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>
2026-09-22 01:31:47 +02:00
4Ventures
5d448c0e71 ops: apply Traefik office allowlist for git and n8n UIs
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-21 18:20:25 +02:00
4Ventures
73b3693eeb docs: record agent_runs RLS fix and Traefik IP candidate
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-21 18:16:44 +02:00
4Ventures
8315a8098f fix: stop baking Supabase anon key into the Docker image
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-21 18:07:04 +02:00
4Ventures
aa89df86a1 chore: ignore dokploy shots and add chat/traefik ops smokes
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-21 18:02:55 +02:00
4Ventures
3c741fa457 docs: refresh operator runbook and creatives copy after prod cutover
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-21 17:46:43 +02:00
4Ventures
2df3fe6983 fix(security): harden auth, tenant scoping, and scrub secrets
Require session on APIs, scope KPIs/activos/simulate to the user tenant, strip real JWTs from .env.example, and add health/smoke/docs for 4Ventures ops.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-21 10:51:46 +02:00