# ceekay-munshot/land architecture

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

- Interactive diagram: https://gitdiagram.com/ceekay-munshot/land
- Repository: https://github.com/ceekay-munshot/land

## Overview

LAND is a browser-based NCR land-intelligence tool: users navigate from the regional map to a tehsil, village, and parcel, then inspect parcel details, growth signals, and ownership history to inform a buying shortlist. Its runtime map combines parcel layers, search/selection, satellite imagery, scoring, and YEIDA schemes. Data-preparation branches gather parcel, geometry, catalyst, scheme, and ownership-history data for the site. The README documents several capabilities whose implementation was not sampled; those links are shown only where documented, and unsampled subsystems use directory paths.

Main entry points: [`web/data`](https://github.com/ceekay-munshot/land/tree/main/web/data) (Map datasets), [`tools/fetch_bhunaksha_geom.py`](https://github.com/ceekay-munshot/land/blob/main/tools/fetch_bhunaksha_geom.py) (Raster geometry tracing), [`tools/fetch_yeida_firecrawl.py`](https://github.com/ceekay-munshot/land/blob/main/tools/fetch_yeida_firecrawl.py) (Scheme scraping), [`web/app.js`](https://github.com/ceekay-munshot/land/blob/main/web/app.js) (Parcel explorer)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_site["Map and exploration"]
  node_map["Interactive map<br/>[app.js]"]
  node_site_data["Map datasets"]
  node_parcel_explorer["Parcel explorer<br/>[app.js]"]
end

subgraph group_signals["Growth signals"]
  node_growth_score["Growth scoring<br/>[app.js]"]
  node_scheme_panel["YEIDA schemes<br/>[app.js]"]
  node_scheme_data["Scheme dataset<br/>[yeida_schemes.json]"]
  node_catalyst_fetch["Catalyst geometry fetch"]
end

subgraph group_cadastre["Parcel data"]
  node_parcel_fetch["Parcel fetch"]
  node_vector_fetch["Vector parcel fetch"]
  node_geometry_fetch["Raster geometry tracing"]
  node_geometry_core["Geometry processing<br/>[cadastre_core.py]"]
  node_coloring["Parcel adjacency coloring<br/>[add_cidx.py]"]
end

subgraph group_records["Ownership records"]
  node_deed_fetch["Deed history fetch"]
  node_history_builder["History reconstruction"]
end

subgraph group_ingestion["Data acquisition"]
  node_scheme_fetch["Scheme scraping"]
end

node_buyer(("Land buyer"))
node_bhu_naksha["Bhu-Naksha"]
node_osm["OpenStreetMap"]
node_yeida["YEIDA portal"]
node_firecrawl["Firecrawl service"]
node_igrsup["IGRSUP registry"]

node_buyer -->|"explores"| node_map
node_map -->|"loads"| node_site_data
node_buyer -->|"searches parcels"| node_parcel_explorer
node_parcel_explorer -->|"shows scores"| node_growth_score
node_parcel_explorer -->|"opens schemes"| node_scheme_panel
node_scheme_panel -->|"displays"| node_scheme_data
node_buyer -->|"reviews signals"| node_scheme_panel
node_parcel_fetch -->|"fetches parcels"| node_bhu_naksha
node_parcel_fetch -->|"writes parcels"| node_site_data
node_vector_fetch -->|"requests geometry"| node_bhu_naksha
node_vector_fetch -->|"writes polygons"| node_site_data
node_geometry_fetch -->|"fetches map image"| node_bhu_naksha
node_geometry_fetch -->|"uses helpers"| node_geometry_core
node_geometry_fetch -->|"replaces geometry"| node_site_data
node_coloring -->|"calls coloring"| node_geometry_core
node_coloring -->|"adds color indexes"| node_site_data
node_catalyst_fetch -.->|"fetches features"| node_osm
node_catalyst_fetch -->|"provides geometry"| node_site_data
node_scheme_fetch -->|"scrapes portal"| node_firecrawl
node_scheme_fetch -->|"reads schemes"| node_yeida
node_scheme_fetch -->|"writes schemes"| node_scheme_data
node_history_builder -->|"reads parcels, owners"| node_site_data
node_history_builder -->|"writes history"| node_site_data
node_deed_fetch -.->|"fetches deeds"| node_igrsup
node_deed_fetch -.->|"supplies deed history"| node_site_data

click node_map "https://github.com/ceekay-munshot/land/blob/main/web/app.js"
click node_site_data "https://github.com/ceekay-munshot/land/tree/main/web/data"
click node_parcel_explorer "https://github.com/ceekay-munshot/land/blob/main/web/app.js"
click node_growth_score "https://github.com/ceekay-munshot/land/blob/main/web/app.js"
click node_scheme_panel "https://github.com/ceekay-munshot/land/blob/main/web/app.js"
click node_scheme_data "https://github.com/ceekay-munshot/land/blob/main/web/data/yeida_schemes.json"
click node_catalyst_fetch "https://github.com/ceekay-munshot/land/blob/main/tools/fetch_catalysts_osm.py"
click node_parcel_fetch "https://github.com/ceekay-munshot/land/blob/main/tools/fetch_gbn_parcels.py"
click node_vector_fetch "https://github.com/ceekay-munshot/land/blob/main/tools/fetch_bhunaksha_vector.py"
click node_geometry_fetch "https://github.com/ceekay-munshot/land/blob/main/tools/fetch_bhunaksha_geom.py"
click node_geometry_core "https://github.com/ceekay-munshot/land/blob/main/tools/cadastre_core.py"
click node_coloring "https://github.com/ceekay-munshot/land/blob/main/tools/add_cidx.py"
click node_deed_fetch "https://github.com/ceekay-munshot/land/blob/main/tools/fetch_igrsup_deeds.py"
click node_history_builder "https://github.com/ceekay-munshot/land/blob/main/tools/gen_nalgadha_history.py"
click node_scheme_fetch "https://github.com/ceekay-munshot/land/blob/main/tools/fetch_yeida_firecrawl.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_map,node_site_data,node_parcel_explorer toneBlue
class node_growth_score,node_scheme_panel,node_scheme_data,node_catalyst_fetch toneAmber
class node_parcel_fetch,node_vector_fetch,node_geometry_fetch,node_geometry_core,node_coloring toneMint
class node_deed_fetch,node_history_builder toneRose
class node_scheme_fetch,node_buyer,node_bhu_naksha,node_osm,node_yeida,node_firecrawl,node_igrsup toneIndigo
```

## Components

### Map and exploration

- [Interactive map](https://github.com/ceekay-munshot/land/blob/main/web/app.js): `web/app.js`
- [Map datasets](https://github.com/ceekay-munshot/land/tree/main/web/data): `web/data`
- [Parcel explorer](https://github.com/ceekay-munshot/land/blob/main/web/app.js): `web/app.js`

### Growth signals

- [Growth scoring](https://github.com/ceekay-munshot/land/blob/main/web/app.js): `web/app.js`
- [YEIDA schemes](https://github.com/ceekay-munshot/land/blob/main/web/app.js): `web/app.js`
- [Scheme dataset](https://github.com/ceekay-munshot/land/blob/main/web/data/yeida_schemes.json): `web/data/yeida_schemes.json`
- [Catalyst geometry fetch](https://github.com/ceekay-munshot/land/blob/main/tools/fetch_catalysts_osm.py): `tools/fetch_catalysts_osm.py`

### Parcel data

- [Parcel fetch](https://github.com/ceekay-munshot/land/blob/main/tools/fetch_gbn_parcels.py): `tools/fetch_gbn_parcels.py`
- [Vector parcel fetch](https://github.com/ceekay-munshot/land/blob/main/tools/fetch_bhunaksha_vector.py): `tools/fetch_bhunaksha_vector.py`
- [Raster geometry tracing](https://github.com/ceekay-munshot/land/blob/main/tools/fetch_bhunaksha_geom.py): `tools/fetch_bhunaksha_geom.py`
- [Geometry processing](https://github.com/ceekay-munshot/land/blob/main/tools/cadastre_core.py): `tools/cadastre_core.py`
- [Parcel adjacency coloring](https://github.com/ceekay-munshot/land/blob/main/tools/add_cidx.py): `tools/add_cidx.py`

### Ownership records

- [Deed history fetch](https://github.com/ceekay-munshot/land/blob/main/tools/fetch_igrsup_deeds.py): `tools/fetch_igrsup_deeds.py`
- [History reconstruction](https://github.com/ceekay-munshot/land/blob/main/tools/gen_nalgadha_history.py): `tools/gen_nalgadha_history.py`

### Data acquisition

- [Scheme scraping](https://github.com/ceekay-munshot/land/blob/main/tools/fetch_yeida_firecrawl.py): `tools/fetch_yeida_firecrawl.py`

### Other components

- **Land buyer**
- **Bhu-Naksha**
- **OpenStreetMap**
- **YEIDA portal**
- **Firecrawl service**
- **IGRSUP registry**

## Connections

- Land buyer → Interactive map: explores (evidence: `README.md`)
- Interactive map → Map datasets: loads (evidence: `README.md`)
- Land buyer → Parcel explorer: searches parcels (evidence: `README.md`)
- Parcel explorer → Growth scoring: shows scores (evidence: `README.md`)
- Parcel explorer → YEIDA schemes: opens schemes (evidence: `README.md`)
- YEIDA schemes → Scheme dataset: displays (evidence: `README.md`)
- Land buyer → YEIDA schemes: reviews signals (evidence: `README.md`)
- Parcel fetch → Bhu-Naksha: fetches parcels (evidence: `tools/fetch_gbn_parcels.py`)
- Parcel fetch → Map datasets: writes parcels (evidence: `README.md`)
- Vector parcel fetch → Bhu-Naksha: requests geometry (evidence: `tools/fetch_bhunaksha_vector.py`)
- Vector parcel fetch → Map datasets: writes polygons (evidence: `README.md`)
- Raster geometry tracing → Bhu-Naksha: fetches map image (evidence: `tools/fetch_bhunaksha_geom.py`)
- Raster geometry tracing → Geometry processing: uses helpers (evidence: `tools/fetch_bhunaksha_geom.py`)
- Raster geometry tracing → Map datasets: replaces geometry (evidence: `README.md`)
- Parcel adjacency coloring → Geometry processing: calls coloring (evidence: `tools/add_cidx.py`)
- Parcel adjacency coloring → Map datasets: adds color indexes (evidence: `README.md`)
- Catalyst geometry fetch → OpenStreetMap: fetches features (evidence: `README.md`)
- Catalyst geometry fetch → Map datasets: provides geometry (evidence: `README.md`)
- Scheme scraping → Firecrawl service: scrapes portal (evidence: `tools/fetch_yeida_firecrawl.py`)
- Scheme scraping → YEIDA portal: reads schemes (evidence: `README.md`)
- Scheme scraping → Scheme dataset: writes schemes (evidence: `tools/fetch_yeida_firecrawl.py`)
- History reconstruction → Map datasets: reads parcels, owners (evidence: `tools/gen_nalgadha_history.py`)
- History reconstruction → Map datasets: writes history (evidence: `tools/gen_nalgadha_history.py`)
- Deed history fetch → IGRSUP registry: fetches deeds (evidence: `README.md`)
- Deed history fetch → Map datasets: supplies deed history (evidence: `README.md`)
