# dubaiguide-biz/dubaiguide architecture

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

- Interactive diagram: https://gitdiagram.com/dubaiguide-biz/dubaiguide
- Repository: https://github.com/dubaiguide-biz/dubaiguide

## Overview

DubaiGuide is a Dubai advice and matching website. Users choose a property, business-setup, or credit-card quiz, receive an AI-generated recommendation and relevant links, and can submit contact details for follow-up. The main internal layer is the server-side matching endpoint, which prepares prompts, calls Anthropic, and formats results. The README documents property and business quizzes; the sampled matcher also supports credit cards. Guide pages provide a separate informational branch. Frontend and guide contents were not sampled, so some connections are left unverified.

Main entry points: [`api/match.js`](https://github.com/dubaiguide-biz/dubaiguide/blob/main/api/match.js) (Recommendation handler), [`assets/quiz.js`](https://github.com/dubaiguide-biz/dubaiguide/blob/main/assets/quiz.js) (Quiz interactions), [`property/index.html`](https://github.com/dubaiguide-biz/dubaiguide/blob/main/property/index.html) (Property quiz), [`business/index.html`](https://github.com/dubaiguide-biz/dubaiguide/blob/main/business/index.html) (Business quiz)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Website"]
  node_home["Home page<br/>[index.html]"]
  node_property["Property quiz<br/>[index.html]"]
  node_business["Business quiz<br/>[index.html]"]
  node_cards["Credit-card quiz<br/>[index.html]"]
  node_quizjs["Quiz interactions<br/>[quiz.js]"]
end

subgraph group_match["Matching"]
  node_matcher["Recommendation handler<br/>[match.js]"]
  node_anthropic["Anthropic API"]
  node_bayut["Bayut listings and market data"]
  node_businesslinks["Business setup links<br/>[match.js]"]
  node_banklinks["Card application links<br/>[match.js]"]
end

subgraph group_leads["Lead follow-up"]
  node_leadform["Lead submission<br/>[quiz.js]"]
  node_leadhandler["Lead handler<br/>[lead.js]"]
  node_resend["Resend email"]
end

subgraph group_guides["Guides and information"]
  node_propertyguides["Property guides"]
  node_businessguides["Business guides"]
  node_about["About<br/>[index.html]"]
  node_privacy["Privacy policy<br/>[index.html]"]
end

node_visitor(("Site visitor"))

node_visitor -->|"visits"| node_home
node_visitor -->|"takes quiz"| node_property
node_visitor -->|"takes quiz"| node_business
node_visitor -.->|"takes quiz"| node_cards
node_property -.->|"uses interactions"| node_quizjs
node_business -.->|"uses interactions"| node_quizjs
node_cards -.->|"uses interactions"| node_quizjs
node_quizjs -.->|"requests match"| node_matcher
node_matcher -->|"requests recommendation"| node_anthropic
node_matcher -->|"builds listing links"| node_bayut
node_matcher -->|"builds setup links"| node_businesslinks
node_matcher -->|"builds card links"| node_banklinks
node_quizjs -.->|"collects contact"| node_leadform
node_leadform -.->|"submits lead"| node_leadhandler
node_leadhandler -->|"sends email"| node_resend
node_visitor -.->|"reads guides"| node_propertyguides
node_visitor -.->|"reads guides"| node_businessguides
node_visitor -.->|"visits"| node_about
node_visitor -.->|"visits"| node_privacy

click node_home "https://github.com/dubaiguide-biz/dubaiguide/blob/main/index.html"
click node_property "https://github.com/dubaiguide-biz/dubaiguide/blob/main/property/index.html"
click node_business "https://github.com/dubaiguide-biz/dubaiguide/blob/main/business/index.html"
click node_cards "https://github.com/dubaiguide-biz/dubaiguide/blob/main/credit-cards/index.html"
click node_quizjs "https://github.com/dubaiguide-biz/dubaiguide/blob/main/assets/quiz.js"
click node_matcher "https://github.com/dubaiguide-biz/dubaiguide/blob/main/api/match.js"
click node_businesslinks "https://github.com/dubaiguide-biz/dubaiguide/blob/main/api/match.js"
click node_banklinks "https://github.com/dubaiguide-biz/dubaiguide/blob/main/api/match.js"
click node_leadform "https://github.com/dubaiguide-biz/dubaiguide/blob/main/assets/quiz.js"
click node_leadhandler "https://github.com/dubaiguide-biz/dubaiguide/blob/main/api/lead.js"
click node_propertyguides "https://github.com/dubaiguide-biz/dubaiguide/tree/main/property/guides"
click node_businessguides "https://github.com/dubaiguide-biz/dubaiguide/tree/main/business/guides"
click node_about "https://github.com/dubaiguide-biz/dubaiguide/blob/main/about/index.html"
click node_privacy "https://github.com/dubaiguide-biz/dubaiguide/blob/main/privacy-policy/index.html"

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_home,node_property,node_business,node_cards,node_quizjs toneBlue
class node_matcher,node_anthropic,node_bayut,node_businesslinks,node_banklinks toneAmber
class node_leadform,node_leadhandler,node_resend toneMint
class node_propertyguides,node_businessguides,node_about,node_privacy toneRose
class node_visitor toneIndigo
```

## Components

### Website

- [Home page](https://github.com/dubaiguide-biz/dubaiguide/blob/main/index.html): `index.html`
- [Property quiz](https://github.com/dubaiguide-biz/dubaiguide/blob/main/property/index.html): `property/index.html`
- [Business quiz](https://github.com/dubaiguide-biz/dubaiguide/blob/main/business/index.html): `business/index.html`
- [Credit-card quiz](https://github.com/dubaiguide-biz/dubaiguide/blob/main/credit-cards/index.html): `credit-cards/index.html`
- [Quiz interactions](https://github.com/dubaiguide-biz/dubaiguide/blob/main/assets/quiz.js): `assets/quiz.js`

### Matching

- [Recommendation handler](https://github.com/dubaiguide-biz/dubaiguide/blob/main/api/match.js): `api/match.js`
- **Anthropic API**
- **Bayut listings and market data**
- [Business setup links](https://github.com/dubaiguide-biz/dubaiguide/blob/main/api/match.js): `api/match.js`
- [Card application links](https://github.com/dubaiguide-biz/dubaiguide/blob/main/api/match.js): `api/match.js`

### Lead follow-up

- [Lead submission](https://github.com/dubaiguide-biz/dubaiguide/blob/main/assets/quiz.js): `assets/quiz.js`
- [Lead handler](https://github.com/dubaiguide-biz/dubaiguide/blob/main/api/lead.js): `api/lead.js`
- **Resend email**

### Guides and information

- [Property guides](https://github.com/dubaiguide-biz/dubaiguide/tree/main/property/guides): `property/guides`
- [Business guides](https://github.com/dubaiguide-biz/dubaiguide/tree/main/business/guides): `business/guides`
- [About](https://github.com/dubaiguide-biz/dubaiguide/blob/main/about/index.html): `about/index.html`
- [Privacy policy](https://github.com/dubaiguide-biz/dubaiguide/blob/main/privacy-policy/index.html): `privacy-policy/index.html`

### Other components

- **Site visitor**

## Connections

- Site visitor → Home page: visits (evidence: `README.md`)
- Site visitor → Property quiz: takes quiz (evidence: `README.md`)
- Site visitor → Business quiz: takes quiz (evidence: `README.md`)
- Site visitor → Credit-card quiz: takes quiz
- Property quiz → Quiz interactions: uses interactions
- Business quiz → Quiz interactions: uses interactions
- Credit-card quiz → Quiz interactions: uses interactions
- Quiz interactions → Recommendation handler: requests match
- Recommendation handler → Anthropic API: requests recommendation (evidence: `api/match.js`)
- Recommendation handler → Bayut listings and market data: builds listing links (evidence: `api/match.js`)
- Recommendation handler → Business setup links: builds setup links (evidence: `api/match.js`)
- Recommendation handler → Card application links: builds card links (evidence: `api/match.js`)
- Quiz interactions → Lead submission: collects contact
- Lead submission → Lead handler: submits lead
- Lead handler → Resend email: sends email (evidence: `api/lead.js`)
- Site visitor → Property guides: reads guides
- Site visitor → Business guides: reads guides
- Site visitor → About: visits
- Site visitor → Privacy policy: visits
