Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ The dashboard also includes:

- **Gemini Live (gemini-3.8-live)** powers Mia in real time: she hears the caller, sees camera frames and uses 12 function-calling tools to turn food codes into structured danger, coercion, address and route fields.
- **Gemini Flash-Lite** writes the case summary and dispatch bulletin, redacts third-party details and links related cases.
- **Cloud Firestore** streams every field, GPS point, transcript line and responder message to the dashboard as it happens, with no backend server.
- **Cloud Firestore** streams every field, GPS point, transcript line and responder message to the dashboard as it happens, through Firebase's managed backend.
- **Firebase** Hosting serves the web app, dashboard and website; **Firebase Auth** secures responders with role-based access.
- **Next:** Gemini keys server-side and ADK dispatch and verification agents on **Cloud Run**.

Expand Down
2 changes: 1 addition & 1 deletion covert_call/CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Always read `../status/person_b_jeevan.md` and `../status/person_a_ameen.md` bef

**`docs/quickbite_diagrams.html`** — a saved, version-controlled copy of the visual reference (mock UI screens, Monitoring Dashboard mockup, user flow diagram, architecture diagram). Open it directly in a browser (no server needed) to view. Canonical source of truth for the diagrams is the plan/backlog docs — this file is a visual companion, kept in sync manually when the plan changes meaningfully. Live version (may drift ahead of this saved copy): https://claude.ai/artifact/WdmyUMRKkDarV3vV8pAWb2

**`docs/architecture/`** — the code-verified architecture of the deployed system (README with Mermaid, interactive HTML, slide image), drawn from `main` @ 3893f4e on 2026-10-09. Where it disagrees with the architecture tab of `quickbite_diagrams.html` or the "Tech stack quick reference" below (no backend, no websocket server, no Cloud Run, Leaflet/OSM maps), the architecture folder is correct.
**`docs/architecture/`** — the code-verified architecture of the deployed system (README with Mermaid, interactive HTML, slide image), drawn from `main` @ 3893f4e on 2026-10-09. Where it disagrees with the architecture tab of `quickbite_diagrams.html` or the "Tech stack quick reference" below (a separate backend, websocket server and Cloud Run; the deployed system is managed Firebase with Leaflet/OSM maps), the architecture folder is correct.

## What QuickBite is, in one paragraph
A food-delivery-disguised web/mobile app. A person under coercion or observation uses it to covertly summon help. Gemini Live API plays a restaurant-employee persona in a live call, teaching every coded question's real meaning live in the same breath it's asked (zero prior memorization required — this rule has no exceptions). A silent tap-only mode (long-press reveals meaning) covers no-connectivity/no-safe-sound cases. Structured incident data streams to a responder dashboard live, field-by-field, starting the instant the call begins — not batched until it ends.
Expand Down
6 changes: 3 additions & 3 deletions covert_call/docs/architecture/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# QuickBite architecture

QuickBite has no backend server. The phone talks to Gemini Live directly, runs every tool call itself and writes each result to Cloud Firestore. The responder console listens to Firestore, so a fact Mia hears appears on the console within seconds. Recordings, mail, maps and live video use free services around that core.
QuickBite runs on a managed Firebase backend (Cloud Firestore, Auth and security rules). The phone talks to Gemini Live directly, runs every tool call itself and writes each result to Cloud Firestore. The responder console listens to Firestore, so a fact Mia hears appears on the console within seconds. Recordings, mail, maps and live video use free services around that core.

![QuickBite system overview](quickbite-architecture-slide.png)

Expand All @@ -13,7 +13,7 @@ This page shows the system that is deployed today.

## 1. System overview

Four groups do all the work: the caller's phone, the Gemini API, Firebase, and the responder console. The phone is the only component that talks to Gemini Live, and Firestore's realtime listeners replace a server between the phone and the console. The numbers on the arrows match the overview picture.
Four groups do all the work: the caller's phone, the Gemini API, Firebase, and the responder console. The phone is the only component that talks to Gemini Live, and Firestore's realtime listeners carry data between the phone and the console. The numbers on the arrows match the overview picture.

```mermaid
flowchart LR
Expand Down Expand Up @@ -168,7 +168,7 @@ Reconnects are capped at 3 per drop and 8 per call. Each task uses the smallest

## 4. Data and security

Firestore is both the database and the realtime channel. Its security rules (`covert_call/dashboard/firestore.rules`) do the job a server would: every write is checked against a fixed schema and the allowed transitions.
Firestore is both the database and the realtime channel. Its security rules (`covert_call/dashboard/firestore.rules`) act as the backend's validation layer: every write is checked against a fixed schema and the allowed transitions.

```mermaid
flowchart TB
Expand Down
Binary file modified covert_call/docs/architecture/quickbite-architecture-slide.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 7 additions & 7 deletions covert_call/docs/architecture/quickbite-architecture.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion covert_call/docs/quickbite_plan.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ User's explicit requirement: both of the following are wanted, and **neither is

