ADR-001: Postgres + Redis instead of GCP Pub/Sub + BigQuery¶
Status: Accepted Source: prd.md §19
Context¶
The original research PDF that scoped this hackathon recommended a managed cloud streaming stack (GCP Pub/Sub for transport, BigQuery for analytical storage). Adopting that for the 2-day hackathon would have consumed Day 1 entirely on credentials, project setup, IAM, and dataset bootstrapping — none of which produce demo value.
Decision¶
Use local Postgres + Redis via Docker Compose. Postgres is the source of truth for issue sessions, claims, devices, widgets, the metric catalog, and the dashboard layout document. Redis carries the pubsub:dashboard channel that backs the WebSocket at /v1/dashboard/stream. The full stack starts with make up against the local docker daemon.
Consequences¶
- Faster setup. Demo can run on a laptop with no cloud account, no IAM, no quotas.
- No cloud spend. A non-trivial concern during a hackathon evaluating an unproven product story.
- Demo runs offline. No external dependency on managed-service availability during the live demo.
- Production migration path is documented in the pitch. ADR-V2-001 commits the production architecture to a Kafka + Databricks hybrid; the v1 ADR-001 was always a hackathon-scope decision, not a production commitment.
Cross-references¶
- Superseded for production by: ADR-V2-001 (proposed Kafka + Databricks evolution).
- Implementation: docker-compose.yml, db/init.sql.