# imxplorerdevelopement/hotel-check architecture

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

- Interactive diagram: https://gitdiagram.com/imxplorerdevelopement/hotel-check
- Repository: https://github.com/imxplorerdevelopement/hotel-check

## Overview

This repository is a set of hotel-availability research and quote-preparation tools, not a single automated booking pipeline. A user can check a hotel through a saved request recipe, query Agoda directly, or inspect browser-rendered booking pages with extraction snippets; trip data can separately be shaped into a client-facing spreadsheet payload. The source excerpts show the checker's registry/recipe handling and Agoda's external requests, but no README or evidence that these tools feed one another. The browser-discovery workflow and engine notes are represented as distinct capabilities.

Main entry points: [`check.py`](https://github.com/imxplorerdevelopement/hotel-check/blob/main/check.py) (Recipe Availability Check), [`agoda.py`](https://github.com/imxplorerdevelopement/hotel-check/blob/main/agoda.py) (Agoda Quote Lookup), [`customer_sheet.py`](https://github.com/imxplorerdevelopement/hotel-check/blob/main/customer_sheet.py) (Customer Sheet Builder), [`discover.py`](https://github.com/imxplorerdevelopement/hotel-check/blob/main/discover.py) (Request Capture)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_lookup["Hotel Lookup"]
  node_availability["Recipe Availability Check<br/>[check.py]"]
  node_registry["Hotel Registry<br/>[registry.json]"]
  node_recipes["Request Recipes"]
  node_availability_result["Normalized Availability<br/>[check.py]"]
  node_agoda["Agoda Quote Lookup<br/>[agoda.py]"]
end

subgraph group_capture["Browser Inspection"]
  node_discover["Request Capture<br/>[discover.py]"]
  node_agoda_extract["Agoda Page Extractor<br/>[agoda-page.js]"]
  node_grn_extract["GRN Connect Extractor<br/>[grn-page.js]"]
  node_mmt_extract["MakeMyTrip Extractor<br/>[mmt-page.js]"]
  node_engine_guides["Engine Guidance"]
end

subgraph group_presentation["Quote Preparation"]
  node_trip["Trip Options"]
  node_sheet_builder["Customer Sheet Builder<br/>[customer_sheet.py]"]
  node_sheet_payload["Spreadsheet Payload"]
end

node_user(("Researcher"))
node_booking_api{{"Booking Engine API"}}
node_agoda_api{{"Agoda Service"}}
node_fx_api{{"Exchange Rate Service"}}
node_booking_page["Booking Results Page"]

node_user -->|"requests check"| node_availability
node_availability -->|"reads hotel"| node_registry
node_availability -->|"loads recipe"| node_recipes
node_availability -->|"sends request"| node_booking_api
node_availability -->|"normalizes response"| node_availability_result
node_user -->|"requests quote"| node_agoda
node_agoda -->|"resolves hotel"| node_registry
node_agoda -->|"fetches offers"| node_agoda_api
node_agoda -->|"fetches rate"| node_fx_api
node_user -->|"captures requests"| node_discover
node_discover -->|"observes responses"| node_booking_page
node_user -->|"runs on page"| node_agoda_extract
node_user -->|"runs on page"| node_grn_extract
node_user -->|"runs on page"| node_mmt_extract
node_user -->|"builds options"| node_sheet_builder
node_sheet_builder -->|"reads trip"| node_trip
node_sheet_builder -->|"writes payload"| node_sheet_payload

click node_availability "https://github.com/imxplorerdevelopement/hotel-check/blob/main/check.py"
click node_registry "https://github.com/imxplorerdevelopement/hotel-check/blob/main/registry.json"
click node_recipes "https://github.com/imxplorerdevelopement/hotel-check/tree/main/recipes"
click node_availability_result "https://github.com/imxplorerdevelopement/hotel-check/blob/main/check.py"
click node_agoda "https://github.com/imxplorerdevelopement/hotel-check/blob/main/agoda.py"
click node_discover "https://github.com/imxplorerdevelopement/hotel-check/blob/main/discover.py"
click node_agoda_extract "https://github.com/imxplorerdevelopement/hotel-check/blob/main/agoda-page.js"
click node_grn_extract "https://github.com/imxplorerdevelopement/hotel-check/blob/main/grn-page.js"
click node_mmt_extract "https://github.com/imxplorerdevelopement/hotel-check/blob/main/mmt-page.js"
click node_engine_guides "https://github.com/imxplorerdevelopement/hotel-check/tree/main/engines"
click node_trip "https://github.com/imxplorerdevelopement/hotel-check/tree/main/trips"
click node_sheet_builder "https://github.com/imxplorerdevelopement/hotel-check/blob/main/customer_sheet.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_availability,node_registry,node_recipes,node_availability_result,node_agoda toneBlue
class node_discover,node_agoda_extract,node_grn_extract,node_mmt_extract,node_engine_guides toneAmber
class node_trip,node_sheet_builder,node_sheet_payload,node_booking_api toneMint
class node_user,node_agoda_api,node_fx_api,node_booking_page toneIndigo
```

## Components

### Hotel Lookup

- [Recipe Availability Check](https://github.com/imxplorerdevelopement/hotel-check/blob/main/check.py): `check.py`
- [Hotel Registry](https://github.com/imxplorerdevelopement/hotel-check/blob/main/registry.json): `registry.json`
- [Request Recipes](https://github.com/imxplorerdevelopement/hotel-check/tree/main/recipes): `recipes`
- [Normalized Availability](https://github.com/imxplorerdevelopement/hotel-check/blob/main/check.py): `check.py`
- [Agoda Quote Lookup](https://github.com/imxplorerdevelopement/hotel-check/blob/main/agoda.py): `agoda.py`

### Browser Inspection

- [Request Capture](https://github.com/imxplorerdevelopement/hotel-check/blob/main/discover.py): `discover.py`
- [Agoda Page Extractor](https://github.com/imxplorerdevelopement/hotel-check/blob/main/agoda-page.js): `agoda-page.js`
- [GRN Connect Extractor](https://github.com/imxplorerdevelopement/hotel-check/blob/main/grn-page.js): `grn-page.js`
- [MakeMyTrip Extractor](https://github.com/imxplorerdevelopement/hotel-check/blob/main/mmt-page.js): `mmt-page.js`
- [Engine Guidance](https://github.com/imxplorerdevelopement/hotel-check/tree/main/engines): `engines`

### Quote Preparation

- [Trip Options](https://github.com/imxplorerdevelopement/hotel-check/tree/main/trips): `trips`
- [Customer Sheet Builder](https://github.com/imxplorerdevelopement/hotel-check/blob/main/customer_sheet.py): `customer_sheet.py`
- **Spreadsheet Payload**

### Other components

- **Researcher**
- **Booking Engine API**
- **Agoda Service**
- **Exchange Rate Service**
- **Booking Results Page**

## Connections

- Researcher → Recipe Availability Check: requests check (evidence: `check.py`)
- Recipe Availability Check → Hotel Registry: reads hotel (evidence: `check.py`)
- Recipe Availability Check → Request Recipes: loads recipe (evidence: `check.py`)
- Recipe Availability Check → Booking Engine API: sends request (evidence: `check.py`)
- Recipe Availability Check → Normalized Availability: normalizes response (evidence: `check.py`)
- Researcher → Agoda Quote Lookup: requests quote (evidence: `agoda.py`)
- Agoda Quote Lookup → Hotel Registry: resolves hotel (evidence: `agoda.py`)
- Agoda Quote Lookup → Agoda Service: fetches offers (evidence: `agoda.py`)
- Agoda Quote Lookup → Exchange Rate Service: fetches rate (evidence: `agoda.py`)
- Researcher → Request Capture: captures requests (evidence: `discover.py`)
- Request Capture → Booking Results Page: observes responses (evidence: `discover.py`)
- Researcher → Agoda Page Extractor: runs on page (evidence: `agoda-page.js`)
- Researcher → GRN Connect Extractor: runs on page (evidence: `grn-page.js`)
- Researcher → MakeMyTrip Extractor: runs on page (evidence: `mmt-page.js`)
- Researcher → Customer Sheet Builder: builds options (evidence: `customer_sheet.py`)
- Customer Sheet Builder → Trip Options: reads trip (evidence: `customer_sheet.py`)
- Customer Sheet Builder → Spreadsheet Payload: writes payload (evidence: `customer_sheet.py`)
