Intel — Deployment Diagram ========================== Last updated: 2026-07-12 Two clouds: Render (user-facing app) and GCP (heavy ETL + datawarehouse). External APIs (Anthropic, ScrapeCreators, XPOZ, official X API, Apify, Gemini) are called from both. ┌──────────────────────────────────────────────────────────────────────────────┐ │ USERS │ │ (browsers — hamal-elections.co.il Google SSO only) │ └──────────────────────────────────────┬───────────────────────────────────────┘ │ HTTPS ▼ ┌──────────────────────────────────────────────────────────────────────────────┐ │ RENDER (PaaS) │ │ Workspace: Hamal-Elections │ ├──────────────────────────────────────────────────────────────────────────────┤ │ │ │ ┌──────────────────────────────┐ ┌────────────────────────────────┐ │ │ │ frontend-km4p │ │ backend-km4p │ │ │ │ (Static Site) │ │ (Web Service) │ │ │ │ │ │ │ │ │ │ React + Vite + Tailwind │◄──►│ FastAPI / async SQLAlchemy │ │ │ │ shadcn/ui, react-icons, │ │ /mcp (FastMCP), /cc (SSE) │ │ │ │ lucide-react │ │ ClaudeSDKClient sessions │ │ │ └──────────────────────────────┘ └────────────┬───────────────────┘ │ │ │ │ │ ┌──────────────────────────────┐ ▼ │ │ │ PostgreSQL (managed) │ ┌────────────────────────────────┐ │ │ │ │◄──┤ App DB connection │ │ │ │ poi, publisher_outlet, │ └────────────────────────────────┘ │ │ │ users, roles, sessions, │ │ │ │ domain_knowledge, briefs, │ │ │ │ post_alignment, … │ │ │ │ (Alembic-managed) │ │ │ └──────────────────────────────┘ │ │ │ └────────────────────────────────────────┬─────────────────────────────────────┘ │ Backend reads BQ via service account; reads/writes PG │ ▼ ┌──────────────────────────────────────────────────────────────────────────────┐ │ GOOGLE CLOUD (project intel-487218) │ │ Region: us-west1 │ ├──────────────────────────────────────────────────────────────────────────────┤ │ │ │ ┌────────────────────────────────────────────────────────────────────────┐ │ │ │ Cloud Scheduler │ │ │ │ collection-analysis-trigger ─► Workflow collection-analysis│ │ │ │ (daily 13:00 + Fri 05:00) │ │ │ │ events-pipeline-hourly-trigger ─► Workflow events-pipeline │ │ │ │ events-pipeline-daily-trigger ─► Workflow events-pipeline- │ │ │ │ daily (04:00) │ │ │ │ messaging-funnel-workflow-daily-trigger─► Workflow messaging-funnel │ │ │ │ messaging-brief-etl-daily-trigger ─► Job ingest-messaging-briefs│ │ │ │ ingest-tw-trigger ─► Job ingest-tw (hourly) │ │ │ │ pixel-ingest-daily-trigger ─► Job ingest-pixel (06:00) │ │ │ │ tohar-collection-trigger-morning ─► Workflow tohar-collection │ │ │ │ (08:00) │ │ │ │ tohar-collection-trigger-evening ─► Workflow tohar-collection │ │ │ │ (20:00) │ │ │ └────────────────────────────────────┬───────────────────────────────────┘ │ │ │ │ │ ▼ │ │ ┌────────────────────────────────────────────────────────────────────────┐ │ │ │ Cloud Workflows │ │ │ │ collection-analysis — daily ingest fan-out + analysis + │ │ │ │ events-pipeline + briefs │ │ │ │ events-pipeline — every 2h: mainstream-papers + events │ │ │ │ events-pipeline-daily — daily 04:00: events 7d rescore │ │ │ │ messaging-funnel-workflow — daily 07:30 IL: collection→fb→align │ │ │ │ tohar-collection — 08:00 & 20:00: X API + FB for col:3x │ │ │ │ POIs (ingest-x-api-tohar/-fb-tohar) │ │ │ └────────────────────────────────────┬───────────────────────────────────┘ │ │ │ │ │ ▼ │ │ ┌────────────────────────────────────────────────────────────────────────┐ │ │ │ Cloud Run Jobs (`etl` image) │ │ │ │ │ │ │ │ INGEST ANALYSIS │ │ │ │ ─ ingest-tw (Twitter/X, XPOZ) ─ analysis │ │ │ │ ─ ingest-ig (Instagram, XPOZ, ─ analysis-subjects │ │ │ │ sequential after tw) ─ events-pipeline │ │ │ │ ─ ingest-x-api (official X API, ─ events-pipeline-daily │ │ │ │ col:x-api/kashaviya POIs) ─ messaging-funnel-collection │ │ │ │ ─ ingest-tiktok (ScrapeCreators) ─ messaging-funnel-alignment │ │ │ │ ─ ingest-fb (ScrapeCreators) ─ ingest-messaging-briefs │ │ │ │ ─ ingest-fb-publishers ─ weekly-brief │ │ │ │ ─ ingest-gly (Galei Yisrael) ─ daily-brief │ │ │ │ ─ ingest-tv │ │ │ │ ─ ingest-online-papers │ │ │ │ ─ ingest-mainstream-papers (hourly, feeds events-pipeline) │ │ │ │ ─ ingest-kb │ │ │ │ ─ ingest-telegram │ │ │ │ ─ ingest-pixel (ScrapeCreators, daily 06:00 — disguised venues) │ │ │ │ ─ ingest-x-api-tohar + ingest-fb-tohar (col:3x POIs, 08:00 & 20:00, │ │ │ │ via the tohar-collection Cloud Workflow — not shown above) │ │ │ │ │ │ │ └─────────┬─────────────────────────────────┬────────────────────────────┘ │ │ │ writes │ reads/writes │ │ ▼ ▼ │ │ ┌──────────────────────────┐ ┌──────────────────────────────────────┐ │ │ │ BigQuery │ │ Secret Manager │ │ │ │ datawarehouse │ │ ─ scrapecreators-api-key │ │ │ │ │ │ ─ xpoz-mcp-tokens │ │ │ │ raw + analysis tables │ │ ─ x-bearer-token │ │ │ └──────────────────────────┘ │ ─ apify-api-key (FB-search only — │ │ │ │ pixel_discover / fb_coordination-│ │ │ │ _spike, ScrapeCreators has none) │ │ │ │ ─ database-url │ │ │ │ ─ slack-*-webhook-url(s) │ │ │ │ ─ anthropic-api-key │ │ │ │ ─ gemini-api-key │ │ │ └──────────────────────────────────────┘ │ │ │ │ ┌──────────────────────────┐ ┌──────────────────────────────────────┐ │ │ │ Cloud Build (us-west1) │───►│ Artifact Registry │ │ │ │ (auto on push to main) │ │ us-west1-docker.pkg.dev/.../etl │ │ │ └──────────────────────────┘ └──────────────────────────────────────┘ │ │ │ │ ┌──────────────────────────────────────────────────────────────────────┐ │ │ │ Service account: intel-service@intel-487218.iam │ │ │ │ Used by: Cloud Run Jobs, Workflows, Schedulers │ │ │ └──────────────────────────────────────────────────────────────────────┘ │ │ │ └──────────────────────────────────────────────────────────────────────────────┘ External APIs (called from Cloud Run Jobs and/or Render backend) ================================================================ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ ┌────────────────┐ │ Anthropic │ │ScrapeCreators│ │ XPOZ │ │ Gemini API │ │ (Claude API │ │ (TikTok + │ │ (Twitter/X │ │ (judge models, │ │ for /cc, │ │ Facebook + │ │ + IG live │ │ embeddings) │ │ summaries) │ │ Pixel) │ │ data) │ │ │ └──────────────┘ └──────────────┘ └──────────────┘ └────────────────┘ ┌──────────────┐ ┌──────────────┐ │ official X │ │ Apify │ │ API (col:x- │ │ (FB organic │ │ api/kashaviya│ │ search only │ │ /col:3x POIs)│ │ — pixel_ │ │ │ │ discover) │ └──────────────┘ └──────────────┘ ┌──────────────┐ │ Google Drive │ │ (TV files, │ │ KB files) │ └──────────────┘ CI/CD ===== GitHub (main) ──► Cloud Build trigger (us-west1) ──► Build `etl` Docker image │ ▼ Artifact Registry: etl: │ ▼ Cloud Run Job revisions (deployed via deploy_*.sh) Render auto-deploys frontend/backend on push to main. Key URLs (admin) ================ Render: https://dashboard.render.com (workspace: Hamal-Elections) GCP project: https://console.cloud.google.com/?project=intel-487218 Cloud Run Jobs: https://console.cloud.google.com/run/jobs?project=intel-487218 Workflows: https://console.cloud.google.com/workflows?project=intel-487218 Scheduler: https://console.cloud.google.com/cloudscheduler?project=intel-487218 BigQuery: https://console.cloud.google.com/bigquery?project=intel-487218