# ankit65k/geo-shift-spy architecture

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

- Interactive diagram: https://gitdiagram.com/ankit65k/geo-shift-spy
- Repository: https://github.com/ankit65k/geo-shift-spy

## Overview

Geo Shift Spy is described in the README as a traffic-congestion advisory dashboard, but the sampled implementation and frontend workflow center on satellite-image change detection and environmental analysis. The visible user flow is image comparison from the web page through an API client to the Node server; the server also advertises segmentation and disaster-assessment endpoints. Geospatial export and map configuration are exposed separately by the Python service. Several backend and UI modules are indexed but unsampled, so their internal connections are omitted rather than inferred.

Main entry points: [`src/pages/Index.tsx`](https://github.com/ankit65k/geo-shift-spy/blob/main/src/pages/Index.tsx) (Analysis page), [`backend/server.js`](https://github.com/ankit65k/geo-shift-spy/blob/main/backend/server.js) (HTTP analysis routes), [`src/services/api.ts`](https://github.com/ankit65k/geo-shift-spy/blob/main/src/services/api.ts) (Comparison API client), [`ml_backend/models/deeplabv3plus.py`](https://github.com/ankit65k/geo-shift-spy/blob/main/ml_backend/models/deeplabv3plus.py) (Land-cover segmentation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web dashboard"]
  node_index["Analysis page<br/>[Index.tsx]"]
  node_upload["Image upload<br/>[ImageUpload.tsx]"]
  node_results["Comparison results"]
  node_loading["Loading state<br/>[LoadingState.tsx]"]
  node_api["Comparison API client<br/>[api.ts]"]
end

subgraph group_node["Node analysis backend"]
  node_server["HTTP analysis routes<br/>[server.js]"]
end

subgraph group_ml["ML and geospatial services"]
  node_mlapp["ML service application<br/>[app.py]"]
  node_segmentation["Land-cover segmentation<br/>[deeplabv3plus.py]"]
  node_modelutils["Model utilities<br/>[model_utils.py]"]
  node_geoapi["Geospatial API<br/>[geospatial.py]"]
  node_geoprocessor["Geospatial processing"]
  node_disaster["Disaster analysis"]
  node_multiclass["Multiclass analysis"]
end

subgraph group_reports["Analysis and reporting"]
  node_analyst["Environmental analyst"]
  node_intelligent["Intelligent analysis"]
  node_traffic["Traffic advisory concept"]
end

node_user(("Dashboard user"))

node_user -->|"uses"| node_index
node_index -->|"presents"| node_upload
node_index -->|"shows"| node_loading
node_index -->|"calls comparison"| node_api
node_index -->|"renders results"| node_results
node_api -.->|"requests analysis"| node_server
node_server -->|"uses analysis"| node_analyst
node_server -.->|"offers segmentation"| node_segmentation
node_server -.->|"offers assessment"| node_disaster
node_segmentation -->|"uses utilities"| node_modelutils
node_geoapi -->|"converts and clusters"| node_geoprocessor
node_user -->|"seeks advisory"| node_traffic

click node_index "https://github.com/ankit65k/geo-shift-spy/blob/main/src/pages/Index.tsx"
click node_upload "https://github.com/ankit65k/geo-shift-spy/blob/main/src/components/ImageUpload.tsx"
click node_results "https://github.com/ankit65k/geo-shift-spy/blob/main/src/components/ComparisonResults.tsx"
click node_loading "https://github.com/ankit65k/geo-shift-spy/blob/main/src/components/LoadingState.tsx"
click node_api "https://github.com/ankit65k/geo-shift-spy/blob/main/src/services/api.ts"
click node_server "https://github.com/ankit65k/geo-shift-spy/blob/main/backend/server.js"
click node_analyst "https://github.com/ankit65k/geo-shift-spy/blob/main/backend/environmental-analyst.js"
click node_intelligent "https://github.com/ankit65k/geo-shift-spy/blob/main/src/services/intelligentAnalysisService.js"
click node_mlapp "https://github.com/ankit65k/geo-shift-spy/blob/main/ml_backend/app.py"
click node_segmentation "https://github.com/ankit65k/geo-shift-spy/blob/main/ml_backend/models/deeplabv3plus.py"
click node_modelutils "https://github.com/ankit65k/geo-shift-spy/blob/main/ml_backend/utils/model_utils.py"
click node_geoapi "https://github.com/ankit65k/geo-shift-spy/blob/main/ml_backend/routers/geospatial.py"
click node_geoprocessor "https://github.com/ankit65k/geo-shift-spy/blob/main/ml_backend/services/geospatial_processor.py"
click node_disaster "https://github.com/ankit65k/geo-shift-spy/blob/main/ml_backend/services/disaster_analyzer.py"
click node_multiclass "https://github.com/ankit65k/geo-shift-spy/blob/main/ml_backend/services/multiclass_analyzer.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_index,node_upload,node_results,node_loading,node_api,node_user toneBlue
class node_server toneAmber
class node_mlapp,node_segmentation,node_modelutils,node_geoapi,node_geoprocessor,node_disaster,node_multiclass toneMint
class node_analyst,node_intelligent,node_traffic toneRose
```

## Components

### Web dashboard

- [Analysis page](https://github.com/ankit65k/geo-shift-spy/blob/main/src/pages/Index.tsx): `src/pages/Index.tsx`
- [Image upload](https://github.com/ankit65k/geo-shift-spy/blob/main/src/components/ImageUpload.tsx): `src/components/ImageUpload.tsx`
- [Comparison results](https://github.com/ankit65k/geo-shift-spy/blob/main/src/components/ComparisonResults.tsx): `src/components/ComparisonResults.tsx`
- [Loading state](https://github.com/ankit65k/geo-shift-spy/blob/main/src/components/LoadingState.tsx): `src/components/LoadingState.tsx`
- [Comparison API client](https://github.com/ankit65k/geo-shift-spy/blob/main/src/services/api.ts): `src/services/api.ts`

### Node analysis backend

- [HTTP analysis routes](https://github.com/ankit65k/geo-shift-spy/blob/main/backend/server.js): `backend/server.js`

### ML and geospatial services

- [ML service application](https://github.com/ankit65k/geo-shift-spy/blob/main/ml_backend/app.py): `ml_backend/app.py`
- [Land-cover segmentation](https://github.com/ankit65k/geo-shift-spy/blob/main/ml_backend/models/deeplabv3plus.py): `ml_backend/models/deeplabv3plus.py`
- [Model utilities](https://github.com/ankit65k/geo-shift-spy/blob/main/ml_backend/utils/model_utils.py): `ml_backend/utils/model_utils.py`
- [Geospatial API](https://github.com/ankit65k/geo-shift-spy/blob/main/ml_backend/routers/geospatial.py): `ml_backend/routers/geospatial.py`
- [Geospatial processing](https://github.com/ankit65k/geo-shift-spy/blob/main/ml_backend/services/geospatial_processor.py): `ml_backend/services/geospatial_processor.py`
- [Disaster analysis](https://github.com/ankit65k/geo-shift-spy/blob/main/ml_backend/services/disaster_analyzer.py): `ml_backend/services/disaster_analyzer.py`
- [Multiclass analysis](https://github.com/ankit65k/geo-shift-spy/blob/main/ml_backend/services/multiclass_analyzer.py): `ml_backend/services/multiclass_analyzer.py`

### Analysis and reporting

- [Environmental analyst](https://github.com/ankit65k/geo-shift-spy/blob/main/backend/environmental-analyst.js): `backend/environmental-analyst.js`
- [Intelligent analysis](https://github.com/ankit65k/geo-shift-spy/blob/main/src/services/intelligentAnalysisService.js): `src/services/intelligentAnalysisService.js`
- **Traffic advisory concept**

### Other components

- **Dashboard user**

## Connections

- Dashboard user → Analysis page: uses (evidence: `README.md`)
- Analysis page → Image upload: presents (evidence: `src/pages/Index.tsx`)
- Analysis page → Loading state: shows (evidence: `src/pages/Index.tsx`)
- Analysis page → Comparison API client: calls comparison (evidence: `src/pages/Index.tsx`)
- Analysis page → Comparison results: renders results (evidence: `src/pages/Index.tsx`)
- Comparison API client → HTTP analysis routes: requests analysis
- HTTP analysis routes → Environmental analyst: uses analysis (evidence: `backend/server.js`)
- HTTP analysis routes → Land-cover segmentation: offers segmentation
- HTTP analysis routes → Disaster analysis: offers assessment
- Land-cover segmentation → Model utilities: uses utilities (evidence: `ml_backend/models/deeplabv3plus.py`)
- Geospatial API → Geospatial processing: converts and clusters (evidence: `ml_backend/routers/geospatial.py`)
- Dashboard user → Traffic advisory concept: seeks advisory (evidence: `README.md`)