#### Sub-goal A — live video streamed to the Monitoring Dashboard, like a video call
- A responder watches **continuous, real-time video** on the dashboard during an active QuickBite call, not just text signal or periodic stills.
- **Decided during build (2026-09-24): free peer-to-peer WebRTC with Firestore as the signaling channel** instead of a managed service like LiveKit. Managed services need a server to mint access tokens, which needs GCP billing; the P2P route needs no server and no billing. Trade-off: no TURN relay, so a few very strict networks can fail to connect (the dashboard shows a clear retry state). Code: `shared/video/` (publisher for the QuickBite app), dashboard viewer on the incident page and `/incident/:id/video`.
- **Decided during build (2026-09-24): free peer-to-peer WebRTC with Firestore as the signaling channel** instead of a managed service like LiveKit. Managed services need a server to mint access tokens, which needs GCP billing; the P2P route needs no token server and no billing. Trade-off: no TURN relay, so a few very strict networks can fail to connect (the dashboard shows a clear retry state). Code: `shared/video/` (publisher for the QuickBite app), dashboard viewer on the incident page and `/incident/:id/video`.
- **This is architecturally a video-calling problem (WebRTC-class), separate from anything Gemini does** — needs its own infrastructure: a signaling/session layer and peer connection handling (e.g. via a managed service like LiveKit or a comparable WebRTC provider, rather than building a signaling server from scratch in 4 weeks) delivering the back-camera feed to the dashboard's incident detail view as an embedded live video player.
- **Genuinely new infrastructure, not a reuse of anything already planned** — this is the single biggest addition to the stretch-goal tier. Budget real time for it if attempted; don't assume it's a small add-on.
- Independent of Gemini entirely — this can ship even if the analysis sub-goal below is never built.
Expand Down
Binary file modified deck/QuickBite_Submission_Deck_NexMind_v2.pptx
Binary file not shown.
14 changes: 14 additions & 0 deletions status/person_b_jeevan.md
Original file line number Diff line number Diff line change
Expand Up @@ -778,3 +778,17 @@ Reviewed the last 7 real calls (INC-MUXX7G18 … INC-MUXZB4IH):
- The deck says "Maps JS"; the console's maps are Leaflet + OpenStreetMap tiles (Google Maps only if a key is set).
- The landing Privacy page and `README.md` say only signed-in responders can view incidents; `firestore.rules` allows open reads of incidents, messages, camera snaps and the WebRTC handshake.
- The console's "AI recommends" and the report email's "AI reasoning" come from the severity rules in `shared/incidents/severity.ts`, not from Gemini.

### 2026-10-09 22:31 IST: deck slides 7 and 8 rebuilt as native shapes (done from Ameen's side)
- `deck/QuickBite_Submission_Deck_NexMind_v2.pptx`, slides 7 and 8 only. The template frame (bands, title, takeaway style) is untouched and no images are used: every block, arrow and label is an editable PowerPoint shape.
- **Slide 7 (architecture):** the deployed system as in `covert_call/docs/architecture/`: caller's phone, Gemini API (3.8-live, 3.5 and 3.1 Flash-Lite), Firestore + Auth/rules, responder console, plus location, Drive recordings, case report + alerts mail, and P2P live video. No App Check, BigQuery, Android or Cloud Run boxes. **Jeevan:** this answers your slide 7 comment ("big query onnum illannu"); the comment is still on the slide for you to resolve.
- **Slide 8 (how Gemini powers QuickBite):** new takeaway "Not a chatbot: every answer becomes a function call that the app turns into live data". One answer followed end to end ("garlic bread" → `report_situation` → rule-based HIGH + route → console 2–3.5 s ahead of the transcript → known facts back to Mia), the 12 tools grouped by what they do, and four reliability points.
- Speaker notes for slides 7 and 8 rewritten to match (they no longer mention Firebase AI Logic / App Check).
- Checked: the skill's validator shows no new errors (only the existing duplicate comment-author ID in another slide's comment), and python-pptx opens the deck. There is no LibreOffice here, so the visual check used a preview drawn from the same shape geometry; please open both slides in PowerPoint or Google Slides once.
- 2026-10-09 22:44 IST: slide 7 now has a clickable "Full architecture docs on GitHub →" link (below the footer line) to https://github.com/Jeevanvsan/ai_builder_hack/tree/main/covert_call/docs/architecture#readme, also in the speaker notes. That URL points at `main`, so it only works once the `docs/architecture-diagrams` branch is merged.
- Not committed.

### 2026-10-12 IST: removed "no backend server" wording (done from Ameen's side)
- Reworded to present Firebase (Firestore, Auth, security rules) as the managed backend, in `README.md`, `covert_call/docs/architecture/` (README, HTML, slide SVG), `covert_call/CLAUDE.md`, `covert_call/docs/quickbite_plan.md`, and deck v2 slide 7 + its speaker notes. Facts unchanged; only the framing.
- `quickbite-architecture-slide.png` re-exported from the updated SVG (4800x1980). Developer code comments saying "no backend needed" were left as they are.
- Not committed.
Loading