# mariam1617/rahaal-virtual-travel-assisstant architecture

> Architecture diagram of the GitHub repository mariam1617/rahaal-virtual-travel-assisstant, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-06). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/mariam1617/rahaal-virtual-travel-assisstant
- Repository: https://github.com/mariam1617/rahaal-virtual-travel-assisstant

## Overview

Ra7al is an Egypt-focused conversational travel concierge. Travelers enter through the Streamlit interface or FastAPI; requests are routed to planning, local travel help, trip execution, or feedback workflows. Planning produces and validates itineraries before approval-gated execution, while feedback can refine a trip or inform later personalization. The graph includes documented capabilities whose implementation was not sampled, but omits uncertain links between them; dashed edges indicate those unverified relationships.

Main entry points: [`src/agents/supervisor/graph.py`](https://github.com/mariam1617/rahaal-virtual-travel-assisstant/blob/main/src/agents/supervisor/graph.py) (Supervisor routing), [`src/main.py`](https://github.com/mariam1617/rahaal-virtual-travel-assisstant/blob/main/src/main.py) (FastAPI application), [`src/agents/feedback/graph.py`](https://github.com/mariam1617/rahaal-virtual-travel-assisstant/blob/main/src/agents/feedback/graph.py) (Feedback workflow), [`src/agents/planner/graph.py`](https://github.com/mariam1617/rahaal-virtual-travel-assisstant/blob/main/src/agents/planner/graph.py) (Itinerary planner)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Conversation entry"]
  node_streamlit["Streamlit interface<br/>[app.py]"]
  node_fastapi["FastAPI application<br/>[main.py]"]
  node_runner["Turn runner<br/>[runner.py]"]
end

subgraph group_orchestration["Agent workflows"]
  node_supervisor["Supervisor routing<br/>[graph.py]"]
  node_planner["Itinerary planner<br/>[graph.py]"]
  node_draft["Draft generation<br/>[draft_generator.py]"]
  node_feedback["Feedback workflow<br/>[graph.py]"]
  node_feedback_router["Feedback classification<br/>[router.py]"]
  node_itinerary_update["Trip adjustments"]
  node_preference_learning["Preference learning"]
  node_execution["Trip execution<br/>[graph.py]"]
  node_booking["Booking workflow<br/>[booking.py]"]
  node_calendar["Calendar sync<br/>[calendar_sync.py]"]
end

subgraph group_travel["Travel knowledge"]
  node_tourist_help["Tourist help<br/>[graph.py]"]
  node_recommendations["Place recommendations<br/>[recommendations.py]"]
  node_tourist_rag["Travel information RAG"]
end

subgraph group_personalization["Profiles and history"]
  node_profile_service["Profile service<br/>[profile_service.py]"]
  node_history["Trip history service<br/>[service.py]"]
  node_history_ui["History interface<br/>[ui.py]"]
end

subgraph group_persistence["Persistence"]
  node_user_store[("User repository<br/>[user_repo.py]")]
  node_plan_store[("Plan repository<br/>[plan_repo.py]")]
  node_insight_store[("Insight repository<br/>[insight_repo.py]")]
end

node_traveler(("Traveler"))

node_traveler -->|"starts conversation"| node_streamlit
node_traveler -.->|"sends request"| node_fastapi
node_streamlit -->|"runs turns"| node_runner
node_streamlit -->|"routes requests"| node_supervisor
node_fastapi -->|"mounts endpoint"| node_supervisor
node_fastapi -->|"mounts endpoint"| node_planner
node_fastapi -->|"mounts endpoint"| node_tourist_help
node_fastapi -->|"mounts endpoint"| node_feedback
node_runner -->|"saves plans"| node_plan_store
node_runner -->|"records approvals"| node_history
node_supervisor -->|"dispatches requests"| node_planner
node_supervisor -->|"dispatches requests"| node_feedback
node_supervisor -->|"dispatches requests"| node_execution
node_supervisor -->|"dispatches requests"| node_tourist_help
node_planner -->|"generates draft"| node_draft
node_planner -->|"requests approval"| node_execution
node_feedback -->|"classifies feedback"| node_feedback_router
node_feedback -->|"updates itinerary"| node_itinerary_update
node_feedback -->|"learns preferences"| node_preference_learning
node_execution -->|"runs booking"| node_booking
node_execution -->|"syncs calendar"| node_calendar
node_tourist_help -.->|"offers places"| node_recommendations
node_tourist_help -.->|"retrieves guidance"| node_tourist_rag
node_profile_service -->|"reads profiles"| node_user_store
node_profile_service -->|"persists insights"| node_insight_store
node_history_ui -->|"uses history"| node_history
node_history -->|"reads users"| node_user_store

click node_streamlit "https://github.com/mariam1617/rahaal-virtual-travel-assisstant/blob/main/app.py"
click node_fastapi "https://github.com/mariam1617/rahaal-virtual-travel-assisstant/blob/main/src/main.py"
click node_runner "https://github.com/mariam1617/rahaal-virtual-travel-assisstant/blob/main/src/runner.py"
click node_supervisor "https://github.com/mariam1617/rahaal-virtual-travel-assisstant/blob/main/src/agents/supervisor/graph.py"
click node_planner "https://github.com/mariam1617/rahaal-virtual-travel-assisstant/blob/main/src/agents/planner/graph.py"
click node_draft "https://github.com/mariam1617/rahaal-virtual-travel-assisstant/blob/main/src/agents/planner/draft_generator.py"
click node_feedback "https://github.com/mariam1617/rahaal-virtual-travel-assisstant/blob/main/src/agents/feedback/graph.py"
click node_feedback_router "https://github.com/mariam1617/rahaal-virtual-travel-assisstant/blob/main/src/agents/feedback/router.py"
click node_itinerary_update "https://github.com/mariam1617/rahaal-virtual-travel-assisstant/blob/main/src/agents/feedback/itinerary_update.py"
click node_preference_learning "https://github.com/mariam1617/rahaal-virtual-travel-assisstant/blob/main/src/agents/feedback/preference_learning.py"
click node_execution "https://github.com/mariam1617/rahaal-virtual-travel-assisstant/blob/main/src/agents/execution/graph.py"
click node_booking "https://github.com/mariam1617/rahaal-virtual-travel-assisstant/blob/main/src/agents/execution/booking.py"
click node_calendar "https://github.com/mariam1617/rahaal-virtual-travel-assisstant/blob/main/src/agents/execution/calendar_sync.py"
click node_tourist_help "https://github.com/mariam1617/rahaal-virtual-travel-assisstant/blob/main/src/agents/tourist_help/graph.py"
click node_recommendations "https://github.com/mariam1617/rahaal-virtual-travel-assisstant/blob/main/src/agents/tourist_help/recommendations.py"
click node_tourist_rag "https://github.com/mariam1617/rahaal-virtual-travel-assisstant/tree/main/src/rag/tourist_rag"
click node_profile_service "https://github.com/mariam1617/rahaal-virtual-travel-assisstant/blob/main/src/services/profile_service.py"
click node_history "https://github.com/mariam1617/rahaal-virtual-travel-assisstant/blob/main/src/history/service.py"
click node_history_ui "https://github.com/mariam1617/rahaal-virtual-travel-assisstant/blob/main/src/history/ui.py"
click node_user_store "https://github.com/mariam1617/rahaal-virtual-travel-assisstant/blob/main/src/db/repositories/user_repo.py"
click node_plan_store "https://github.com/mariam1617/rahaal-virtual-travel-assisstant/blob/main/src/db/repositories/plan_repo.py"
click node_insight_store "https://github.com/mariam1617/rahaal-virtual-travel-assisstant/blob/main/src/db/repositories/insight_repo.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_streamlit,node_fastapi,node_runner toneBlue
class node_supervisor,node_planner,node_draft,node_feedback,node_feedback_router,node_itinerary_update,node_preference_learning,node_execution,node_booking,node_calendar toneAmber
class node_tourist_help,node_recommendations,node_tourist_rag toneMint
class node_profile_service,node_history,node_history_ui toneRose
class node_user_store,node_plan_store,node_insight_store,node_traveler toneIndigo
```

## Components

### Conversation entry

- [Streamlit interface](https://github.com/mariam1617/rahaal-virtual-travel-assisstant/blob/main/app.py): `app.py`
- [FastAPI application](https://github.com/mariam1617/rahaal-virtual-travel-assisstant/blob/main/src/main.py): `src/main.py`
- [Turn runner](https://github.com/mariam1617/rahaal-virtual-travel-assisstant/blob/main/src/runner.py): `src/runner.py`

### Agent workflows

- [Supervisor routing](https://github.com/mariam1617/rahaal-virtual-travel-assisstant/blob/main/src/agents/supervisor/graph.py): `src/agents/supervisor/graph.py`
- [Itinerary planner](https://github.com/mariam1617/rahaal-virtual-travel-assisstant/blob/main/src/agents/planner/graph.py): `src/agents/planner/graph.py`
- [Draft generation](https://github.com/mariam1617/rahaal-virtual-travel-assisstant/blob/main/src/agents/planner/draft_generator.py): `src/agents/planner/draft_generator.py`
- [Feedback workflow](https://github.com/mariam1617/rahaal-virtual-travel-assisstant/blob/main/src/agents/feedback/graph.py): `src/agents/feedback/graph.py`
- [Feedback classification](https://github.com/mariam1617/rahaal-virtual-travel-assisstant/blob/main/src/agents/feedback/router.py): `src/agents/feedback/router.py`
- [Trip adjustments](https://github.com/mariam1617/rahaal-virtual-travel-assisstant/blob/main/src/agents/feedback/itinerary_update.py): `src/agents/feedback/itinerary_update.py`
- [Preference learning](https://github.com/mariam1617/rahaal-virtual-travel-assisstant/blob/main/src/agents/feedback/preference_learning.py): `src/agents/feedback/preference_learning.py`
- [Trip execution](https://github.com/mariam1617/rahaal-virtual-travel-assisstant/blob/main/src/agents/execution/graph.py): `src/agents/execution/graph.py`
- [Booking workflow](https://github.com/mariam1617/rahaal-virtual-travel-assisstant/blob/main/src/agents/execution/booking.py): `src/agents/execution/booking.py`
- [Calendar sync](https://github.com/mariam1617/rahaal-virtual-travel-assisstant/blob/main/src/agents/execution/calendar_sync.py): `src/agents/execution/calendar_sync.py`

### Travel knowledge

- [Tourist help](https://github.com/mariam1617/rahaal-virtual-travel-assisstant/blob/main/src/agents/tourist_help/graph.py): `src/agents/tourist_help/graph.py`
- [Place recommendations](https://github.com/mariam1617/rahaal-virtual-travel-assisstant/blob/main/src/agents/tourist_help/recommendations.py): `src/agents/tourist_help/recommendations.py`
- [Travel information RAG](https://github.com/mariam1617/rahaal-virtual-travel-assisstant/tree/main/src/rag/tourist_rag): `src/rag/tourist_rag`

### Profiles and history

- [Profile service](https://github.com/mariam1617/rahaal-virtual-travel-assisstant/blob/main/src/services/profile_service.py): `src/services/profile_service.py`
- [Trip history service](https://github.com/mariam1617/rahaal-virtual-travel-assisstant/blob/main/src/history/service.py): `src/history/service.py`
- [History interface](https://github.com/mariam1617/rahaal-virtual-travel-assisstant/blob/main/src/history/ui.py): `src/history/ui.py`

### Persistence

- [User repository](https://github.com/mariam1617/rahaal-virtual-travel-assisstant/blob/main/src/db/repositories/user_repo.py): `src/db/repositories/user_repo.py`
- [Plan repository](https://github.com/mariam1617/rahaal-virtual-travel-assisstant/blob/main/src/db/repositories/plan_repo.py): `src/db/repositories/plan_repo.py`
- [Insight repository](https://github.com/mariam1617/rahaal-virtual-travel-assisstant/blob/main/src/db/repositories/insight_repo.py): `src/db/repositories/insight_repo.py`

### Other components

- **Traveler**

## Connections

- Traveler → Streamlit interface: starts conversation (evidence: `app.py`)
- Traveler → FastAPI application: sends request
- Streamlit interface → Turn runner: runs turns (evidence: `app.py`)
- Streamlit interface → Supervisor routing: routes requests (evidence: `app.py`)
- FastAPI application → Supervisor routing: mounts endpoint (evidence: `src/main.py`)
- FastAPI application → Itinerary planner: mounts endpoint (evidence: `src/main.py`)
- FastAPI application → Tourist help: mounts endpoint (evidence: `src/main.py`)
- FastAPI application → Feedback workflow: mounts endpoint (evidence: `src/main.py`)
- Turn runner → Plan repository: saves plans (evidence: `src/runner.py`)
- Turn runner → Trip history service: records approvals (evidence: `src/runner.py`)
- Supervisor routing → Itinerary planner: dispatches requests (evidence: `src/agents/supervisor/graph.py`)
- Supervisor routing → Feedback workflow: dispatches requests (evidence: `src/agents/supervisor/graph.py`)
- Supervisor routing → Trip execution: dispatches requests (evidence: `src/agents/supervisor/graph.py`)
- Supervisor routing → Tourist help: dispatches requests (evidence: `src/agents/supervisor/graph.py`)
- Itinerary planner → Draft generation: generates draft (evidence: `src/agents/planner/graph.py`)
- Itinerary planner → Trip execution: requests approval (evidence: `src/agents/planner/graph.py`)
- Feedback workflow → Feedback classification: classifies feedback (evidence: `src/agents/feedback/graph.py`)
- Feedback workflow → Trip adjustments: updates itinerary (evidence: `src/agents/feedback/graph.py`)
- Feedback workflow → Preference learning: learns preferences (evidence: `src/agents/feedback/graph.py`)
- Trip execution → Booking workflow: runs booking (evidence: `src/agents/execution/graph.py`)
- Trip execution → Calendar sync: syncs calendar (evidence: `src/agents/execution/graph.py`)
- Tourist help → Place recommendations: offers places
- Tourist help → Travel information RAG: retrieves guidance
- Profile service → User repository: reads profiles (evidence: `src/services/profile_service.py`)
- Profile service → Insight repository: persists insights (evidence: `src/services/profile_service.py`)
- History interface → Trip history service: uses history (evidence: `src/history/ui.py`)
- Trip history service → User repository: reads users
