# p5po/rukn-al-harmalah-wibsite-1 architecture

> Architecture diagram of the GitHub repository p5po/rukn-al-harmalah-wibsite-1, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-17). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/p5po/rukn-al-harmalah-wibsite-1
- Repository: https://github.com/p5po/rukn-al-harmalah-wibsite-1

## Overview

This repository contains a real-estate listings storefront and a separate offline interactive land-planning map. The storefront workflow fetches property data from Google Sheets, normalizes and filters it, displays listings, and offers WhatsApp inquiry paths. The map workflow loads registered plan data and supports parcel lookup and map-based review; the tree also shows separate street, imagery, land-administration, and map-style capabilities. Edges are limited to relationships visible in excerpts or explicitly documented in the README; several map subsystems are represented without guessed connections.

Main entry points: [`js/app.js`](https://github.com/p5po/rukn-al-harmalah-wibsite-1/blob/main/js/app.js) (Listings engine), [`map/js/app.js`](https://github.com/p5po/rukn-al-harmalah-wibsite-1/blob/main/map/js/app.js) (Map application), [`map/data/registry.js`](https://github.com/p5po/rukn-al-harmalah-wibsite-1/blob/main/map/data/registry.js) (Plan registry), [`map/data/plans`](https://github.com/p5po/rukn-al-harmalah-wibsite-1/tree/main/map/data/plans) (Plan parcels)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_storefront["Listings storefront"]
  node_storefront_engine["Listings engine<br/>[app.js]"]
  node_listings["Property listings<br/>[app.js]"]
end

subgraph group_map_core["Map and parcels"]
  node_map_app["Map application<br/>[app.js]"]
  node_plan_registry["Plan registry<br/>[registry.js]"]
  node_plan_geometry["Plan parcels"]
  node_parcel_review["Parcel review<br/>[parcel_review.js]"]
  node_sales_status["Sales status<br/>[sales_status.js]"]
end

subgraph group_map_layers["Map layers"]
  node_basemap["OSM basemap<br/>[basemap_osm.js]"]
  node_suhail_roads["Suhail streets"]
  node_satellite_tiles["Satellite imagery<br/>[12_322_220.js]"]
  node_imagery_controls["Imagery controls<br/>[imagery.js]"]
  node_planned_roads["Planned roads<br/>[planned.js]"]
  node_map_styles["Map styles<br/>[realistic.js]"]
end

subgraph group_map_tools["Map tools"]
  node_street_lengths["Street lengths<br/>[street_len.js]"]
  node_side_measurements["Side measurements<br/>[sides.js]"]
  node_land_admin["Land administration<br/>[land_view.js]"]
  node_land_store[("Local land store<br/>[land_store.js]")]
  node_admin_auth["Admin authentication<br/>[admin_auth.js]"]
  node_qr_generator["QR generator"]
end

node_visitor(("Property visitor"))
node_sheets[("Google Sheets")]
node_whatsapp["WhatsApp"]
node_map_user(("Map user"))

node_visitor -->|"browses"| node_storefront_engine
node_storefront_engine -->|"fetches CSV"| node_sheets
node_storefront_engine -->|"filters and renders"| node_listings
node_storefront_engine -->|"offers inquiries"| node_whatsapp
node_map_user -.->|"uses map"| node_map_app
node_map_app -->|"reads registry"| node_plan_registry
node_map_app -->|"loads plans"| node_plan_geometry

click node_storefront_engine "https://github.com/p5po/rukn-al-harmalah-wibsite-1/blob/main/js/app.js"
click node_listings "https://github.com/p5po/rukn-al-harmalah-wibsite-1/blob/main/js/app.js"
click node_map_app "https://github.com/p5po/rukn-al-harmalah-wibsite-1/blob/main/map/js/app.js"
click node_plan_registry "https://github.com/p5po/rukn-al-harmalah-wibsite-1/blob/main/map/data/registry.js"
click node_plan_geometry "https://github.com/p5po/rukn-al-harmalah-wibsite-1/tree/main/map/data/plans"
click node_parcel_review "https://github.com/p5po/rukn-al-harmalah-wibsite-1/blob/main/map/data/parcel_review.js"
click node_sales_status "https://github.com/p5po/rukn-al-harmalah-wibsite-1/blob/main/map/data/sales_status.js"
click node_basemap "https://github.com/p5po/rukn-al-harmalah-wibsite-1/blob/main/map/data/basemap_osm.js"
click node_suhail_roads "https://github.com/p5po/rukn-al-harmalah-wibsite-1/blob/main/map/data/suhail_v160_7plans.js"
click node_satellite_tiles "https://github.com/p5po/rukn-al-harmalah-wibsite-1/blob/main/map/data/imagery/copernicus_s2/12_322_220.js"
click node_imagery_controls "https://github.com/p5po/rukn-al-harmalah-wibsite-1/blob/main/map/js/imagery.js"
click node_planned_roads "https://github.com/p5po/rukn-al-harmalah-wibsite-1/blob/main/map/js/planned.js"
click node_map_styles "https://github.com/p5po/rukn-al-harmalah-wibsite-1/blob/main/map/js/realistic.js"
click node_street_lengths "https://github.com/p5po/rukn-al-harmalah-wibsite-1/blob/main/map/js/street_len.js"
click node_side_measurements "https://github.com/p5po/rukn-al-harmalah-wibsite-1/blob/main/map/js/sides.js"
click node_land_admin "https://github.com/p5po/rukn-al-harmalah-wibsite-1/blob/main/map/js/land_view.js"
click node_land_store "https://github.com/p5po/rukn-al-harmalah-wibsite-1/blob/main/map/js/land_store.js"
click node_admin_auth "https://github.com/p5po/rukn-al-harmalah-wibsite-1/blob/main/map/js/admin_auth.js"
click node_qr_generator "https://github.com/p5po/rukn-al-harmalah-wibsite-1/blob/main/map/lib/qrcode-generator.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_storefront_engine,node_listings,node_map_user toneBlue
class node_map_app,node_plan_registry,node_plan_geometry,node_parcel_review,node_sales_status,node_sheets toneAmber
class node_basemap,node_suhail_roads,node_satellite_tiles,node_imagery_controls,node_planned_roads,node_map_styles toneMint
class node_street_lengths,node_side_measurements,node_land_admin,node_land_store,node_admin_auth,node_qr_generator toneRose
class node_visitor,node_whatsapp toneIndigo
```

## Components

### Listings storefront

- [Listings engine](https://github.com/p5po/rukn-al-harmalah-wibsite-1/blob/main/js/app.js): `js/app.js`
- [Property listings](https://github.com/p5po/rukn-al-harmalah-wibsite-1/blob/main/js/app.js): `js/app.js`

### Map and parcels

- [Map application](https://github.com/p5po/rukn-al-harmalah-wibsite-1/blob/main/map/js/app.js): `map/js/app.js`
- [Plan registry](https://github.com/p5po/rukn-al-harmalah-wibsite-1/blob/main/map/data/registry.js): `map/data/registry.js`
- [Plan parcels](https://github.com/p5po/rukn-al-harmalah-wibsite-1/tree/main/map/data/plans): `map/data/plans`
- [Parcel review](https://github.com/p5po/rukn-al-harmalah-wibsite-1/blob/main/map/data/parcel_review.js): `map/data/parcel_review.js`
- [Sales status](https://github.com/p5po/rukn-al-harmalah-wibsite-1/blob/main/map/data/sales_status.js): `map/data/sales_status.js`

### Map layers

- [OSM basemap](https://github.com/p5po/rukn-al-harmalah-wibsite-1/blob/main/map/data/basemap_osm.js): `map/data/basemap_osm.js`
- [Suhail streets](https://github.com/p5po/rukn-al-harmalah-wibsite-1/blob/main/map/data/suhail_v160_7plans.js): `map/data/suhail_v160_7plans.js`
- [Satellite imagery](https://github.com/p5po/rukn-al-harmalah-wibsite-1/blob/main/map/data/imagery/copernicus_s2/12_322_220.js): `map/data/imagery/copernicus_s2/12_322_220.js`
- [Imagery controls](https://github.com/p5po/rukn-al-harmalah-wibsite-1/blob/main/map/js/imagery.js): `map/js/imagery.js`
- [Planned roads](https://github.com/p5po/rukn-al-harmalah-wibsite-1/blob/main/map/js/planned.js): `map/js/planned.js`
- [Map styles](https://github.com/p5po/rukn-al-harmalah-wibsite-1/blob/main/map/js/realistic.js): `map/js/realistic.js`

### Map tools

- [Street lengths](https://github.com/p5po/rukn-al-harmalah-wibsite-1/blob/main/map/js/street_len.js): `map/js/street_len.js`
- [Side measurements](https://github.com/p5po/rukn-al-harmalah-wibsite-1/blob/main/map/js/sides.js): `map/js/sides.js`
- [Land administration](https://github.com/p5po/rukn-al-harmalah-wibsite-1/blob/main/map/js/land_view.js): `map/js/land_view.js`
- [Local land store](https://github.com/p5po/rukn-al-harmalah-wibsite-1/blob/main/map/js/land_store.js): `map/js/land_store.js`
- [Admin authentication](https://github.com/p5po/rukn-al-harmalah-wibsite-1/blob/main/map/js/admin_auth.js): `map/js/admin_auth.js`
- [QR generator](https://github.com/p5po/rukn-al-harmalah-wibsite-1/blob/main/map/lib/qrcode-generator.js): `map/lib/qrcode-generator.js`

### Other components

- **Property visitor**
- **Google Sheets**
- **WhatsApp**
- **Map user**

## Connections

- Property visitor → Listings engine: browses (evidence: `js/app.js`)
- Listings engine → Google Sheets: fetches CSV (evidence: `js/app.js`)
- Listings engine → Property listings: filters and renders (evidence: `js/app.js`)
- Listings engine → WhatsApp: offers inquiries (evidence: `README.md`)
- Map user → Map application: uses map
- Map application → Plan registry: reads registry (evidence: `map/js/app.js`)
- Map application → Plan parcels: loads plans (evidence: `map/js/app.js`)
