# pavan05-sai/wandor architecture

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

- Interactive diagram: https://gitdiagram.com/pavan05-sai/wandor
- Repository: https://github.com/pavan05-sai/wandor

## Overview

Wandor turns a traveler’s destination, dates, budget, and preferences into a grounded, versioned itinerary, then supports map-based review, budget tracking, and AI-assisted changes. The documented flow runs from the React client through FastAPI into itinerary orchestration, planning and validation, with versions persisted for rollback and comparison. Separate capability branches cover weather, routing, expenses, sharing, and notifications. The README documents several integrations and subsystems whose implementation excerpts were not sampled; those links are cited as documentation rather than source-level inspection.

Main entry points: [`backend/app/orchestrator/orchestrator.py`](https://github.com/pavan05-sai/wandor/blob/main/backend/app/orchestrator/orchestrator.py) (Travel orchestrator), [`backend/app/orchestrator/pipeline.py`](https://github.com/pavan05-sai/wandor/blob/main/backend/app/orchestrator/pipeline.py) (Change pipeline), [`backend/app/main.py`](https://github.com/pavan05-sai/wandor/blob/main/backend/app/main.py) (FastAPI app), [`backend/app/api/trips.py`](https://github.com/pavan05-sai/wandor/blob/main/backend/app/api/trips.py) (Trip endpoints)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Traveler experience"]
  node_app["App controller<br/>[App.tsx]"]
  node_trip_ui["Trip dashboard<br/>[TripDashboard.tsx]"]
  node_concierge_ui["AI concierge"]
  node_api_client["API client<br/>[api.ts]"]
end

subgraph group_api["API and access"]
  node_server["FastAPI app<br/>[main.py]"]
  node_auth["Authentication<br/>[auth.py]"]
  node_trip_api["Trip endpoints<br/>[trips.py]"]
  node_itinerary_api["Itinerary endpoints<br/>[itinerary.py]"]
  node_chat_api["Chat endpoint<br/>[chat.py]"]
end

subgraph group_planning["Planning intelligence"]
  node_orchestrator["Travel orchestrator<br/>[orchestrator.py]"]
  node_pipeline["Change pipeline<br/>[pipeline.py]"]
  node_agents["Planning agents"]
  node_baseline["Baseline planner<br/>[baseline.py]"]
  node_optimizer["Schedule optimizer<br/>[optimizer.py]"]
  node_validator["Itinerary validator<br/>[validator.py]"]
  node_budget["Budget engine<br/>[budget.py]"]
  node_catalog["Destination catalog<br/>[catalog.py]"]
end

subgraph group_data["Persistence"]
  node_repos["Repositories"]
  node_versions["Version history<br/>[versions.py]"]
  node_database[("SQL database<br/>[database.py]")]
end

subgraph group_capabilities["Trip capabilities"]
  node_routing["Route calculation<br/>[routing.py]"]
  node_weather["Weather and events<br/>[weather.py]"]
  node_expenses["Expense tracking<br/>[expenses.py]"]
  node_sharing["Trip sharing<br/>[sharing.py]"]
  node_notifications["Notifications<br/>[service.py]"]
end

node_traveler(("Traveler"))
node_gemini{{"Google Gemini"}}
node_nominatim{{"Nominatim"}}
node_osrm{{"Project OSRM"}}
node_openmeteo{{"Open-Meteo"}}

node_traveler -->|"uses"| node_app
node_app -->|"shows trips"| node_trip_ui
node_trip_ui -->|"requests data"| node_api_client
node_concierge_ui -->|"sends chat"| node_api_client
node_api_client -->|"calls API"| node_server
node_server -->|"registers router"| node_auth
node_server -->|"registers router"| node_trip_api
node_server -->|"registers router"| node_itinerary_api
node_server -->|"registers router"| node_chat_api
node_trip_api -.->|"resolves trips"| node_orchestrator
node_itinerary_api -.->|"requests generation"| node_orchestrator
node_chat_api -.->|"requests changes"| node_orchestrator
node_orchestrator -->|"coordinates planning"| node_agents
node_orchestrator -.->|"uses fallback"| node_baseline
node_orchestrator -.->|"uses places"| node_catalog
node_orchestrator -->|"runs changes"| node_pipeline
node_pipeline -->|"optimizes days"| node_optimizer
node_pipeline -->|"calculates legs"| node_routing
node_pipeline -.->|"validates itinerary"| node_validator
node_pipeline -.->|"updates budget"| node_budget
node_agents -.->|"generates plans"| node_gemini
node_catalog -.->|"geocodes places"| node_nominatim
node_routing -.->|"requests routes"| node_osrm
node_weather -.->|"fetches forecasts"| node_openmeteo
node_orchestrator -.->|"monitors conditions"| node_weather
node_trip_api -.->|"supports budgets"| node_expenses
node_trip_api -.->|"supports sharing"| node_sharing
node_orchestrator -->|"creates alerts"| node_notifications
node_pipeline -->|"creates alerts"| node_notifications
node_orchestrator -->|"creates snapshots"| node_versions
node_pipeline -->|"creates snapshots"| node_versions
node_auth -->|"uses users"| node_repos
node_trip_api -.->|"persists trips"| node_repos
node_versions -.->|"stores versions"| node_database
node_repos -.->|"reads and writes"| node_database

click node_app "https://github.com/pavan05-sai/wandor/blob/main/frontend/src/App.tsx"
click node_trip_ui "https://github.com/pavan05-sai/wandor/blob/main/frontend/src/components/TripDashboard.tsx"
click node_concierge_ui "https://github.com/pavan05-sai/wandor/blob/main/frontend/src/components/AiConciergeDrawer.tsx"
click node_api_client "https://github.com/pavan05-sai/wandor/blob/main/frontend/src/services/api.ts"
click node_server "https://github.com/pavan05-sai/wandor/blob/main/backend/app/main.py"
click node_auth "https://github.com/pavan05-sai/wandor/blob/main/backend/app/api/auth.py"
click node_trip_api "https://github.com/pavan05-sai/wandor/blob/main/backend/app/api/trips.py"
click node_itinerary_api "https://github.com/pavan05-sai/wandor/blob/main/backend/app/api/itinerary.py"
click node_chat_api "https://github.com/pavan05-sai/wandor/blob/main/backend/app/api/chat.py"
click node_orchestrator "https://github.com/pavan05-sai/wandor/blob/main/backend/app/orchestrator/orchestrator.py"
click node_pipeline "https://github.com/pavan05-sai/wandor/blob/main/backend/app/orchestrator/pipeline.py"
click node_agents "https://github.com/pavan05-sai/wandor/tree/main/backend/app/agents"
click node_baseline "https://github.com/pavan05-sai/wandor/blob/main/backend/app/workers/baseline.py"
click node_optimizer "https://github.com/pavan05-sai/wandor/blob/main/backend/app/workers/optimizer.py"
click node_validator "https://github.com/pavan05-sai/wandor/blob/main/backend/app/workers/validator.py"
click node_budget "https://github.com/pavan05-sai/wandor/blob/main/backend/app/workers/budget.py"
click node_catalog "https://github.com/pavan05-sai/wandor/blob/main/backend/app/services/catalog.py"
click node_routing "https://github.com/pavan05-sai/wandor/blob/main/backend/app/services/routing.py"
click node_weather "https://github.com/pavan05-sai/wandor/blob/main/backend/app/services/weather.py"
click node_expenses "https://github.com/pavan05-sai/wandor/blob/main/backend/app/api/expenses.py"
click node_sharing "https://github.com/pavan05-sai/wandor/blob/main/backend/app/api/sharing.py"
click node_notifications "https://github.com/pavan05-sai/wandor/blob/main/backend/app/notifications/service.py"
click node_repos "https://github.com/pavan05-sai/wandor/tree/main/backend/app/repositories"
click node_versions "https://github.com/pavan05-sai/wandor/blob/main/backend/app/repositories/versions.py"
click node_database "https://github.com/pavan05-sai/wandor/blob/main/backend/app/models/database.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_app,node_trip_ui,node_concierge_ui,node_api_client toneBlue
class node_server,node_auth,node_trip_api,node_itinerary_api,node_chat_api toneAmber
class node_orchestrator,node_pipeline,node_agents,node_baseline,node_optimizer,node_validator,node_budget,node_catalog toneMint
class node_repos,node_versions,node_database toneRose
class node_routing,node_weather,node_expenses,node_sharing,node_notifications,node_traveler,node_gemini,node_nominatim,node_osrm,node_openmeteo toneIndigo
```

## Components

### Traveler experience

- [App controller](https://github.com/pavan05-sai/wandor/blob/main/frontend/src/App.tsx): `frontend/src/App.tsx`
- [Trip dashboard](https://github.com/pavan05-sai/wandor/blob/main/frontend/src/components/TripDashboard.tsx): `frontend/src/components/TripDashboard.tsx`
- [AI concierge](https://github.com/pavan05-sai/wandor/blob/main/frontend/src/components/AiConciergeDrawer.tsx): `frontend/src/components/AiConciergeDrawer.tsx`
- [API client](https://github.com/pavan05-sai/wandor/blob/main/frontend/src/services/api.ts): `frontend/src/services/api.ts`

### API and access

- [FastAPI app](https://github.com/pavan05-sai/wandor/blob/main/backend/app/main.py): `backend/app/main.py`
- [Authentication](https://github.com/pavan05-sai/wandor/blob/main/backend/app/api/auth.py): `backend/app/api/auth.py`
- [Trip endpoints](https://github.com/pavan05-sai/wandor/blob/main/backend/app/api/trips.py): `backend/app/api/trips.py`
- [Itinerary endpoints](https://github.com/pavan05-sai/wandor/blob/main/backend/app/api/itinerary.py): `backend/app/api/itinerary.py`
- [Chat endpoint](https://github.com/pavan05-sai/wandor/blob/main/backend/app/api/chat.py): `backend/app/api/chat.py`

### Planning intelligence

- [Travel orchestrator](https://github.com/pavan05-sai/wandor/blob/main/backend/app/orchestrator/orchestrator.py): `backend/app/orchestrator/orchestrator.py`
- [Change pipeline](https://github.com/pavan05-sai/wandor/blob/main/backend/app/orchestrator/pipeline.py): `backend/app/orchestrator/pipeline.py`
- [Planning agents](https://github.com/pavan05-sai/wandor/tree/main/backend/app/agents): `backend/app/agents`
- [Baseline planner](https://github.com/pavan05-sai/wandor/blob/main/backend/app/workers/baseline.py): `backend/app/workers/baseline.py`
- [Schedule optimizer](https://github.com/pavan05-sai/wandor/blob/main/backend/app/workers/optimizer.py): `backend/app/workers/optimizer.py`
- [Itinerary validator](https://github.com/pavan05-sai/wandor/blob/main/backend/app/workers/validator.py): `backend/app/workers/validator.py`
- [Budget engine](https://github.com/pavan05-sai/wandor/blob/main/backend/app/workers/budget.py): `backend/app/workers/budget.py`
- [Destination catalog](https://github.com/pavan05-sai/wandor/blob/main/backend/app/services/catalog.py): `backend/app/services/catalog.py`

### Persistence

- [Repositories](https://github.com/pavan05-sai/wandor/tree/main/backend/app/repositories): `backend/app/repositories`
- [Version history](https://github.com/pavan05-sai/wandor/blob/main/backend/app/repositories/versions.py): `backend/app/repositories/versions.py`
- [SQL database](https://github.com/pavan05-sai/wandor/blob/main/backend/app/models/database.py): `backend/app/models/database.py`

### Trip capabilities

- [Route calculation](https://github.com/pavan05-sai/wandor/blob/main/backend/app/services/routing.py): `backend/app/services/routing.py`
- [Weather and events](https://github.com/pavan05-sai/wandor/blob/main/backend/app/services/weather.py): `backend/app/services/weather.py`
- [Expense tracking](https://github.com/pavan05-sai/wandor/blob/main/backend/app/api/expenses.py): `backend/app/api/expenses.py`
- [Trip sharing](https://github.com/pavan05-sai/wandor/blob/main/backend/app/api/sharing.py): `backend/app/api/sharing.py`
- [Notifications](https://github.com/pavan05-sai/wandor/blob/main/backend/app/notifications/service.py): `backend/app/notifications/service.py`

### Other components

- **Traveler**
- **Google Gemini**
- **Nominatim**
- **Project OSRM**
- **Open-Meteo**

## Connections

- Traveler → App controller: uses
- App controller → Trip dashboard: shows trips
- Trip dashboard → API client: requests data (evidence: `frontend/src/components/TripDashboard.tsx`)
- AI concierge → API client: sends chat
- API client → FastAPI app: calls API
- FastAPI app → Authentication: registers router (evidence: `backend/app/main.py`)
- FastAPI app → Trip endpoints: registers router (evidence: `backend/app/main.py`)
- FastAPI app → Itinerary endpoints: registers router (evidence: `backend/app/main.py`)
- FastAPI app → Chat endpoint: registers router (evidence: `backend/app/main.py`)
- Trip endpoints → Travel orchestrator: resolves trips
- Itinerary endpoints → Travel orchestrator: requests generation
- Chat endpoint → Travel orchestrator: requests changes
- Travel orchestrator → Planning agents: coordinates planning (evidence: `backend/app/orchestrator/orchestrator.py`)
- Travel orchestrator → Baseline planner: uses fallback (evidence: `backend/app/orchestrator/orchestrator.py`)
- Travel orchestrator → Destination catalog: uses places (evidence: `backend/app/orchestrator/orchestrator.py`)
- Travel orchestrator → Change pipeline: runs changes (evidence: `backend/app/orchestrator/orchestrator.py`)
- Change pipeline → Schedule optimizer: optimizes days (evidence: `backend/app/orchestrator/pipeline.py`)
- Change pipeline → Route calculation: calculates legs (evidence: `backend/app/orchestrator/pipeline.py`)
- Change pipeline → Itinerary validator: validates itinerary (evidence: `backend/app/orchestrator/pipeline.py`)
- Change pipeline → Budget engine: updates budget (evidence: `backend/app/orchestrator/pipeline.py`)
- Planning agents → Google Gemini: generates plans
- Destination catalog → Nominatim: geocodes places
- Route calculation → Project OSRM: requests routes
- Weather and events → Open-Meteo: fetches forecasts
- Travel orchestrator → Weather and events: monitors conditions (evidence: `backend/app/orchestrator/orchestrator.py`)
- Trip endpoints → Expense tracking: supports budgets
- Trip endpoints → Trip sharing: supports sharing
- Travel orchestrator → Notifications: creates alerts (evidence: `backend/app/orchestrator/orchestrator.py`)
- Change pipeline → Notifications: creates alerts (evidence: `backend/app/orchestrator/pipeline.py`)
- Travel orchestrator → Version history: creates snapshots (evidence: `backend/app/orchestrator/orchestrator.py`)
- Change pipeline → Version history: creates snapshots (evidence: `backend/app/orchestrator/pipeline.py`)
- Authentication → Repositories: uses users (evidence: `backend/app/api/auth.py`)
- Trip endpoints → Repositories: persists trips
- Version history → SQL database: stores versions
- Repositories → SQL database: reads and writes
