CineSpine runtime architecture

CineSpine runtime architecture An architecture diagram generated by Archify. Browser SPA · React, Faro, WebMCP · Architecture component Browser SPA React, Faro, WebMCP Grafana Cloud · OTLP + Faro · Architecture component · Grafana Grafana Cloud OTLP + Faro cinespine API · Cloud Run, FastAPI · GCP project cinespine / europe-west4 cinespine API Cloud Run, FastAPI spine.db · SQLite, source of truth · GCP project cinespine / europe-west4 spine.db SQLite, source of truth Spine replica bucket · Litestream WAL + snapshots · GCP project cinespine / europe-west4 › cinespine-run service account only · Google Cloud Spine replica bucket Litestream WAL + snapshots cinespine-mcp · mcp-clickhouse, scales to 0 · GCP project cinespine / europe-west4 cinespine-mcp mcp-clickhouse, scales to 0 ClickHouse Cloud · analytical mirror · Architecture component · ClickHouse ClickHouse Cloud analytical mirror Vertex AI Gemini · ADK agents, image models · GCP project cinespine / europe-west4 · Google Gemini Vertex AI Gemini ADK agents, image models Secret Manager · API keys, OTLP headers · GCP project cinespine / europe-west4 › cinespine-run service account only Secret Manager API keys, OTLP headers HTTPS /api + SSE SQLite writes first best-effort mirror insert Litestream WAL, 1 s MCP JSON-RPC read-only SQL Gemini generate_content env at deploy OTLP traces/metrics/logs Faro beacons GCP project cinespine / europe-west4 cinespine-run service account only

Primary path

  • • Browser calls same-origin /api on one Cloud Run instance; live updates return over SSE
  • • Every write lands in spine.db first; ClickHouse is a best-effort mirror

Trust boundaries

  • • The Cloud Run URL is public and unauthenticated; identity is a self-declared @handle
  • • Only the cinespine-run service account reads secrets and the replica bucket; ClickHouse and Grafana are external SaaS over TLS

Durability and agents

  • • max-instances=1 is an invariant: two Litestream writers corrupt the replica; a revision restores before uvicorn starts and never starts empty
  • • Wrap Rescue reaches ClickHouse only through cinespine-mcp; Gemini calls use a 4-model fallback router