Commit Graph

29 Commits

Author SHA1 Message Date
Elie Habib
54f1a5d578 test: add coverage for finance/trending/reload and stabilize map harness 2026-02-17 19:22:55 +04:00
Elie Habib
a78a072079 fix(deploy): prevent stale chunk 404s after Vercel redeployment
- vercel.json: add no-cache headers for / and /index.html so CDN never serves stale HTML
- main.ts: add vite:preloadError listener to auto-reload once on chunk 404s
- vite.config.ts: remove HTML from SW precache, add NetworkFirst for navigation requests
2026-02-17 11:30:58 +04:00
Claude
01fb23df5c feat: add finance/trading variant with market-focused dashboard
Add a new 'finance' site variant (finance.worldmonitor.app) following the
same pattern as the existing tech variant. Includes:

- Finance-specific RSS feeds: markets, forex, bonds, commodities, crypto,
  central banks, economic data, IPOs/M&A, derivatives, fintech, regulation,
  institutional investors, and market analysis (all free/open RSS sources)
- Finance-focused panels with trading-themed labels (Market Headlines,
  Live Markets, Forex & Currencies, Fixed Income, etc.)
- Geographic data for stock exchanges (30+), financial centers (20+),
  central banks (14), and commodity hubs (10) worldwide
- Four new map layers: stockExchanges, financialCenters, centralBanks,
  commodityHubs with tier-based icons and zoom-dependent labels
- Map popup rendering for all finance marker types
- Variant switcher updated with FINANCE tab in header
- Search modal with finance-specific sources and icons
- Vite HTML variant plugin metadata for SEO
- Build scripts (dev:finance, build:finance, test:e2e:finance)
- Tauri desktop config for Finance Monitor app

https://claude.ai/code/session_01CCmkws2EYuUHjYDonzXEtY
2026-02-16 11:22:17 +01:00
Elie Habib
7e7ab126c8 fix: force immediate SW activation to prevent stale asset errors
Add skipWaiting, clientsClaim, and cleanupOutdatedCaches to workbox
config. Fixes NS_ERROR_CORRUPTED_CONTENT / MIME type errors when
users have a cached service worker serving old HTML that references
asset hashes no longer on the CDN after redeployment.
2026-02-15 20:37:23 +04:00
Elie Habib
e1925e735c Consolidate variant naming and fix PWA tile caching
- Rename variant default from 'world' to 'full' across config files
- Replace all startups.worldmonitor.app references with tech.worldmonitor.app
- Add CARTO basemap tile caching to Workbox runtime config (basemaps.cartocdn.com)
2026-02-15 00:15:33 +04:00
Elie Habib
c353cf2070 Reduce egress costs, add PWA support, fix Polymarket and Railway relay
Egress optimization:
- Add s-maxage + stale-while-revalidate to all API endpoints for Vercel CDN caching
- Add vercel.json with immutable caching for hashed assets
- Add gzip compression to sidecar responses >1KB
- Add gzip to Railway RSS responses (4 paths previously uncompressed)
- Increase polling intervals: markets/crypto 60s→120s, ETF/macro/stablecoins 60s→180s
- Remove hardcoded Railway URL from theater-posture.js (now env-var only)

