Commit Graph

17 Commits

Author SHA1 Message Date
Elie Habib
7e1dfcb160 Improve search results and fix RSS feeds
- Double MAX_RESULTS from 12 to 24
- Prioritize news over static infrastructure in search
- Update News24 URL to post-redirect destination (feeds.capi24.com)
- Add trailing slash to SCMP URL
- Add feeds.capi24.com to both proxy allowlists
2026-01-25 13:51:54 +04:00
Elie Habib
d62923ee37 Add redirect following (301/302) to Railway RSS proxy 2026-01-25 13:50:00 +04:00
Elie Habib
01f5af89b8 Add missing domains to Railway RSS proxy allowlist
Railway's RSS proxy had only 5 domains in allowlist, causing 403 errors.
Added all domains that use railwayRss() routing in feeds.ts:
- Al Arabiya, Arab News, Times of Israel, SCMP
- UN News, CISA, News24
- Plus IAEA, WHO, Crisis Group, Kyiv Independent, Moscow Times for future use
2026-01-25 13:27:19 +04:00
Elie Habib
6f879d899e Fix data freshness and OpenSky OAuth2 authentication
- Make ACLED optional (GDELT provides fallback protest data)
- Core sources now: gdelt + rss (was: acled + gdelt + rss)
- Update Railway proxy to use OAuth2 client credentials flow
- Cache OAuth2 token with auto-refresh before expiry
- Invalidate token cache on 401 response
2026-01-15 08:12:52 +04:00
Elie Habib
02f8d6bd31 Add OpenSky authentication to Railway proxy
OpenSky blocks unauthenticated cloud IPs. Updated proxy to
use Basic Auth with OPENSKY_CLIENT_ID and OPENSKY_CLIENT_SECRET
environment variables.
2026-01-13 22:29:40 +04:00
Elie Habib
7d9d5b3d30 fix(ais-relay): race condition causing WebSocket crash
- Skip if socket is CONNECTING (not just OPEN)
- Use local socket reference to prevent event handler confusion
- Add race condition guards before send/message operations
- Set upstreamSocket=null on close for clean reconnection
2026-01-13 11:09:12 +04:00
Elie Habib
32f3d9f231 Route UN News + CISA feeds via Railway proxy
- Add news.un.org and www.cisa.gov to Railway RSS allowlist
- Reuse existing VITE_WS_RELAY_URL for RSS proxy (no new env var needed)
- Falls back to Vercel proxy if Railway not configured
2026-01-12 22:29:38 +04:00
Elie Habib
9df91b2dd5 Remove The Telegraph feed - blocks all cloud providers
Akamai CDN blocks both Vercel and Railway IPs, making the
feed unreachable from any cloud infrastructure. Guardian
already provides UK news coverage.
2026-01-11 17:29:42 +04:00
Elie Habib
6b3a1f78ff Add Railway RSS proxy for feeds that block Vercel
- Add /rss endpoint to ais-relay.cjs for blocked domains
- Add railwayRss() helper that routes to Railway relay
- Route Telegraph and CNN through Railway proxy
- Keeps security whitelist on Railway side
2026-01-11 17:21:16 +04:00
Elie Habib
4bc957a362 Route OpenSky through Railway relay (bypasses Vercel block)
- Add /opensky HTTP endpoint to ais-relay.cjs
- Update military-flights.ts to use Railway for OpenSky
- Converts VITE_WS_RELAY_URL to HTTP URL for same server
2026-01-11 09:15:46 +04:00
Elie Habib
995ade3f4b Split architecture: Vercel frontend + Railway WebSocket
- Railway: WebSocket relay only (simpler)
- Vercel: Frontend + API serverless functions
- Added Cloudflare Radar serverless proxy
- Removed auth header from frontend (serverless handles it)

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-10 14:32:18 +04:00
Elie Habib
5d7fab64ae Fix: Convert Buffer to string for browser WebSocket clients
Node.js ws library receives messages as Buffer by default.
Browser WebSocket expects string data.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-10 14:24:12 +04:00
Elie Habib
3d1ab4cf58 Serve frontend + WebSocket from single Railway deployment
- Relay now serves static files from dist/
- Frontend connects to WebSocket on same origin
- Railway build: npm install && npm run build && cd scripts && npm install

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-10 14:19:39 +04:00
Elie Habib
fe1bccdd40 Add HTTP server for Railway health checks
Railway requires an HTTP endpoint for health checks. Added HTTP server
that responds to / and /health with status JSON, with WebSocket server
attached to the same HTTP server.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-10 14:01:33 +04:00
Elie Habib
24b95a4532 Prepare AIS relay for Railway deployment
- Add package.json for standalone deployment
- Use PORT env variable for Railway compatibility
- Support AISSTREAM_API_KEY env variable

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-10 13:50:59 +04:00
Elie Habib
70f26c9cf4 Remove hardcoded API key from relay script
Require VITE_AISSTREAM_API_KEY env variable instead of fallback

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-10 13:44:19 +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