# awalkhan80/dsp-website architecture

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

- Interactive diagram: https://gitdiagram.com/awalkhan80/dsp-website
- Repository: https://github.com/awalkhan80/dsp-website

## Overview

Desert Safari DXB Pro is a tour-discovery and booking-request website, with a customer-facing storefront, operator administration, and chat-assisted inquiries. Visitors browse safari, buggy, and city-tour offerings, then use the booking interface or chat; staff manage tour information, availability, supplier imports, and search visibility. The README documents a Node-hosted chat API, while sampled sources also reveal separate chatbot and Python-agent implementations. Some application and server wiring is unsampled, so those connections are included only where the README or source index supports them.

Main entry points: [`src/App.tsx`](https://github.com/awalkhan80/dsp-website/blob/main/src/App.tsx) (Storefront app), [`src/components/admin/AdminDashboard.tsx`](https://github.com/awalkhan80/dsp-website/blob/main/src/components/admin/AdminDashboard.tsx) (Admin dashboard), [`src/data/safaris.ts`](https://github.com/awalkhan80/dsp-website/blob/main/src/data/safaris.ts) (Tour catalog), [`phoenix-chatbot/server.js`](https://github.com/awalkhan80/dsp-website/blob/main/phoenix-chatbot/server.js) (Chatbot service)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_storefront["Tour storefront"]
  node_app["Storefront app<br/>[App.tsx]"]
  node_catalog["Tour catalog<br/>[safaris.ts]"]
  node_tour_discovery["Tour discovery"]
  node_city_tours["City tours"]
  node_guides["Travel guides"]
  node_reviews["Guest reviews<br/>[ReviewsSection.tsx]"]
  node_structured_data["Structured data"]
end

subgraph group_booking["Booking and chat"]
  node_booking_modal["Booking form<br/>[BookingModal.tsx]"]
  node_ai_widget["AI booking widget"]
  node_chat_widget["Chat widget<br/>[chat-widget.js]"]
end

subgraph group_operations["Operator administration"]
  node_admin["Admin dashboard<br/>[AdminDashboard.tsx]"]
  node_admin_auth["Admin authentication<br/>[adminAuth.ts]"]
  node_availability["Tour availability"]
  node_supplier["B2B supplier tools"]
  node_knowledge["Knowledge base"]
  node_seo_audit["SEO audit"]
  node_seo_keywords["SEO keywords<br/>[seoKeywords.ts]"]
end

subgraph group_services["Server services"]
  node_main_server["Website and chat API<br/>[server.ts]"]
  node_legacy_chat_server["Chatbot service<br/>[server.js]"]
  node_chatbot_logic["Chatbot logic<br/>[chatbot.js]"]
  node_python_app["Python agent app<br/>[app.py]"]
  node_python_agent["Python agent<br/>[agent.py]"]
  node_node_launcher["Node launcher<br/>[server.js]"]
end

node_visitor(("Visitor"))
node_gemini{{"Gemini API"}}
node_anthropic{{"Anthropic API"}}

node_visitor -->|"browses"| node_app
node_app -->|"renders"| node_tour_discovery
node_app -->|"renders"| node_city_tours
node_app -->|"renders"| node_guides
node_app -->|"renders"| node_reviews
node_app -->|"renders"| node_structured_data
node_app -->|"opens"| node_booking_modal
node_tour_discovery -->|"reads"| node_catalog
node_city_tours -->|"reads"| node_catalog
node_visitor -->|"asks"| node_ai_widget
node_ai_widget -->|"requests chat"| node_main_server
node_main_server -.->|"generates replies"| node_gemini
node_app -->|"opens portal"| node_admin
node_admin -->|"checks session"| node_admin_auth
node_admin -->|"renders"| node_availability
node_admin -->|"renders"| node_supplier
node_admin -->|"renders"| node_knowledge
node_admin -->|"renders"| node_seo_audit
node_seo_audit -->|"reads"| node_catalog
node_admin -->|"loads tour data"| node_catalog
node_seo_keywords -.->|"supports audits"| node_seo_audit
node_node_launcher -->|"starts"| node_main_server
node_legacy_chat_server -->|"requests replies"| node_anthropic
node_legacy_chat_server -.->|"uses"| node_chatbot_logic
node_legacy_chat_server -->|"serves files"| node_chat_widget
node_python_app -->|"imports"| node_python_agent

click node_app "https://github.com/awalkhan80/dsp-website/blob/main/src/App.tsx"
click node_catalog "https://github.com/awalkhan80/dsp-website/blob/main/src/data/safaris.ts"
click node_tour_discovery "https://github.com/awalkhan80/dsp-website/blob/main/src/components/AdrenalineBuggySection.tsx"
click node_city_tours "https://github.com/awalkhan80/dsp-website/blob/main/src/components/CityToursSection.tsx"
click node_guides "https://github.com/awalkhan80/dsp-website/blob/main/src/components/TravelGuidesSection.tsx"
click node_reviews "https://github.com/awalkhan80/dsp-website/blob/main/src/components/ReviewsSection.tsx"
click node_structured_data "https://github.com/awalkhan80/dsp-website/blob/main/src/components/JsonLdStructuredData.tsx"
click node_booking_modal "https://github.com/awalkhan80/dsp-website/blob/main/src/components/BookingModal.tsx"
click node_ai_widget "https://github.com/awalkhan80/dsp-website/blob/main/src/components/AiBookingAgentWidget.tsx"
click node_main_server "https://github.com/awalkhan80/dsp-website/blob/main/server.ts"
click node_admin "https://github.com/awalkhan80/dsp-website/blob/main/src/components/admin/AdminDashboard.tsx"
click node_admin_auth "https://github.com/awalkhan80/dsp-website/blob/main/src/utils/adminAuth.ts"
click node_availability "https://github.com/awalkhan80/dsp-website/blob/main/src/components/admin/ToursAvailabilityTab.tsx"
click node_supplier "https://github.com/awalkhan80/dsp-website/blob/main/src/components/admin/B2BIntegrationManager.tsx"
click node_knowledge "https://github.com/awalkhan80/dsp-website/blob/main/src/components/admin/KnowledgeBaseTab.tsx"
click node_seo_audit "https://github.com/awalkhan80/dsp-website/blob/main/src/components/admin/SeoAuditDashboard.tsx"
click node_seo_keywords "https://github.com/awalkhan80/dsp-website/blob/main/src/data/seoKeywords.ts"
click node_legacy_chat_server "https://github.com/awalkhan80/dsp-website/blob/main/phoenix-chatbot/server.js"
click node_chatbot_logic "https://github.com/awalkhan80/dsp-website/blob/main/phoenix-chatbot/chatbot.js"
click node_chat_widget "https://github.com/awalkhan80/dsp-website/blob/main/phoenix-chatbot/public/chat-widget.js"
click node_python_app "https://github.com/awalkhan80/dsp-website/blob/main/phoenix_agent/app.py"
click node_python_agent "https://github.com/awalkhan80/dsp-website/blob/main/phoenix_agent/agent.py"
click node_node_launcher "https://github.com/awalkhan80/dsp-website/blob/main/server.js"

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_catalog,node_tour_discovery,node_city_tours,node_guides,node_reviews,node_structured_data toneBlue
class node_booking_modal,node_ai_widget,node_chat_widget toneAmber
class node_admin,node_admin_auth,node_availability,node_supplier,node_knowledge,node_seo_audit,node_seo_keywords,node_gemini,node_anthropic toneMint
class node_main_server,node_legacy_chat_server,node_chatbot_logic,node_python_app,node_python_agent,node_node_launcher toneRose
class node_visitor toneIndigo
```

## Components

### Tour storefront

- [Storefront app](https://github.com/awalkhan80/dsp-website/blob/main/src/App.tsx): `src/App.tsx`
- [Tour catalog](https://github.com/awalkhan80/dsp-website/blob/main/src/data/safaris.ts): `src/data/safaris.ts`
- [Tour discovery](https://github.com/awalkhan80/dsp-website/blob/main/src/components/AdrenalineBuggySection.tsx): `src/components/AdrenalineBuggySection.tsx`
- [City tours](https://github.com/awalkhan80/dsp-website/blob/main/src/components/CityToursSection.tsx): `src/components/CityToursSection.tsx`
- [Travel guides](https://github.com/awalkhan80/dsp-website/blob/main/src/components/TravelGuidesSection.tsx): `src/components/TravelGuidesSection.tsx`
- [Guest reviews](https://github.com/awalkhan80/dsp-website/blob/main/src/components/ReviewsSection.tsx): `src/components/ReviewsSection.tsx`
- [Structured data](https://github.com/awalkhan80/dsp-website/blob/main/src/components/JsonLdStructuredData.tsx): `src/components/JsonLdStructuredData.tsx`

### Booking and chat

- [Booking form](https://github.com/awalkhan80/dsp-website/blob/main/src/components/BookingModal.tsx): `src/components/BookingModal.tsx`
- [AI booking widget](https://github.com/awalkhan80/dsp-website/blob/main/src/components/AiBookingAgentWidget.tsx): `src/components/AiBookingAgentWidget.tsx`
- [Chat widget](https://github.com/awalkhan80/dsp-website/blob/main/phoenix-chatbot/public/chat-widget.js): `phoenix-chatbot/public/chat-widget.js`

### Operator administration

- [Admin dashboard](https://github.com/awalkhan80/dsp-website/blob/main/src/components/admin/AdminDashboard.tsx): `src/components/admin/AdminDashboard.tsx`
- [Admin authentication](https://github.com/awalkhan80/dsp-website/blob/main/src/utils/adminAuth.ts): `src/utils/adminAuth.ts`
- [Tour availability](https://github.com/awalkhan80/dsp-website/blob/main/src/components/admin/ToursAvailabilityTab.tsx): `src/components/admin/ToursAvailabilityTab.tsx`
- [B2B supplier tools](https://github.com/awalkhan80/dsp-website/blob/main/src/components/admin/B2BIntegrationManager.tsx): `src/components/admin/B2BIntegrationManager.tsx`
- [Knowledge base](https://github.com/awalkhan80/dsp-website/blob/main/src/components/admin/KnowledgeBaseTab.tsx): `src/components/admin/KnowledgeBaseTab.tsx`
- [SEO audit](https://github.com/awalkhan80/dsp-website/blob/main/src/components/admin/SeoAuditDashboard.tsx): `src/components/admin/SeoAuditDashboard.tsx`
- [SEO keywords](https://github.com/awalkhan80/dsp-website/blob/main/src/data/seoKeywords.ts): `src/data/seoKeywords.ts`

### Server services

- [Website and chat API](https://github.com/awalkhan80/dsp-website/blob/main/server.ts): `server.ts`
- [Chatbot service](https://github.com/awalkhan80/dsp-website/blob/main/phoenix-chatbot/server.js): `phoenix-chatbot/server.js`
- [Chatbot logic](https://github.com/awalkhan80/dsp-website/blob/main/phoenix-chatbot/chatbot.js): `phoenix-chatbot/chatbot.js`
- [Python agent app](https://github.com/awalkhan80/dsp-website/blob/main/phoenix_agent/app.py): `phoenix_agent/app.py`
- [Python agent](https://github.com/awalkhan80/dsp-website/blob/main/phoenix_agent/agent.py): `phoenix_agent/agent.py`
- [Node launcher](https://github.com/awalkhan80/dsp-website/blob/main/server.js): `server.js`

### Other components

- **Visitor**
- **Gemini API**
- **Anthropic API**

## Connections

- Visitor → Storefront app: browses (evidence: `src/App.tsx`)
- Storefront app → Tour discovery: renders (evidence: `src/App.tsx`)
- Storefront app → City tours: renders (evidence: `src/App.tsx`)
- Storefront app → Travel guides: renders (evidence: `src/App.tsx`)
- Storefront app → Guest reviews: renders (evidence: `src/App.tsx`)
- Storefront app → Structured data: renders (evidence: `src/App.tsx`)
- Storefront app → Booking form: opens (evidence: `src/App.tsx`)
- Tour discovery → Tour catalog: reads (evidence: `src/components/AdrenalineBuggySection.tsx`)
- City tours → Tour catalog: reads (evidence: `src/components/CityToursSection.tsx`)
- Visitor → AI booking widget: asks (evidence: `README.md`)
- AI booking widget → Website and chat API: requests chat (evidence: `README.md`)
- Website and chat API → Gemini API: generates replies (evidence: `README.md`)
- Storefront app → Admin dashboard: opens portal (evidence: `src/App.tsx`)
- Admin dashboard → Admin authentication: checks session (evidence: `src/App.tsx`)
- Admin dashboard → Tour availability: renders (evidence: `src/components/admin/AdminDashboard.tsx`)
- Admin dashboard → B2B supplier tools: renders (evidence: `src/components/admin/AdminDashboard.tsx`)
- Admin dashboard → Knowledge base: renders (evidence: `src/components/admin/AdminDashboard.tsx`)
- Admin dashboard → SEO audit: renders (evidence: `src/components/admin/AdminDashboard.tsx`)
- SEO audit → Tour catalog: reads (evidence: `src/components/admin/SeoAuditDashboard.tsx`)
- Admin dashboard → Tour catalog: loads tour data (evidence: `src/components/admin/AdminDashboard.tsx`)
- SEO keywords → SEO audit: supports audits
- Node launcher → Website and chat API: starts (evidence: `README.md`)
- Chatbot service → Anthropic API: requests replies (evidence: `phoenix-chatbot/server.js`)
- Chatbot service → Chatbot logic: uses
- Chatbot service → Chat widget: serves files (evidence: `phoenix-chatbot/server.js`)
- Python agent app → Python agent: imports (evidence: `phoenix_agent/app.py`)
