# sutharatul/quick-call- architecture

> Architecture diagram of the GitHub repository sutharatul/quick-call-, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/sutharatul/quick-call-
- Repository: https://github.com/sutharatul/quick-call-

## Overview

This is a FastAPI-based AI support and concierge prototype. Users ask questions through the web interface; the API routes booking-related requests to verified reservation lookup and personalized answers, while general support requests retrieve approved FAQ knowledge and generate grounded responses. The app can use MongoDB or an in-memory/local FAQ fallback and calls OpenAI for embeddings and chat completions. The excerpts show these main paths, but not the complete route handlers or frontend behavior, so uncertain links are omitted.

Main entry points: [`app.py`](https://github.com/sutharatul/quick-call-/blob/main/app.py) (Chat routing), [`static/index.html`](https://github.com/sutharatul/quick-call-/blob/main/static/index.html) (Support interface), [`static/admin.html`](https://github.com/sutharatul/quick-call-/blob/main/static/admin.html) (Admin interface), [`data/faq.json`](https://github.com/sutharatul/quick-call-/blob/main/data/faq.json) (FAQ source)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["User interface"]
  node_web["Support interface<br/>[index.html]"]
  node_admin["Admin interface<br/>[admin.html]"]
end

subgraph group_api["Support application"]
  node_api["FastAPI service<br/>[app.py]"]
  node_chat["Chat routing<br/>[app.py]"]
  node_faq_endpoint["FAQ endpoint<br/>[app.py]"]
end

subgraph group_knowledge["Knowledge retrieval"]
  node_faq_data["FAQ source<br/>[faq.json]"]
  node_cache_file["Knowledge cache"]
  node_retrieval["Knowledge retrieval<br/>[app.py]"]
  node_knowledge_store[("Knowledge store<br/>[app.py]")]
  node_response_gen["Grounded answer generation<br/>[app.py]"]
end

subgraph group_booking["Booking concierge"]
  node_intent["Booking intent and IDs<br/>[app.py]"]
  node_booking_lookup["Reservation lookup<br/>[app.py]"]
  node_booking_answer["Personalized booking answer<br/>[app.py]"]
end

node_visitor(("Support user"))
node_openai{{"OpenAI API"}}
node_reservation_db[("Reservation database")]

node_visitor -->|"asks"| node_web
node_web -.->|"sends requests"| node_api
node_admin -.->|"manages knowledge"| node_api
node_api -->|"routes chat"| node_chat
node_api -->|"serves FAQs"| node_faq_endpoint
node_faq_endpoint -->|"reads"| node_faq_data
node_chat -->|"checks intent"| node_intent
node_chat -->|"retrieves evidence"| node_retrieval
node_retrieval -->|"queries"| node_knowledge_store
node_retrieval -->|"embeds query"| node_openai
node_retrieval -->|"falls back"| node_cache_file
node_chat -->|"looks up booking"| node_booking_lookup
node_booking_lookup -->|"queries"| node_reservation_db
node_chat -->|"generates reply"| node_booking_answer
node_booking_answer -->|"requests completion"| node_openai
node_chat -->|"generates reply"| node_response_gen
node_response_gen -->|"requests completion"| node_openai
node_response_gen -->|"uses evidence"| node_retrieval

click node_web "https://github.com/sutharatul/quick-call-/blob/main/static/index.html"
click node_admin "https://github.com/sutharatul/quick-call-/blob/main/static/admin.html"
click node_api "https://github.com/sutharatul/quick-call-/blob/main/app.py"
click node_chat "https://github.com/sutharatul/quick-call-/blob/main/app.py"
click node_faq_endpoint "https://github.com/sutharatul/quick-call-/blob/main/app.py"
click node_faq_data "https://github.com/sutharatul/quick-call-/blob/main/data/faq.json"
click node_cache_file "https://github.com/sutharatul/quick-call-/blob/main/data/knowledge_cache.json"
click node_retrieval "https://github.com/sutharatul/quick-call-/blob/main/app.py"
click node_knowledge_store "https://github.com/sutharatul/quick-call-/blob/main/app.py"
click node_response_gen "https://github.com/sutharatul/quick-call-/blob/main/app.py"
click node_intent "https://github.com/sutharatul/quick-call-/blob/main/app.py"
click node_booking_lookup "https://github.com/sutharatul/quick-call-/blob/main/app.py"
click node_booking_answer "https://github.com/sutharatul/quick-call-/blob/main/app.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_web,node_admin,node_visitor toneBlue
class node_api,node_chat,node_faq_endpoint,node_reservation_db toneAmber
class node_faq_data,node_cache_file,node_retrieval,node_knowledge_store,node_response_gen,node_openai toneMint
class node_intent,node_booking_lookup,node_booking_answer toneRose
```

## Components

### User interface

- [Support interface](https://github.com/sutharatul/quick-call-/blob/main/static/index.html): `static/index.html`
- [Admin interface](https://github.com/sutharatul/quick-call-/blob/main/static/admin.html): `static/admin.html`

### Support application

- [FastAPI service](https://github.com/sutharatul/quick-call-/blob/main/app.py): `app.py`
- [Chat routing](https://github.com/sutharatul/quick-call-/blob/main/app.py): `app.py`
- [FAQ endpoint](https://github.com/sutharatul/quick-call-/blob/main/app.py): `app.py`

### Knowledge retrieval

- [FAQ source](https://github.com/sutharatul/quick-call-/blob/main/data/faq.json): `data/faq.json`
- [Knowledge cache](https://github.com/sutharatul/quick-call-/blob/main/data/knowledge_cache.json): `data/knowledge_cache.json`
- [Knowledge retrieval](https://github.com/sutharatul/quick-call-/blob/main/app.py): `app.py`
- [Knowledge store](https://github.com/sutharatul/quick-call-/blob/main/app.py): `app.py`
- [Grounded answer generation](https://github.com/sutharatul/quick-call-/blob/main/app.py): `app.py`

### Booking concierge

- [Booking intent and IDs](https://github.com/sutharatul/quick-call-/blob/main/app.py): `app.py`
- [Reservation lookup](https://github.com/sutharatul/quick-call-/blob/main/app.py): `app.py`
- [Personalized booking answer](https://github.com/sutharatul/quick-call-/blob/main/app.py): `app.py`

### Other components

- **Support user**
- **OpenAI API**
- **Reservation database**

## Connections

- Support user → Support interface: asks
- Support interface → FastAPI service: sends requests
- Admin interface → FastAPI service: manages knowledge
- FastAPI service → Chat routing: routes chat (evidence: `app.py`)
- FastAPI service → FAQ endpoint: serves FAQs (evidence: `app.py`)
- FAQ endpoint → FAQ source: reads (evidence: `app.py`)
- Chat routing → Booking intent and IDs: checks intent (evidence: `app.py`)
- Chat routing → Knowledge retrieval: retrieves evidence (evidence: `app.py`)
- Knowledge retrieval → Knowledge store: queries (evidence: `app.py`)
- Knowledge retrieval → OpenAI API: embeds query (evidence: `app.py`)
- Knowledge retrieval → Knowledge cache: falls back (evidence: `app.py`)
- Chat routing → Reservation lookup: looks up booking (evidence: `app.py`)
- Reservation lookup → Reservation database: queries (evidence: `app.py`)
- Chat routing → Personalized booking answer: generates reply (evidence: `app.py`)
- Personalized booking answer → OpenAI API: requests completion (evidence: `app.py`)
- Chat routing → Grounded answer generation: generates reply (evidence: `app.py`)
- Grounded answer generation → OpenAI API: requests completion (evidence: `app.py`)
- Grounded answer generation → Knowledge retrieval: uses evidence (evidence: `app.py`)
