Skip to content

indicaindependent/straittracker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

⚡ StraitTracker

Real-time Strait of Hormuz geopolitical intelligence — live on Cloudflare's edge

Live Cloudflare Workers License: MIT


What Is This

StraitTracker monitors the Strait of Hormuz — the world's most critical oil chokepoint — aggregating live intelligence from news sources and presenting it in a clean, real-time dashboard.

The Strait handles ~20% of global oil transit. When it's tense, the world economy feels it. This tool gives you a live pulse — free, ad-free, and open source.

Two purpose-built surfaces share one live data feed:

  • Desktop (tracker.warheatmap.app) — wide SVG situational map + intel rail
  • Mobile (mobile.tracker.warheatmap.app) — 360px-first Leaflet map + drawer UI

Features

  • 📡 Live Intel Feed — Claude + NewsAPI aggregation, persisted in KV, regenerated every 30 min via Cron Trigger
  • 🗺️ Interactive Maps — Leaflet (mobile) + dependency-free SVG (desktop) showing strait geography, lanes, mine zones & flash points
  • 📊 Status Dashboard — threat level, ceasefire/blockade state, tankers trapped, oil benchmarks
  • ⏱️ Auto-Relative Dates — every date renders as today / yesterday / 3d ago, so the dashboard never looks stale
  • 📱 Mobile-First — progressive-disclosure drawer, peek/expand states, tap-through marker popups
  • Edge Deployed — Cloudflare Workers, global CDN, zero cold starts
  • 🎞️ Near-Zero Bandwidth — UI reads a pre-aggregated feed; no heavy client polling

Architecture

                  ┌─────────────────────────────┐
   Cron (*/30m) → │  news-worker  (aggregator)  │
                  │  Claude + NewsAPI → KV cache │
                  └──────────────┬──────────────┘
                                 │  /intel  (JSON, persisted)
                 ┌───────────────┴───────────────┐
                 ▼                                ▼
   ┌──────────────────────────┐   ┌──────────────────────────┐
   │  strait-tracker (desktop)│   │ strait-tracker-mobile     │
   │  SVG map + intel rail    │   │ Leaflet map + drawer UI   │
   └──────────────────────────┘   └──────────────────────────┘

Stack: Cloudflare Workers · Cloudflare KV · Cron Triggers · Leaflet.js · NewsAPI · Claude · vanilla JS (zero build step)

The UI workers are stateless — they render a feed produced and persisted by a separate aggregator worker. That keeps the front-end fast, the data resilient (it survives upstream outages), and bandwidth near zero.


Repository Layout

src/
  strait-tracker-desktop.js   # Desktop worker — SVG map + intel rail
  strait-tracker-mobile.js    # Mobile worker — Leaflet + drawer UI
wrangler.toml.example         # Copy → wrangler.toml, fill in your IDs

The news-aggregator worker (Claude + NewsAPI → KV) is environment-specific and not included. Point INTEL_API in each UI worker at your own /intel endpoint (see YOUR-NEWS-WORKER placeholder).


Self-Hosting

git clone https://github.com/indicaindependent/straittracker
cd straittracker

cp wrangler.toml.example wrangler.toml
# Fill in: CF account ID, KV namespace ID

# Point INTEL_API in src/*.js at your own news-feed worker's /intel endpoint
# (search for YOUR-NEWS-WORKER and replace)

wrangler deploy

No API keys are required by the UI workers themselves — they only read a JSON feed. Keys (NewsAPI, Claude) live in your separate aggregator worker.


License

MIT — use it, fork it, build on it.


Part of the WarHeatMap intelligence stack | Built by Indica Independent

About

⚡ Real-time Strait of Hormuz geopolitical intelligence tracker — CF Workers + NewsAPI + Leaflet

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors