Ghana Digital Twin — AI-native geospatial world model of the Republic of Ghana
# Ghana Digital Twin (GDT)
A continuously updating, AI-native geospatial world model of the Republic of Ghana. Built on Next.js 16 with a 224-model Prisma schema, 259 API routes, 7 live data connectors, and a 25-rule Bayesian intelligence engine that detects illegal mining, deforestation, flood risk, cocoa disease, and land-use change from satellite imagery.
## Architecture
```
Satellite/SAR/Rainfall/Cadastre → Connectors → Raster Products (200×200/tile)
→ Observation Engine → Bayesian Hypothesis Engine (25 rules, 9 types)
→ Mission Planner (EVI-ranked) → Community Verification (photo + witness)
→ Calibration Loop (auto-confirm → GroundTruth → computeCalibration)
```
### Core Pipeline
1. **Connectors** fetch data from STAC APIs, OSM, geoBoundaries, and custom sources
2. **Raster Products** compute spectral indices (NDVI, NDWI, BSI, NBR) at ~110m/cell resolution per tile
3. **Observation Engine** detects anomalies vs seasonal baselines
4. **Intelligence Engine** generates Bayesian hypotheses with 25 rules across 9 types
5. **Mission Planner** auto-creates verification missions (EVI-ranked)
6. **Community Loop** — citizens report incidents, attach geotagged photos, witnesses confirm/reject
7. **Calibration Loop** — confirmed events auto-create GroundTruth records and trigger calibration
### Evidence Categories
All 5 evidence categories are populated by connectors:
- **Vegetation** — NDVI/BSI anomalies (Sentinel-2)
- **Hydrology** — NDWI water body changes (Sentinel-2)
- **Infrastructure** — mining cadastre + OSM features (licensed concessions, roads, settlements)
- **Terrain** — DEM elevation/slope/bench-cut geometry
- **Atmospheric** — CHIRPS seasonal rainfall
## Consumer Experience
7 primary views accessible from the nav rail (desktop) or bottom tab bar (mobile):
- **Home** — greeting, reputation cards with sparklines + tier labels, activity map, intelligence pulse, missions, quick actions
- **Intelligence Feed** — filterable feed with colored left borders, i …