diff --git a/README.md b/README.md index b67f3b7..b68c674 100644 --- a/README.md +++ b/README.md @@ -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**. diff --git a/covert_call/CLAUDE.md b/covert_call/CLAUDE.md index 3a8ea77..b83de80 100644 --- a/covert_call/CLAUDE.md +++ b/covert_call/CLAUDE.md @@ -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. diff --git a/covert_call/docs/architecture/README.md b/covert_call/docs/architecture/README.md index 24b98b0..2916849 100644 --- a/covert_call/docs/architecture/README.md +++ b/covert_call/docs/architecture/README.md @@ -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) @@ -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 @@ -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 diff --git a/covert_call/docs/architecture/quickbite-architecture-slide.png b/covert_call/docs/architecture/quickbite-architecture-slide.png index 51cafbb..e0b48b0 100644 Binary files a/covert_call/docs/architecture/quickbite-architecture-slide.png and b/covert_call/docs/architecture/quickbite-architecture-slide.png differ diff --git a/covert_call/docs/architecture/quickbite-architecture-slide.svg b/covert_call/docs/architecture/quickbite-architecture-slide.svg index c6da02e..d9dbd05 100644 --- a/covert_call/docs/architecture/quickbite-architecture-slide.svg +++ b/covert_call/docs/architecture/quickbite-architecture-slide.svg @@ -1 +1 @@ -CALLER'S PHONEGOOGLE AI · GEMINI APIFIREBASE · REALTIME DATARESPONDERSQuickBite web appReact + Vite · Firebase HostingOpens in the phone browser,nothing to installFour hidden ways inCall to order · Click & orderDelivery instructions · Heart SOSEvery tool call runs hereseverity rules · geocode · routeWebRTC · recorders · key poolgemini-3.8-liveMia, the live voice agent:hears, sees, calls 12 tools+ the silent SOS observergemini-3.5-flash-litesummary, bulletin, redactiongemini-3.1-flash-litevision, case linking, console AICloud Firestoreasia-south1 · one doc per incidentlive fields · GPS trail · transcriptresponder messages · snapsWebRTC handshakeListeners replace a serverAuth · security rulescallers: anonymous sign-inresponders: email + rolesevery write schema-checkedResponder consoleReact + Vite · sign-in onlyLive queue + siren alertsCase board: map, evidenceLive video + listen-inAcknowledge · message callerHistory · analytics · adminAsk AI · credibility · insightsvia gemini-3.1-flash-liteLocation & routingGPS, else IP lookupNominatim + Photon: address, helpOSRM: route to police / hospitalEvidence recordingsApps Script → Google Drivecamera video every 20 s + at endcall audio once, at the endCase report + alertsApps Script mail: report + PDFtrusted contacts when severity is highreads the incident via Firestore RESTLive video + listen-inP2P WebRTC · Google STUNmedia one way: phone → consoleFirestore carries only the handshakeaudio + framesvoice, tool callsafter the calllive syncactionstool results → live fields · messages + route backvideo, audioNo backend server · Gemini API keys: free tier first, paid fallback · AI usage metered per call · gitleaks secret scan · 4 Firebase Hosting sites \ No newline at end of file +CALLER'S PHONEGOOGLE AI · GEMINI APIFIREBASE · REALTIME DATARESPONDERSQuickBite web appReact + Vite · Firebase HostingOpens in the phone browser,nothing to installFour hidden ways inCall to order · Click & orderDelivery instructions · Heart SOSEvery tool call runs hereseverity rules · geocode · routeWebRTC · recorders · key poolgemini-3.8-liveMia, the live voice agent:hears, sees, calls 12 tools+ the silent SOS observergemini-3.5-flash-litesummary, bulletin, redactiongemini-3.1-flash-litevision, case linking, console AICloud Firestoreasia-south1 · one doc per incidentlive fields · GPS trail · transcriptresponder messages · snapsWebRTC handshakeListeners sync data liveAuth · security rulescallers: anonymous sign-inresponders: email + rolesevery write schema-checkedResponder consoleReact + Vite · sign-in onlyLive queue + siren alertsCase board: map, evidenceLive video + listen-inAcknowledge · message callerHistory · analytics · adminAsk AI · credibility · insightsvia gemini-3.1-flash-liteLocation & routingGPS, else IP lookupNominatim + Photon: address, helpOSRM: route to police / hospitalEvidence recordingsApps Script → Google Drivecamera video every 20 s + at endcall audio once, at the endCase report + alertsApps Script mail: report + PDFtrusted contacts when severity is highreads the incident via Firestore RESTLive video + listen-inP2P WebRTC · Google STUNmedia one way: phone → consoleFirestore carries only the handshakeaudio + framesvoice, tool callsafter the calllive syncactionstool results → live fields · messages + route backvideo, audioManaged Firebase backend · Gemini API keys: free tier first, paid fallback · AI usage metered per call · gitleaks secret scan · 4 Firebase Hosting sites \ No newline at end of file diff --git a/covert_call/docs/architecture/quickbite-architecture.html b/covert_call/docs/architecture/quickbite-architecture.html index 07a22ec..df883c4 100644 --- a/covert_call/docs/architecture/quickbite-architecture.html +++ b/covert_call/docs/architecture/quickbite-architecture.html @@ -113,8 +113,8 @@
Team NexMind · deployed system

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.

-
3 web apps1 Firebase project3 Gemini models12 tools on the call0 servers to runChecked against main @ 3893f4e, 9 Oct 2026
+

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.

+
3 web apps1 Firebase project3 Gemini models12 tools on the call1 managed Firebase backendChecked against main @ 3893f4e, 9 Oct 2026