PWA / Service Worker:
- Add vite-plugin-pwa with autoUpdate strategy
- Cache map tiles (CacheFirst), fonts (StaleWhileRevalidate), static assets
- NetworkOnly for all /api/* routes (real-time data must be fresh)
- Manual SW registration (web only, skip Tauri)
- Add offline fallback page
- Replace manual manifest with plugin-generated manifest

Polymarket fix:
- Route dev proxy through production Vercel (bypasses JA3 blocking)
- Add 4th fallback tier: production URL as absolute fallback

Desktop/Sidecar:
- Dual-backend cache (_upstash-cache.js): Redis cloud + in-memory+file desktop
- Settings window OK/Cancel redesign
- Runtime config and secret injection improvements
2026-02-14 19:53:04 +04:00
Elie Habib
ad4e52caee Fix Tauri desktop runtime reliability and settings UX 2026-02-13 23:05:51 +04:00
Elie Habib
1c90d4d1dd Improve build chunking and fix documentation metadata 2026-02-13 15:20:29 +04:00
Elie Habib
c80136ffdb Add sparkline charts to Markets, Crypto, and Commodities panels
- Extract close price arrays from Yahoo Finance chart API for indices/commodities
- Switch CoinGecko crypto fetch to /coins/markets endpoint with 7d sparkline data
- Render inline SVG sparklines color-coded green/red by price direction
- Fix Vite dev proxy for CoinGecko (was hitting root instead of /api/v3/simple/price)
- Add endpoint=markets support to CoinGecko edge function
2026-02-12 00:20:44 +04:00
Elie Habib
2d076d091d Add variant-specific meta tags for tech.worldmonitor.app
Transform HTML meta tags (title, description, keywords, OG, Twitter, JSON-LD)
based on VITE_VARIANT during build. Tech Monitor now has distinct branding
focused on AI/tech industry tracking.
2026-01-23 11:53:35 +04:00
Elie Habib
5d037c4132 Add tech variant with expanded global tech ecosystem data
- Add variant system (full/tech) with VITE_VARIANT env var
- Create tech-geo.ts with 465 entries:
  - 295 TECH_HQS (FAANG, unicorns across US, Europe, MENA, India, SEA, China, LATAM, Africa)
  - 112 ACCELERATORS (YC, Techstars, 500 Global, regional accelerators)
  - 38 STARTUP_HUBS (mega/major/emerging tiers)
  - 20 CLOUD_REGIONS (AWS, GCP, Azure, Cloudflare)
- Add map layers: startupHubs, cloudRegions, accelerators, techHQs
- Add tech-specific RSS feeds and panels
- Fix YouTube channel fallback IDs (Yahoo Finance, NASA TV, TBPN)
- MENA expansion: 50+ companies (UAE, Saudi, Egypt, Jordan)
- India: 40+ unicorns (Flipkart, PhonePe, Razorpay, etc)
- SEA: 25+ companies (Grab, GoTo, J&T Express, etc)
- LATAM: 35+ companies (Nubank, MercadoLibre, Bitso, etc)
2026-01-22 23:18:32 +04:00
Elie Habib
d57b27a375 Auto-inject version from package.json into header
- Add __APP_VERSION__ define in vite.config.ts
- Create vite-env.d.ts for TypeScript declaration
- Replace hardcoded version in App.ts with dynamic value
2026-01-18 13:45:43 +04:00
Elie Habib
52dc327af6 Add chunk splitting for d3 and topojson to reduce bundle size 2026-01-11 15:26:10 +04:00
Elie Habib
d0bea3a4dd Add detailed error messages to OpenSky proxy 2026-01-11 09:03:27 +04:00
Claude
551f69bf6a Add military flight and vessel tracking feature
- Add types for military flights, vessels, and clusters (MilitaryFlight,
  MilitaryVessel, MilitaryFlightCluster, MilitaryVesselCluster)
- Create military-flights.ts service with OpenSky Network API integration
  for tracking military aircraft (fighters, bombers, tankers, AWACS, etc.)
- Create military-vessels.ts service leveraging AIS stream to detect
  military/government vessels (carriers, destroyers, submarines, etc.)
- Add comprehensive military callsign patterns and aircraft type database
  in config/military.ts (US, NATO, Russia, China callsigns)
- Add known naval vessel database with carrier strike groups
- Implement military hotspot detection for strategic regions (Taiwan Strait,
  South China Sea, Persian Gulf, Black Sea, etc.)
- Add map rendering for military flights and vessels with operator-specific
  colors, aircraft type icons, and flight track trails
- Add CSS styles for military markers with pulsing animations for
  interesting activity
- Integrate into App.ts with 2-minute refresh for flights, 5-minute for vessels
- Add OpenSky and ADS-B Exchange API proxies in vite.config.ts
2026-01-11 03:31:17 +00:00
Elie Habib
a46d98dae1 Move FRED API key to server-side for security
- Updated api/fred-data.js serverless function to use FRED API with
  server-side API key (via FRED_API_KEY env var)
- Removed hardcoded API key from frontend code
- Frontend now calls /api/fred-data without exposing the API key
- Updated vite proxy config for local dev

IMPORTANT: Add FRED_API_KEY to Vercel environment variables!

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-11 00:32:03 +04:00
Elie Habib
b86177beca Fix proxy configs, FRED API, and circuit breaker error states
- Fix economic panel mounting selector (.main → .main-content)
- Add circuit breaker error state to panels (red header on failure)
- Switch FRED to official API with API key (fixes bot protection 404)
- Fix GDELT proxy order (specific /api/gdelt-geo before /api/gdelt)
- Fix click handler violation with requestAnimationFrame
- Add panel error state CSS styling

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-10 23:54:19 +04:00
Elie Habib
aa030469d0 Disable WebGL clustering - preserve all marker shapes
WebGL circles replaced distinct visual features for all layers:
- Earthquakes: magnitude-based sizing + M labels
- Weather: severity-colored emoji icons
- Protests: severity colors + emoji icons + animations
- Outages: severity colors (partial/major/total)
- Flights: delay-severity colors + ✈️ icons
- Irradiators: teal glow effects
- Hotspots: level colors + BREAKING badges
- Bases: nation-specific colors
- Nuclear: status-based styling
- Economic/Datacenters: emoji icons

Also fixed GDELT GEO proxy configuration.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-10 23:28:36 +04:00
Elie Habib
9c652abcbf Fix FAA API, rate limiting, and add conditional data loading
- Switch FAA endpoint from defunct soa.smext.faa.gov to nasstatus.faa.gov
- Parse FAA NASSTATUS XML response (single call instead of per-airport)
- Fix Yahoo Finance 429 rate limiting with smaller batches and backoff
- Add conditional API loading based on layer toggle settings
- Load data only when corresponding layer is enabled
- Trigger data load when layer is toggled on

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-10 14:11:05 +04:00
Elie Habib
5190a8fe97 Add global flight delay alerts layer
Implement hybrid flight delay monitoring with FAA ASWS API for US airports
and computed delays for 75 global airports across Americas, Europe, APAC,
MENA, and Africa regions.

Features:
- Real-time FAA data for US airports (official, free API)
- 75 monitored airports globally with coordinates
- Severity levels: normal, minor, moderate, major, severe
- Delay types: ground stop, ground delay program, departure/arrival delays
- Color-coded markers with pulsing animation for major/severe
- Popup with airport details, delay reason, and source
- 10-minute refresh interval
- URL state persistence for flights layer

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-10 13:58:31 +04:00
Elie Habib
a9d67ed7aa Rename AIS to Shipping, add WebSocket relay for live vessel tracking
- Rename AIS layer to "Shipping" throughout UI for clarity
- Add local WebSocket relay server to proxy aisstream.io data
- Fix cable-activity.ts NGA warnings array handling bug
- Add ws package for relay server
- Improve Shipping service logging and error handling

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-10 13:29:59 +04:00
Elie Habib
154031631a Improve map rendering and expand nuclear facilities data
- Add ~120 nuclear power plants and facilities worldwide (was only 11)
- Fix map projection to fill width and allow vertical panning
- Set default zoom to 1.5 for better initial view
- Increase GDELT protest threshold to 200+ reports
- Fix localStorage merge for new layer defaults
- Fix nuclear facility coordinates (South Texas, Laguna Verde)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-10 08:19:19 +04:00
Elie Habib
8b991b0ef9 Add ACLED + GDELT protest tracking with live geocoded data
Features:
- ACLED API integration for verified protest/riot data with precise coordinates
- GDELT GEO 2.0 API for real-time global event coverage (no auth required)
- Multi-source deduplication and validation scoring
- Severity classification (high/medium/low) based on fatalities and event type
- Protest markers with type-specific icons (riot, strike, demonstration)
- Popup with source info, actors, tags, and nearby intel hotspots
- 15-minute refresh interval matching GDELT update frequency

Data sources:
- ACLED: 200+ countries, daily updates, geocoded to city level
- GDELT: 15-min updates, sentiment analysis, global coverage

Requires VITE_ACLED_API_KEY and VITE_ACLED_EMAIL for full coverage
Falls back to GDELT-only mode if ACLED not configured
2026-01-10 07:15:38 +04:00
Elie Habib
e5f4034d67 Replace fake RSS feeds with NGA MSI Navigation Warnings API
- Integrated official NGA Maritime Safety Information API
- Real navigation warnings for cable operations worldwide
- Coordinate parsing from warning text (DMS and decimal formats)
- Cableship name extraction (CS, M/V, CABLESHIP patterns)
- Automatic matching to nearest known undersea cable
- Severity detection (fault vs operational warnings)
- Ship status detection (on-station vs enroute)

Data source: https://msi.nga.mil/api/publications/broadcast-warn
2026-01-10 06:49:00 +04:00
Elie Habib
0db94ee8ad Add comprehensive search across all data sources
- Extended search modal to cover pipelines, cables, datacenters, nuclear facilities, irradiators
- Added trigger methods to MapComponent for all searchable entity types
- Auto-enables relevant map layer when selecting search results
- Added ⌘K search button to header with styling
- Expanded pipeline data to 88 real operating pipelines globally
- Fixed type errors and simplified pipeline status handling
2026-01-09 22:47:55 +04:00
Elie Habib
670b352384 Fix FRED: add CORS proxy and parallel fetching
- Changed FRED URL to use /api/fred proxy path
- Added FRED proxy to vite.config.ts and proxy.ts
- Refactored sequential fetching to use Promise.all for 7x speed improvement
- Fixed TypeScript types for async map
2026-01-09 11:50:46 +04:00
Elie Habib
7fdb434a26 Add government press releases feeds (White House, State, Pentagon, etc.)
- Added 10 official government RSS sources to gov category
- Added source tier rankings for government sources (Tier 1-2)
- Updated proxy mappings for new government domains
2026-01-09 11:41:11 +04:00
Elie Habib
4b130009fb Fix broken RSS feeds and remove non-working sources
- Remove feeds with no working RSS: Reuters, White House, Treasury,
  Anthropic, Google AI, DeepMind, OpenAI, CSIS, CFR, Brookings
- Replace with working alternatives:
  - AP News via RSSHub
  - VentureBeat for AI news
  - Foreign Policy for think tanks
  - Google News RSS searches for AI, gov, think tanks, defense
- Clean up unused proxy mappings
2026-01-08 21:49:00 +04:00
Elie Habib
27892b306c Initial commit: World Monitor dashboard
Features:
- Real-time geopolitical monitoring dashboard
- Interactive D3.js world map with hotspots, conflicts, bases
- 16 news/data panels: World, Middle East, Tech, AI/ML, Finance, etc.
- Market data via Yahoo Finance (with rate limiting)
- Crypto prices via CoinGecko
- Prediction markets via Polymarket
- Earthquake data via USGS
- RSS feeds from 50+ sources including:
  - News: BBC, NPR, Guardian, Reuters, Al Jazeera
  - AI: OpenAI, Anthropic, Google AI, DeepMind
  - Government: White House, State Dept, Fed, SEC, Treasury
  - Intel: Defense One, Bellingcat, CISA, Krebs
  - Think Tanks: Brookings, CFR, CSIS
- Custom monitors with keyword alerts
- Draggable panel layout with persistence
- Time range filtering for events
- Dark theme optimized for monitoring
2026-01-08 21:29:47 +04:00