# mithila-minidul/travel-planning-itinerary-platform architecture

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

- Interactive diagram: https://gitdiagram.com/mithila-minidul/travel-planning-itinerary-platform
- Repository: https://github.com/mithila-minidul/travel-planning-itinerary-platform

## Overview

This is a full-stack travel-planning platform: travelers and travel professionals browse experiences, organize trips, book and pay, then manage reviews; a Python agent workflow can generate itinerary suggestions that the .NET backend persists. The React application provides role-gated views, while the backend exposes domain APIs and PostgreSQL-backed services. The README identifies the platform and agentic-AI scope, but offers few workflow details; several links below rely on indexed imports or registrations, and unsampled integrations are omitted or marked unverified.

Main entry points: [`backend/Program.cs`](https://github.com/mithila-minidul/travel-planning-itinerary-platform/blob/main/backend/Program.cs) (HTTP API), [`frontend/src/App.jsx`](https://github.com/mithila-minidul/travel-planning-itinerary-platform/blob/main/frontend/src/App.jsx) (Web routes), [`backend/Data/AppDbContext.cs`](https://github.com/mithila-minidul/travel-planning-itinerary-platform/blob/main/backend/Data/AppDbContext.cs) (EF data context), [`backend/Services/PlannerAgentService.cs`](https://github.com/mithila-minidul/travel-planning-itinerary-platform/blob/main/backend/Services/PlannerAgentService.cs) (Itinerary bridge)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web application"]
  node_app["Web routes<br/>[App.jsx]"]
  node_auth["Session context<br/>[AuthContext.jsx]"]
  node_tripviews["Trip views<br/>[TripsPage.jsx]"]
  node_reviewviews["Review views"]
  node_webapi["API client<br/>[client.js]"]
end

subgraph group_api["Platform backend"]
  node_backend["HTTP API<br/>[Program.cs]"]
  node_tripapi["Trip endpoints<br/>[TripsController.cs]"]
  node_bookingapi["Booking endpoints"]
  node_reviewapi["Review endpoints"]
  node_tripservice["Itinerary bridge"]
  node_bookingservice["Booking services<br/>[BookingService.cs]"]
  node_reviewservice["Review services<br/>[ReviewService.cs]"]
  node_catalog["Travel catalog<br/>[Member1Services.cs]"]
  node_payments["Payment services<br/>[PaymentService.cs]"]
end

subgraph group_ai["AI itinerary planning"]
  node_aiworkflow["Itinerary workflow"]
  node_agents["Planning agents"]
  node_research["Research agent<br/>[research_agent.py]"]
  node_aiprocess["AI service routes<br/>[main.py]"]
end

subgraph group_data["Travel data"]
  node_database[("PostgreSQL")]
  node_models["Travel entities<br/>[Trip.cs]"]
  node_context["EF data context<br/>[AppDbContext.cs]"]
end

node_traveler(("Traveler"))
node_guide(("Local guide"))
node_admin(("Administrator"))
node_payhere["PayHere gateway"]
node_llm["LLM provider"]

node_traveler -->|"uses"| node_app
node_guide -->|"uses"| node_app
node_admin -->|"uses"| node_app
node_app -->|"provides session"| node_auth
node_app -->|"routes to"| node_tripviews
node_app -->|"routes to"| node_reviewviews
node_auth -->|"uses auth API"| node_webapi
node_reviewviews -->|"loads reviews"| node_webapi
node_webapi -.->|"HTTP requests"| node_backend
node_backend -->|"maps controllers"| node_tripapi
node_backend -->|"maps controllers"| node_bookingapi
node_backend -->|"maps controllers"| node_reviewapi
node_tripapi -.->|"requests itinerary"| node_tripservice
node_bookingapi -->|"delegates booking"| node_bookingservice
node_reviewapi -->|"delegates reviews"| node_reviewservice
node_backend -->|"registers services"| node_catalog
node_backend -->|"registers services"| node_payments
node_tripservice -->|"posts itinerary request"| node_aiprocess
node_aiprocess -->|"dispatches workflow"| node_aiworkflow
node_aiprocess -->|"loads agents"| node_agents
node_agents -.->|"includes research"| node_research
node_research -.->|"uses client"| node_llm
node_tripservice -->|"maps itinerary stops"| node_context
node_context -->|"reads and writes"| node_database
node_context -->|"maps entities"| node_models
node_reviewservice -->|"queries and saves"| node_context
node_bookingservice -.->|"uses persistence"| node_context
node_payments -.->|"gateway integration"| node_payhere

click node_app "https://github.com/mithila-minidul/travel-planning-itinerary-platform/blob/main/frontend/src/App.jsx"
click node_auth "https://github.com/mithila-minidul/travel-planning-itinerary-platform/blob/main/frontend/src/context/AuthContext.jsx"
click node_tripviews "https://github.com/mithila-minidul/travel-planning-itinerary-platform/blob/main/frontend/src/pages/TripsPage.jsx"
click node_reviewviews "https://github.com/mithila-minidul/travel-planning-itinerary-platform/blob/main/frontend/src/pages/ReviewManagementPage.jsx"
click node_webapi "https://github.com/mithila-minidul/travel-planning-itinerary-platform/blob/main/frontend/src/api/client.js"
click node_backend "https://github.com/mithila-minidul/travel-planning-itinerary-platform/blob/main/backend/Program.cs"
click node_tripapi "https://github.com/mithila-minidul/travel-planning-itinerary-platform/blob/main/backend/Controllers/TripsController.cs"
click node_bookingapi "https://github.com/mithila-minidul/travel-planning-itinerary-platform/blob/main/backend/Controllers/BookingsController.cs"
click node_reviewapi "https://github.com/mithila-minidul/travel-planning-itinerary-platform/blob/main/backend/Controllers/ReviewsController.cs"
click node_tripservice "https://github.com/mithila-minidul/travel-planning-itinerary-platform/blob/main/backend/Services/PlannerAgentService.cs"
click node_bookingservice "https://github.com/mithila-minidul/travel-planning-itinerary-platform/blob/main/backend/Services/BookingService.cs"
click node_reviewservice "https://github.com/mithila-minidul/travel-planning-itinerary-platform/blob/main/backend/Services/ReviewService.cs"
click node_catalog "https://github.com/mithila-minidul/travel-planning-itinerary-platform/blob/main/backend/Services/Member1Services.cs"
click node_payments "https://github.com/mithila-minidul/travel-planning-itinerary-platform/blob/main/backend/Services/PaymentService.cs"
click node_aiworkflow "https://github.com/mithila-minidul/travel-planning-itinerary-platform/blob/main/ai-service/workflows/trip_planner_workflow.py"
click node_agents "https://github.com/mithila-minidul/travel-planning-itinerary-platform/tree/main/ai-service/agents"
click node_research "https://github.com/mithila-minidul/travel-planning-itinerary-platform/blob/main/ai-service/agents/research_agent.py"
click node_aiprocess "https://github.com/mithila-minidul/travel-planning-itinerary-platform/blob/main/ai-service/main.py"
click node_models "https://github.com/mithila-minidul/travel-planning-itinerary-platform/blob/main/backend/Models/Trip.cs"
click node_context "https://github.com/mithila-minidul/travel-planning-itinerary-platform/blob/main/backend/Data/AppDbContext.cs"

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_auth,node_tripviews,node_reviewviews,node_webapi toneBlue
class node_backend,node_tripapi,node_bookingapi,node_reviewapi,node_tripservice,node_bookingservice,node_reviewservice,node_catalog,node_payments toneAmber
class node_aiworkflow,node_agents,node_research,node_aiprocess toneMint
class node_database,node_models,node_context toneRose
class node_traveler,node_guide,node_admin,node_payhere,node_llm toneIndigo
```

## Components

### Web application

- [Web routes](https://github.com/mithila-minidul/travel-planning-itinerary-platform/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Session context](https://github.com/mithila-minidul/travel-planning-itinerary-platform/blob/main/frontend/src/context/AuthContext.jsx): `frontend/src/context/AuthContext.jsx`
- [Trip views](https://github.com/mithila-minidul/travel-planning-itinerary-platform/blob/main/frontend/src/pages/TripsPage.jsx): `frontend/src/pages/TripsPage.jsx`
- [Review views](https://github.com/mithila-minidul/travel-planning-itinerary-platform/blob/main/frontend/src/pages/ReviewManagementPage.jsx): `frontend/src/pages/ReviewManagementPage.jsx`
- [API client](https://github.com/mithila-minidul/travel-planning-itinerary-platform/blob/main/frontend/src/api/client.js): `frontend/src/api/client.js`

### Platform backend

- [HTTP API](https://github.com/mithila-minidul/travel-planning-itinerary-platform/blob/main/backend/Program.cs): `backend/Program.cs`
- [Trip endpoints](https://github.com/mithila-minidul/travel-planning-itinerary-platform/blob/main/backend/Controllers/TripsController.cs): `backend/Controllers/TripsController.cs`
- [Booking endpoints](https://github.com/mithila-minidul/travel-planning-itinerary-platform/blob/main/backend/Controllers/BookingsController.cs): `backend/Controllers/BookingsController.cs`
- [Review endpoints](https://github.com/mithila-minidul/travel-planning-itinerary-platform/blob/main/backend/Controllers/ReviewsController.cs): `backend/Controllers/ReviewsController.cs`
- [Itinerary bridge](https://github.com/mithila-minidul/travel-planning-itinerary-platform/blob/main/backend/Services/PlannerAgentService.cs): `backend/Services/PlannerAgentService.cs`
- [Booking services](https://github.com/mithila-minidul/travel-planning-itinerary-platform/blob/main/backend/Services/BookingService.cs): `backend/Services/BookingService.cs`
- [Review services](https://github.com/mithila-minidul/travel-planning-itinerary-platform/blob/main/backend/Services/ReviewService.cs): `backend/Services/ReviewService.cs`
- [Travel catalog](https://github.com/mithila-minidul/travel-planning-itinerary-platform/blob/main/backend/Services/Member1Services.cs): `backend/Services/Member1Services.cs`
- [Payment services](https://github.com/mithila-minidul/travel-planning-itinerary-platform/blob/main/backend/Services/PaymentService.cs): `backend/Services/PaymentService.cs`

### AI itinerary planning

- [Itinerary workflow](https://github.com/mithila-minidul/travel-planning-itinerary-platform/blob/main/ai-service/workflows/trip_planner_workflow.py): `ai-service/workflows/trip_planner_workflow.py`
- [Planning agents](https://github.com/mithila-minidul/travel-planning-itinerary-platform/tree/main/ai-service/agents): `ai-service/agents`
- [Research agent](https://github.com/mithila-minidul/travel-planning-itinerary-platform/blob/main/ai-service/agents/research_agent.py): `ai-service/agents/research_agent.py`
- [AI service routes](https://github.com/mithila-minidul/travel-planning-itinerary-platform/blob/main/ai-service/main.py): `ai-service/main.py`

### Travel data

- **PostgreSQL**
- [Travel entities](https://github.com/mithila-minidul/travel-planning-itinerary-platform/blob/main/backend/Models/Trip.cs): `backend/Models/Trip.cs`
- [EF data context](https://github.com/mithila-minidul/travel-planning-itinerary-platform/blob/main/backend/Data/AppDbContext.cs): `backend/Data/AppDbContext.cs`

### Other components

- **Traveler**
- **Local guide**
- **Administrator**
- **PayHere gateway**
- **LLM provider**

## Connections

- Traveler → Web routes: uses (evidence: `frontend/src/App.jsx`)
- Local guide → Web routes: uses (evidence: `frontend/src/App.jsx`)
- Administrator → Web routes: uses (evidence: `frontend/src/App.jsx`)
- Web routes → Session context: provides session (evidence: `frontend/src/App.jsx`)
- Web routes → Trip views: routes to (evidence: `frontend/src/App.jsx`)
- Web routes → Review views: routes to (evidence: `frontend/src/App.jsx`)
- Session context → API client: uses auth API (evidence: `frontend/src/context/AuthContext.jsx`)
- Review views → API client: loads reviews (evidence: `frontend/src/pages/ReviewManagementPage.jsx`)
- API client → HTTP API: HTTP requests
- HTTP API → Trip endpoints: maps controllers (evidence: `backend/Program.cs`)
- HTTP API → Booking endpoints: maps controllers (evidence: `backend/Program.cs`)
- HTTP API → Review endpoints: maps controllers (evidence: `backend/Program.cs`)
- Trip endpoints → Itinerary bridge: requests itinerary
- Booking endpoints → Booking services: delegates booking (evidence: `backend/Controllers/BookingsController.cs`)
- Review endpoints → Review services: delegates reviews (evidence: `backend/Controllers/ReviewsController.cs`)
- HTTP API → Travel catalog: registers services (evidence: `backend/Program.cs`)
- HTTP API → Payment services: registers services (evidence: `backend/Program.cs`)
- Itinerary bridge → AI service routes: posts itinerary request (evidence: `backend/Services/PlannerAgentService.cs`)
- AI service routes → Itinerary workflow: dispatches workflow (evidence: `ai-service/main.py`)
- AI service routes → Planning agents: loads agents (evidence: `ai-service/main.py`)
- Planning agents → Research agent: includes research
- Research agent → LLM provider: uses client
- Itinerary bridge → EF data context: maps itinerary stops (evidence: `backend/Services/PlannerAgentService.cs`)
- EF data context → PostgreSQL: reads and writes
- EF data context → Travel entities: maps entities (evidence: `backend/Data/AppDbContext.cs`)
- Review services → EF data context: queries and saves (evidence: `backend/Services/ReviewService.cs`)
- Booking services → EF data context: uses persistence
- Payment services → PayHere gateway: gateway integration
