# kipronofelix74-afk/hotel-planner architecture

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

- Interactive diagram: https://gitdiagram.com/kipronofelix74-afk/hotel-planner
- Repository: https://github.com/kipronofelix74-afk/hotel-planner

## Overview

HOTEL-PLANNER is a browser-based hotel stay planner. Users browse and filter hotels, select one, enter stay details, estimate a total, and save a booking; they can also review and delete saved bookings. The main behavior is implemented together in index.js, including a separate estimate calculator. The excerpts show requests to a server, and package.json documents a json-server command, but the API_URL value in the excerpt does not establish a working connection to that server. The README provides no further capability detail.

Main entry points: [`index.js`](https://github.com/kipronofelix74-afk/hotel-planner/blob/main/index.js) (Hotel browser), [`db.json`](https://github.com/kipronofelix74-afk/hotel-planner/blob/main/db.json) (App database)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_hotel_discovery["Hotel discovery"]
  node_hotel_browser["Hotel browser<br/>[index.js]"]
  node_hotel_filter_sort["Filter and sort<br/>[index.js]"]
  node_hotel_catalog_request["Catalog request<br/>[index.js]"]
end

subgraph group_stay_planning["Stay planning"]
  node_planner["Stay planner<br/>[index.js]"]
  node_estimate["Stay estimate<br/>[index.js]"]
  node_standalone_estimate["Standalone estimator<br/>[index.js]"]
end

subgraph group_booking_management["Booking management"]
  node_booking_form["Booking form<br/>[index.js]"]
  node_booking_request["Booking requests<br/>[index.js]"]
  node_booking_list["Booking list<br/>[index.js]"]
end

node_traveler(("Traveler"))
node_json_server["JSON Server"]
node_app_database[("App database<br/>[db.json]")]

node_traveler -->|"browses hotels"| node_hotel_browser
node_hotel_browser -->|"filters and sorts"| node_hotel_filter_sort
node_hotel_browser -->|"loads catalog"| node_hotel_catalog_request
node_hotel_browser -->|"selects hotel"| node_planner
node_planner -->|"calculates total"| node_estimate
node_traveler -->|"enters stay details"| node_standalone_estimate
node_traveler -->|"submits or deletes"| node_booking_form
node_booking_form -->|"saves or removes"| node_booking_request
node_booking_request -->|"reloads bookings"| node_booking_list
node_hotel_catalog_request -.->|"requests catalog"| node_json_server
node_booking_request -.->|"requests bookings"| node_json_server
node_json_server -.->|"serves data"| node_app_database

click node_hotel_browser "https://github.com/kipronofelix74-afk/hotel-planner/blob/main/index.js"
click node_hotel_filter_sort "https://github.com/kipronofelix74-afk/hotel-planner/blob/main/index.js"
click node_hotel_catalog_request "https://github.com/kipronofelix74-afk/hotel-planner/blob/main/index.js"
click node_planner "https://github.com/kipronofelix74-afk/hotel-planner/blob/main/index.js"
click node_estimate "https://github.com/kipronofelix74-afk/hotel-planner/blob/main/index.js"
click node_standalone_estimate "https://github.com/kipronofelix74-afk/hotel-planner/blob/main/index.js"
click node_booking_form "https://github.com/kipronofelix74-afk/hotel-planner/blob/main/index.js"
click node_booking_request "https://github.com/kipronofelix74-afk/hotel-planner/blob/main/index.js"
click node_booking_list "https://github.com/kipronofelix74-afk/hotel-planner/blob/main/index.js"
click node_app_database "https://github.com/kipronofelix74-afk/hotel-planner/blob/main/db.json"

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_hotel_browser,node_hotel_filter_sort,node_hotel_catalog_request toneBlue
class node_planner,node_estimate,node_standalone_estimate,node_app_database toneAmber
class node_booking_form,node_booking_request,node_booking_list,node_json_server toneMint
class node_traveler toneIndigo
```

## Components

### Hotel discovery

- [Hotel browser](https://github.com/kipronofelix74-afk/hotel-planner/blob/main/index.js): `index.js`
- [Filter and sort](https://github.com/kipronofelix74-afk/hotel-planner/blob/main/index.js): `index.js`
- [Catalog request](https://github.com/kipronofelix74-afk/hotel-planner/blob/main/index.js): `index.js`

### Stay planning

- [Stay planner](https://github.com/kipronofelix74-afk/hotel-planner/blob/main/index.js): `index.js`
- [Stay estimate](https://github.com/kipronofelix74-afk/hotel-planner/blob/main/index.js): `index.js`
- [Standalone estimator](https://github.com/kipronofelix74-afk/hotel-planner/blob/main/index.js): `index.js`

### Booking management

- [Booking form](https://github.com/kipronofelix74-afk/hotel-planner/blob/main/index.js): `index.js`
- [Booking requests](https://github.com/kipronofelix74-afk/hotel-planner/blob/main/index.js): `index.js`
- [Booking list](https://github.com/kipronofelix74-afk/hotel-planner/blob/main/index.js): `index.js`

### Other components

- **Traveler**
- **JSON Server**
- [App database](https://github.com/kipronofelix74-afk/hotel-planner/blob/main/db.json): `db.json`

## Connections

- Traveler → Hotel browser: browses hotels (evidence: `index.js`)
- Hotel browser → Filter and sort: filters and sorts (evidence: `index.js`)
- Hotel browser → Catalog request: loads catalog (evidence: `index.js`)
- Hotel browser → Stay planner: selects hotel (evidence: `index.js`)
- Stay planner → Stay estimate: calculates total (evidence: `index.js`)
- Traveler → Standalone estimator: enters stay details (evidence: `index.js`)
- Traveler → Booking form: submits or deletes (evidence: `index.js`)
- Booking form → Booking requests: saves or removes (evidence: `index.js`)
- Booking requests → Booking list: reloads bookings (evidence: `index.js`)
- Catalog request → JSON Server: requests catalog
- Booking requests → JSON Server: requests bookings
- JSON Server → App database: serves data
