# darkwolf007/spatial_intelligence_realestate architecture

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

- Interactive diagram: https://gitdiagram.com/darkwolf007/spatial_intelligence_realestate
- Repository: https://github.com/darkwolf007/spatial_intelligence_realestate

## Overview

GeoDashboard is an interactive real-estate geospatial dashboard: users select a mapped area and housing type, adjust amenity inputs, and view historical and predicted prices. The active `App.js` coordinates map selection, controls, chart data, and requests to the prediction API; the API combines area/amenity weighting with a loaded model to produce a five-year forecast. The README also describes a draggable amenity sidebar and theme toggle; `AmenitySidebar.jsx` is present, though the shown active shell does not import it. The separate `App.jsx` imports that sidebar and appears to be an alternate UI. Connections are limited to shown code and README claims.

Main entry points: [`geodashboard/src/App.js`](https://github.com/darkwolf007/spatial_intelligence_realestate/blob/main/geodashboard/src/App.js) (Dashboard shell), [`geodashboard/src/App.jsx`](https://github.com/darkwolf007/spatial_intelligence_realestate/blob/main/geodashboard/src/App.jsx) (Alternate shell), [`api/predict.py`](https://github.com/darkwolf007/spatial_intelligence_realestate/blob/main/api/predict.py) (Prediction API), [`geodashboard/src/components/MapView.jsx`](https://github.com/darkwolf007/spatial_intelligence_realestate/blob/main/geodashboard/src/components/MapView.jsx) (Area map)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Dashboard UI"]
  node_app["Dashboard shell<br/>[App.js]"]
  node_alternate["Alternate shell<br/>[App.jsx]"]
  node_housing["Housing selector"]
  node_amenity["Amenity sidebar<br/>[AmenitySidebar.jsx]"]
  node_chart["Forecast chart<br/>[ForecastChart.jsx]"]
end

subgraph group_geo["Geospatial selection"]
  node_map["Area map<br/>[MapView.jsx]"]
  node_geojson["Area features<br/>[final_vis.json]"]
end

subgraph group_forecast["Forecast service"]
  node_api["Prediction API<br/>[predict.py]"]
end

subgraph group_assets["Forecast inputs"]
  node_model["Price model<br/>[model.pkl]"]
  node_weights["Area weights<br/>[weighted.csv]"]
end

node_user(("Dashboard user"))
node_maps["Google Maps"]

node_user -->|"uses"| node_app
node_app -->|"renders"| node_map
node_app -->|"renders"| node_housing
node_app -->|"renders"| node_chart
node_alternate -->|"renders"| node_amenity
node_alternate -->|"renders"| node_map
node_alternate -->|"renders"| node_housing
node_alternate -->|"renders"| node_chart
node_map -->|"loads"| node_geojson
node_map -->|"uses map API"| node_maps
node_app -->|"posts forecast request"| node_api
node_api -->|"returns forecast"| node_app
node_api -->|"loads and predicts"| node_model
node_api -->|"reads weights"| node_weights
node_app -.->|"supports drag-and-drop sidebar"| node_amenity

click node_app "https://github.com/darkwolf007/spatial_intelligence_realestate/blob/main/geodashboard/src/App.js"
click node_alternate "https://github.com/darkwolf007/spatial_intelligence_realestate/blob/main/geodashboard/src/App.jsx"
click node_housing "https://github.com/darkwolf007/spatial_intelligence_realestate/blob/main/geodashboard/src/components/HousingTypeDropdown.jsx"
click node_amenity "https://github.com/darkwolf007/spatial_intelligence_realestate/blob/main/geodashboard/src/components/AmenitySidebar.jsx"
click node_chart "https://github.com/darkwolf007/spatial_intelligence_realestate/blob/main/geodashboard/src/components/ForecastChart.jsx"
click node_map "https://github.com/darkwolf007/spatial_intelligence_realestate/blob/main/geodashboard/src/components/MapView.jsx"
click node_geojson "https://github.com/darkwolf007/spatial_intelligence_realestate/blob/main/geodashboard/public/final_vis.json"
click node_api "https://github.com/darkwolf007/spatial_intelligence_realestate/blob/main/api/predict.py"
click node_model "https://github.com/darkwolf007/spatial_intelligence_realestate/blob/main/api/model.pkl"
click node_weights "https://github.com/darkwolf007/spatial_intelligence_realestate/blob/main/api/weighted.csv"

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_alternate,node_housing,node_amenity,node_chart,node_user toneBlue
class node_map,node_geojson toneAmber
class node_api toneMint
class node_model,node_weights toneRose
class node_maps toneIndigo
```

## Components

### Dashboard UI

- [Dashboard shell](https://github.com/darkwolf007/spatial_intelligence_realestate/blob/main/geodashboard/src/App.js): `geodashboard/src/App.js`
- [Alternate shell](https://github.com/darkwolf007/spatial_intelligence_realestate/blob/main/geodashboard/src/App.jsx): `geodashboard/src/App.jsx`
- [Housing selector](https://github.com/darkwolf007/spatial_intelligence_realestate/blob/main/geodashboard/src/components/HousingTypeDropdown.jsx): `geodashboard/src/components/HousingTypeDropdown.jsx`
- [Amenity sidebar](https://github.com/darkwolf007/spatial_intelligence_realestate/blob/main/geodashboard/src/components/AmenitySidebar.jsx): `geodashboard/src/components/AmenitySidebar.jsx`
- [Forecast chart](https://github.com/darkwolf007/spatial_intelligence_realestate/blob/main/geodashboard/src/components/ForecastChart.jsx): `geodashboard/src/components/ForecastChart.jsx`

### Geospatial selection

- [Area map](https://github.com/darkwolf007/spatial_intelligence_realestate/blob/main/geodashboard/src/components/MapView.jsx): `geodashboard/src/components/MapView.jsx`
- [Area features](https://github.com/darkwolf007/spatial_intelligence_realestate/blob/main/geodashboard/public/final_vis.json): `geodashboard/public/final_vis.json`

### Forecast service

- [Prediction API](https://github.com/darkwolf007/spatial_intelligence_realestate/blob/main/api/predict.py): `api/predict.py`

### Forecast inputs

- [Price model](https://github.com/darkwolf007/spatial_intelligence_realestate/blob/main/api/model.pkl): `api/model.pkl`
- [Area weights](https://github.com/darkwolf007/spatial_intelligence_realestate/blob/main/api/weighted.csv): `api/weighted.csv`

### Other components

- **Dashboard user**
- **Google Maps**

## Connections

- Dashboard user → Dashboard shell: uses (evidence: `README.md`)
- Dashboard shell → Area map: renders (evidence: `geodashboard/src/App.js`)
- Dashboard shell → Housing selector: renders (evidence: `geodashboard/src/App.js`)
- Dashboard shell → Forecast chart: renders (evidence: `geodashboard/src/App.js`)
- Alternate shell → Amenity sidebar: renders (evidence: `geodashboard/src/App.jsx`)
- Alternate shell → Area map: renders (evidence: `geodashboard/src/App.jsx`)
- Alternate shell → Housing selector: renders (evidence: `geodashboard/src/App.jsx`)
- Alternate shell → Forecast chart: renders (evidence: `geodashboard/src/App.jsx`)
- Area map → Area features: loads (evidence: `geodashboard/src/components/MapView.jsx`)
- Area map → Google Maps: uses map API (evidence: `geodashboard/src/components/MapView.jsx`)
- Dashboard shell → Prediction API: posts forecast request (evidence: `geodashboard/src/App.js`)
- Prediction API → Dashboard shell: returns forecast (evidence: `api/predict.py`)
- Prediction API → Price model: loads and predicts (evidence: `api/predict.py`)
- Prediction API → Area weights: reads weights (evidence: `api/predict.py`)
- Dashboard shell → Amenity sidebar: supports drag-and-drop sidebar (evidence: `README.md`)
