# ciphrchai/bhumi-x architecture

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

- Interactive diagram: https://gitdiagram.com/ciphrchai/bhumi-x
- Repository: https://github.com/ciphrchai/bhumi-x

## Overview

BHUMI-X is an urban-planning decision-support platform for exploring parcels, assessing environmental and development conditions, and comparing scenarios. Its user workflow is routed through React pages; the explorer combines parcel data with interactive mapping, while analysis and simulation pages support decision-making. FastAPI exposes separate parcel, geospatial, analysis, data-health, reporting, simulation, and ML endpoints. The README describes the broader data-to-decision stages and capabilities; some implementation details and frontend-to-backend endpoint mappings were not shown, so those links are omitted.

Main entry points: [`src/App.tsx`](https://github.com/ciphrchai/bhumi-x/blob/main/src/App.tsx) (Route application), [`src/services/index.ts`](https://github.com/ciphrchai/bhumi-x/blob/main/src/services/index.ts) (Service exports), [`backend/app/main.py`](https://github.com/ciphrchai/bhumi-x/blob/main/backend/app/main.py) (FastAPI application), [`src/services/parcelService.ts`](https://github.com/ciphrchai/bhumi-x/blob/main/src/services/parcelService.ts) (Parcel service)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Application UI"]
  node_app["Route application<br/>[App.tsx]"]
  node_explorer["Parcel explorer<br/>[ExplorerPage.tsx]"]
  node_map["GIS map<br/>[MapContainer.tsx]"]
  node_parcelpage["Parcel intelligence<br/>[ParcelPage.tsx]"]
  node_analysispage["Spatial analysis<br/>[AnalysisPage.tsx]"]
  node_results["Analysis results<br/>[ResultsPage.tsx]"]
  node_simulator["Scenario simulator<br/>[SimulatorPage.tsx]"]
  node_urbanplanning["Urban planning"]
  node_overview["Decision overview<br/>[OverviewPage.tsx]"]
  node_reports["Reports<br/>[ReportsPage.tsx]"]
  node_datahealthpage["Data health<br/>[DataHealthPage.tsx]"]
  node_planning_scene["Planning scene<br/>[PlanningScene.tsx]"]
end

subgraph group_services["Frontend Data"]
  node_services_index["Service exports<br/>[index.ts]"]
  node_parcel_service["Parcel service<br/>[parcelService.ts]"]
  node_analysis_service["Analysis service<br/>[analysisService.ts]"]
  node_simulation_service["Simulation service"]
  node_report_service["Report service<br/>[reportService.ts]"]
  node_health_service["Data-health service"]
  node_api_config["API and mock config<br/>[config.ts]"]
end

subgraph group_backend["API Capabilities"]
  node_api_app["FastAPI application<br/>[main.py]"]
  node_parcel_api["Parcel endpoints<br/>[parcels.py]"]
  node_geojson_api["GeoJSON endpoints<br/>[geojson.py]"]
  node_analysis_api["Analysis endpoints<br/>[analysis.py]"]
  node_health_api["Data-health endpoints<br/>[data_health.py]"]
  node_report_api["Report endpoints<br/>[reports.py]"]
  node_simulation_api["Simulation endpoints<br/>[simulation.py]"]
  node_ml_api["ML endpoints<br/>[ml.py]"]
end

subgraph group_ml["ML Workbench"]
  node_dataset["Dataset generation"]
  node_local_explain["Local explanations"]
end

node_user(("Planner or developer"))

node_user -->|"uses"| node_app
node_app -->|"routes to"| node_explorer
node_app -->|"routes to"| node_parcelpage
node_app -->|"routes to"| node_analysispage
node_app -->|"routes to"| node_results
node_app -->|"routes to"| node_simulator
node_app -->|"routes to"| node_urbanplanning
node_app -->|"routes to"| node_overview
node_app -->|"routes to"| node_reports
node_app -->|"routes to"| node_datahealthpage
node_explorer -->|"renders"| node_map
node_explorer -->|"loads parcels"| node_parcel_service
node_map -.->|"loads GeoJSON"| node_parcel_service
node_parcelpage -->|"uses services"| node_services_index
node_analysispage -->|"uses services"| node_services_index
node_results -->|"loads results"| node_analysis_service
node_results -->|"loads parcels"| node_parcel_service
node_simulator -->|"uses services"| node_services_index
node_planning_scene -.->|"renders scene"| node_urbanplanning
node_services_index -->|"exports"| node_parcel_service
node_services_index -->|"exports"| node_analysis_service
node_services_index -->|"exports"| node_simulation_service
node_services_index -->|"exports"| node_report_service
node_services_index -->|"exports"| node_health_service
node_parcel_service -->|"requests API"| node_api_config
node_analysis_service -->|"requests API"| node_api_config
node_simulation_service -->|"requests API"| node_api_config
node_report_service -->|"requests API"| node_api_config
node_health_service -->|"requests API"| node_api_config
node_api_app -->|"registers router"| node_geojson_api
node_api_app -->|"registers router"| node_parcel_api
node_api_app -->|"registers router"| node_analysis_api
node_api_app -->|"registers router"| node_health_api
node_api_app -->|"registers router"| node_report_api
node_api_app -->|"registers router"| node_simulation_api
node_api_app -->|"registers router"| node_ml_api
node_report_api -->|"uses analysis"| node_analysis_api
node_analysis_api -.->|"uses parcel data"| node_parcel_api
node_simulation_api -.->|"uses analysis"| node_analysis_api
node_ml_api -.->|"explains predictions"| node_local_explain
node_dataset -.->|"supplies data"| node_ml_api

click node_app "https://github.com/ciphrchai/bhumi-x/blob/main/src/App.tsx"
click node_explorer "https://github.com/ciphrchai/bhumi-x/blob/main/src/pages/ExplorerPage.tsx"
click node_map "https://github.com/ciphrchai/bhumi-x/blob/main/src/components/gis/MapContainer.tsx"
click node_parcelpage "https://github.com/ciphrchai/bhumi-x/blob/main/src/pages/ParcelPage.tsx"
click node_analysispage "https://github.com/ciphrchai/bhumi-x/blob/main/src/pages/AnalysisPage.tsx"
click node_results "https://github.com/ciphrchai/bhumi-x/blob/main/src/pages/ResultsPage.tsx"
click node_simulator "https://github.com/ciphrchai/bhumi-x/blob/main/src/pages/SimulatorPage.tsx"
click node_urbanplanning "https://github.com/ciphrchai/bhumi-x/blob/main/src/pages/UrbanPlanningPage.tsx"
click node_overview "https://github.com/ciphrchai/bhumi-x/blob/main/src/pages/OverviewPage.tsx"
click node_reports "https://github.com/ciphrchai/bhumi-x/blob/main/src/pages/ReportsPage.tsx"
click node_datahealthpage "https://github.com/ciphrchai/bhumi-x/blob/main/src/pages/DataHealthPage.tsx"
click node_planning_scene "https://github.com/ciphrchai/bhumi-x/blob/main/src/components/urban-planning/PlanningScene.tsx"
click node_services_index "https://github.com/ciphrchai/bhumi-x/blob/main/src/services/index.ts"
click node_parcel_service "https://github.com/ciphrchai/bhumi-x/blob/main/src/services/parcelService.ts"
click node_analysis_service "https://github.com/ciphrchai/bhumi-x/blob/main/src/services/analysisService.ts"
click node_simulation_service "https://github.com/ciphrchai/bhumi-x/blob/main/src/services/simulationService.ts"
click node_report_service "https://github.com/ciphrchai/bhumi-x/blob/main/src/services/reportService.ts"
click node_health_service "https://github.com/ciphrchai/bhumi-x/blob/main/src/services/dataHealthService.ts"
click node_api_config "https://github.com/ciphrchai/bhumi-x/blob/main/src/services/config.ts"
click node_api_app "https://github.com/ciphrchai/bhumi-x/blob/main/backend/app/main.py"
click node_parcel_api "https://github.com/ciphrchai/bhumi-x/blob/main/backend/app/routers/parcels.py"
click node_geojson_api "https://github.com/ciphrchai/bhumi-x/blob/main/backend/app/routers/geojson.py"
click node_analysis_api "https://github.com/ciphrchai/bhumi-x/blob/main/backend/app/routers/analysis.py"
click node_health_api "https://github.com/ciphrchai/bhumi-x/blob/main/backend/app/routers/data_health.py"
click node_report_api "https://github.com/ciphrchai/bhumi-x/blob/main/backend/app/routers/reports.py"
click node_simulation_api "https://github.com/ciphrchai/bhumi-x/blob/main/backend/app/routers/simulation.py"
click node_ml_api "https://github.com/ciphrchai/bhumi-x/blob/main/backend/app/routers/ml.py"
click node_dataset "https://github.com/ciphrchai/bhumi-x/blob/main/ml/generate_bhumi_x_dataset.py"
click node_local_explain "https://github.com/ciphrchai/bhumi-x/blob/main/ml/local_explanation.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_app,node_explorer,node_map,node_parcelpage,node_analysispage,node_results,node_simulator,node_urbanplanning,node_overview,node_reports,node_datahealthpage,node_planning_scene toneBlue
class node_services_index,node_parcel_service,node_analysis_service,node_simulation_service,node_report_service,node_health_service,node_api_config toneAmber
class node_api_app,node_parcel_api,node_geojson_api,node_analysis_api,node_health_api,node_report_api,node_simulation_api,node_ml_api toneMint
class node_dataset,node_local_explain toneRose
class node_user toneIndigo
```

## Components

### Application UI

- [Route application](https://github.com/ciphrchai/bhumi-x/blob/main/src/App.tsx): `src/App.tsx`
- [Parcel explorer](https://github.com/ciphrchai/bhumi-x/blob/main/src/pages/ExplorerPage.tsx): `src/pages/ExplorerPage.tsx`
- [GIS map](https://github.com/ciphrchai/bhumi-x/blob/main/src/components/gis/MapContainer.tsx): `src/components/gis/MapContainer.tsx`
- [Parcel intelligence](https://github.com/ciphrchai/bhumi-x/blob/main/src/pages/ParcelPage.tsx): `src/pages/ParcelPage.tsx`
- [Spatial analysis](https://github.com/ciphrchai/bhumi-x/blob/main/src/pages/AnalysisPage.tsx): `src/pages/AnalysisPage.tsx`
- [Analysis results](https://github.com/ciphrchai/bhumi-x/blob/main/src/pages/ResultsPage.tsx): `src/pages/ResultsPage.tsx`
- [Scenario simulator](https://github.com/ciphrchai/bhumi-x/blob/main/src/pages/SimulatorPage.tsx): `src/pages/SimulatorPage.tsx`
- [Urban planning](https://github.com/ciphrchai/bhumi-x/blob/main/src/pages/UrbanPlanningPage.tsx): `src/pages/UrbanPlanningPage.tsx`
- [Decision overview](https://github.com/ciphrchai/bhumi-x/blob/main/src/pages/OverviewPage.tsx): `src/pages/OverviewPage.tsx`
- [Reports](https://github.com/ciphrchai/bhumi-x/blob/main/src/pages/ReportsPage.tsx): `src/pages/ReportsPage.tsx`
- [Data health](https://github.com/ciphrchai/bhumi-x/blob/main/src/pages/DataHealthPage.tsx): `src/pages/DataHealthPage.tsx`
- [Planning scene](https://github.com/ciphrchai/bhumi-x/blob/main/src/components/urban-planning/PlanningScene.tsx): `src/components/urban-planning/PlanningScene.tsx`

### Frontend Data

- [Service exports](https://github.com/ciphrchai/bhumi-x/blob/main/src/services/index.ts): `src/services/index.ts`
- [Parcel service](https://github.com/ciphrchai/bhumi-x/blob/main/src/services/parcelService.ts): `src/services/parcelService.ts`
- [Analysis service](https://github.com/ciphrchai/bhumi-x/blob/main/src/services/analysisService.ts): `src/services/analysisService.ts`
- [Simulation service](https://github.com/ciphrchai/bhumi-x/blob/main/src/services/simulationService.ts): `src/services/simulationService.ts`
- [Report service](https://github.com/ciphrchai/bhumi-x/blob/main/src/services/reportService.ts): `src/services/reportService.ts`
- [Data-health service](https://github.com/ciphrchai/bhumi-x/blob/main/src/services/dataHealthService.ts): `src/services/dataHealthService.ts`
- [API and mock config](https://github.com/ciphrchai/bhumi-x/blob/main/src/services/config.ts): `src/services/config.ts`

### API Capabilities

- [FastAPI application](https://github.com/ciphrchai/bhumi-x/blob/main/backend/app/main.py): `backend/app/main.py`
- [Parcel endpoints](https://github.com/ciphrchai/bhumi-x/blob/main/backend/app/routers/parcels.py): `backend/app/routers/parcels.py`
- [GeoJSON endpoints](https://github.com/ciphrchai/bhumi-x/blob/main/backend/app/routers/geojson.py): `backend/app/routers/geojson.py`
- [Analysis endpoints](https://github.com/ciphrchai/bhumi-x/blob/main/backend/app/routers/analysis.py): `backend/app/routers/analysis.py`
- [Data-health endpoints](https://github.com/ciphrchai/bhumi-x/blob/main/backend/app/routers/data_health.py): `backend/app/routers/data_health.py`
- [Report endpoints](https://github.com/ciphrchai/bhumi-x/blob/main/backend/app/routers/reports.py): `backend/app/routers/reports.py`
- [Simulation endpoints](https://github.com/ciphrchai/bhumi-x/blob/main/backend/app/routers/simulation.py): `backend/app/routers/simulation.py`
- [ML endpoints](https://github.com/ciphrchai/bhumi-x/blob/main/backend/app/routers/ml.py): `backend/app/routers/ml.py`

### ML Workbench

- [Dataset generation](https://github.com/ciphrchai/bhumi-x/blob/main/ml/generate_bhumi_x_dataset.py): `ml/generate_bhumi_x_dataset.py`
- [Local explanations](https://github.com/ciphrchai/bhumi-x/blob/main/ml/local_explanation.py): `ml/local_explanation.py`

### Other components

- **Planner or developer**

## Connections

- Planner or developer → Route application: uses (evidence: `src/App.tsx`)
- Route application → Parcel explorer: routes to (evidence: `src/App.tsx`)
- Route application → Parcel intelligence: routes to (evidence: `src/App.tsx`)
- Route application → Spatial analysis: routes to (evidence: `src/App.tsx`)
- Route application → Analysis results: routes to (evidence: `src/App.tsx`)
- Route application → Scenario simulator: routes to (evidence: `src/App.tsx`)
- Route application → Urban planning: routes to (evidence: `src/App.tsx`)
- Route application → Decision overview: routes to (evidence: `src/App.tsx`)
- Route application → Reports: routes to (evidence: `src/App.tsx`)
- Route application → Data health: routes to (evidence: `src/App.tsx`)
- Parcel explorer → GIS map: renders (evidence: `src/pages/ExplorerPage.tsx`)
- Parcel explorer → Parcel service: loads parcels (evidence: `src/pages/ExplorerPage.tsx`)
- GIS map → Parcel service: loads GeoJSON
- Parcel intelligence → Service exports: uses services (evidence: `src/pages/ParcelPage.tsx`)
- Spatial analysis → Service exports: uses services (evidence: `src/pages/AnalysisPage.tsx`)
- Analysis results → Analysis service: loads results (evidence: `src/pages/ResultsPage.tsx`)
- Analysis results → Parcel service: loads parcels (evidence: `src/pages/ResultsPage.tsx`)
- Scenario simulator → Service exports: uses services (evidence: `src/pages/SimulatorPage.tsx`)
- Planning scene → Urban planning: renders scene
- Service exports → Parcel service: exports (evidence: `src/services/index.ts`)
- Service exports → Analysis service: exports (evidence: `src/services/index.ts`)
- Service exports → Simulation service: exports (evidence: `src/services/index.ts`)
- Service exports → Report service: exports (evidence: `src/services/index.ts`)
- Service exports → Data-health service: exports (evidence: `src/services/index.ts`)
- Parcel service → API and mock config: requests API (evidence: `src/services/parcelService.ts`)
- Analysis service → API and mock config: requests API (evidence: `src/services/analysisService.ts`)
- Simulation service → API and mock config: requests API (evidence: `src/services/simulationService.ts`)
- Report service → API and mock config: requests API (evidence: `src/services/reportService.ts`)
- Data-health service → API and mock config: requests API (evidence: `src/services/dataHealthService.ts`)
- FastAPI application → GeoJSON endpoints: registers router (evidence: `backend/app/main.py`)
- FastAPI application → Parcel endpoints: registers router (evidence: `backend/app/main.py`)
- FastAPI application → Analysis endpoints: registers router (evidence: `backend/app/main.py`)
- FastAPI application → Data-health endpoints: registers router (evidence: `backend/app/main.py`)
- FastAPI application → Report endpoints: registers router (evidence: `backend/app/main.py`)
- FastAPI application → Simulation endpoints: registers router (evidence: `backend/app/main.py`)
- FastAPI application → ML endpoints: registers router (evidence: `backend/app/main.py`)
- Report endpoints → Analysis endpoints: uses analysis (evidence: `backend/app/routers/reports.py`)
- Analysis endpoints → Parcel endpoints: uses parcel data
- Simulation endpoints → Analysis endpoints: uses analysis
- ML endpoints → Local explanations: explains predictions
- Dataset generation → ML endpoints: supplies data
