Geopolitics tracker prototype: a React + React Three Fiber globe UI and a Node/Express backend that broadcasts realtime updates over WebSockets.
- Node.js 20+ (you have Node v24)
- npm
- Create
.envfrom.env.example(optional for now) - Install deps:
npm install
- (Optional) Create
client/.envto setVITE_NEWS_QUERY="your query"for the conflict search card.
If
npm installfails with certificate/proxy errors (SELF_SIGNED_CERT_IN_CHAIN/ HTML responses), your network is intercepting npm traffic. Fix by installing your org root CA (preferred) or configuring npmcafile/proxy. A temporary repo-local workaround is.npmrcwithstrict-ssl=false(already present) but it is not recommended long-term.
Client: Vite dev server prints the URL. Server: http://localhost:8787
Maps mode renders a single globe texture built from raster tiles. To use OpenMapTiles (typically via tileserver-gl), configure a raster tile URL template.
-
Recommended (avoids CORS/tainted-canvas issues): proxy tiles through the WarWatch server.
- Server env:
TILE_RASTER_URL_TEMPLATE=http://localhost:8080/styles/osm-bright/{z}/{x}/{y}.png
- Client env:
VITE_MAP_RASTER_TILE_TEMPLATE=/api/tiles/{z}/{x}/{y}.pngVITE_MAP_RASTER_ZOOM=4(try5if your machine can handle it)
- Server env:
-
Direct (only works if your tile server sets permissive CORS headers):
VITE_MAP_RASTER_TILE_TEMPLATE=http://localhost:8080/styles/osm-bright/{z}/{x}/{y}.png
- NewsAPI adapter (server-side; uses
NEWSAPI_KEYwhen set, otherwise emits mock items) - NewsAPI query endpoint + conflict search UI (
/api/news/query) that lets you pull topic-specific headlines.- Set
NEWSAPI_INSECURE_TLS=trueif your network intercepts TLS (similar toOPENSKY_INSECURE_TLS).
- Set
- Default News feed polling uses NewsAPI
everythingwith a war/geopolitics-focused query.- Override with
NEWSAPI_POLL_QUERY, and optionally restrict withNEWSAPI_SOURCESorNEWSAPI_DOMAINS.
- Override with
- Flight tracking via OpenSky (default, free-ish) and a FlightRadar-compatible adapter (optional)
- Provider stubs for X (to implement later)
- UI: conflicts list, death toll meter, war-risk score, AI click-to-analyze
The backend supports a free, local LLM via Ollama and optionally OpenAI.
- Default:
LLM_PROVIDER=ollama - Requires Ollama running locally at
OLLAMA_URL(defaulthttp://127.0.0.1:11434) and a pulled model (defaultOLLAMA_MODEL=llama3.1).
- Default:
FLIGHTS_PROVIDER=opensky(calls OpenSky state vectors) - Recommended fallback:
FLIGHTS_PROVIDER=adsblol(usesapi.adsb.loland requires a center point + radius) - Optional:
FLIGHTS_PROVIDER=flightradar(usesFLIGHTRADAR_API_URLadapter) - If your network injects intercepting TLS certificates and OpenSky requests fail with
SELF_SIGNED_CERT_IN_CHAIN, setOPENSKY_INSECURE_TLS=true(only for trusted/dev environments).
- Set
FLIGHTS_PROVIDER=adsblol - Set
ADSBLOL_CENTER_LAT,ADSBLOL_CENTER_LON,ADSBLOL_RADIUS_NM(max 250)
/api/news/query+NEWSAPI_DEFAULT_QUERYlets the UI request topic-specific headlines via NewsAPI'severythingendpoint.
NEWSAPI_KEY- Enables NewsAPI calls (otherwise the server emits mock items).GDELT_DOC_SOURCELANG- Language filter applied to GDELT click-through (DOC ArtList) URLs. Defaults toenglish. Set toallto disable.AISSTREAM_API_KEY- If set, the backend connects to AISStream over WebSocket and/api/shipsserves a live snapshot (requiresAISSTREAM_BBOXorAISSTREAM_BOUNDING_BOXES).SHIPS_API_URL- Optional fallback. If set (and AISStream is not configured),/api/shipspulls ship tracks from this JSON endpoint (see.env.examplefor shape).