The Problem
Stakeholders need a single, up‑to‑date visual source for geopolitical events, military installations, and historical conflicts. Manually aggregating OSINT feeds, normalizing locations, and keeping a map current is time‑consuming and error‑prone.
What This Does
The repository delivers a Next.js 16 (App Router) web app that renders a Mapbox‑based world map with real‑time event markers, conflict timelines, and military‑base layers. Core UI lives under components/ (e.g., components/map/threat-map.tsx, components/feed/event-feed.tsx) and data fetching is handled by API routes in app/api/ (e.g., app/api/events/route.ts, app/api/military-bases/route.ts). Authentication flow is encapsulated in components/auth/ and state is managed with Zustand stores in stores/ (e.g., stores/events-store.ts).
How To Use It
Setup
Clone and install dependencies (pnpm lock present; npm works as well) git clone https://github.com/your‑org/globalthreatmap.git cd globalthreatmap npm install # or pnpm install to respect lockfile
Configuration
Create a .env.local (the repo supplies .env.example) with the keys referenced in the code:
NEXTPUBLICMAPBOXTOKEN=YOURMAPBOXTOKEN
VALYUAPIKEY=YOURVALYUKEY NEXTPUBLICAPPMODE=self-hosted optional for AI‑enhanced geocoding OPENAIAPIKEY=YOUROPENAIKEY
The variables are read in lib/oauth.ts, lib/valyu.ts, and next.config.ts.
Running
npm run dev # starts Next.js dev server on http://localhost:3000
The entry point is app/page.tsx, which composes the layout (app/layout.tsx) and injects the map component (components/map/threat-map.tsx). API routes under app/api/ supply JSON to the front end; for example, GET /api/events triggers app/api/events/route.ts.
Real‑World Use
A security analyst could embed the map in an internal dashboard, then use the built‑in alert system (configured via stores/auth-store.ts and components/auth/sign-in-modal.tsx) to receive Slack/webhook notifications whenever a new conflict event appears in a monitored region. The analyst can export the underlying data through the “Intel Dossiers” UI, which calls app/api/deepresearch/route.ts to generate PDFs via the Valyu Answer API.
Code Health & Issues
Med – No test suite – repository contains no .test. files; code paths (e.g., API routes, auth flow) are unverified. Med – Missing CI/CD – no .github/workflows or other pipeline definitions; builds and tests are not automated. Med – No LICENSE – absence of a license file leaves redistribution and commercial use unclear. Low – Inconsistent package manager docs – README uses npm, while lockfile is pnpm-lock.yaml; could cause confusion for contributors. Low – Potential secret leakage – example .env values are not redacted; ensure real keys never get committed. Low – Limited input validation – API routes (e.g., app/api/events/route.ts) rely on external services without explicit schema checks; runtime errors may surface with malformed payloads.
No obvious logical bugs are visible, and TypeScript typing is applied across most files (.tsx, .ts), which helps catch type errors early.
The Bottom Line
The project provides a functional, map‑centric OSINT front end with clear separation of UI, data fetching, and state layers. It is ready for internal use or rapid prototyping, but the lack of tests, CI, and a license means it requires additional engineering effort before production deployment, especially for teams needing formal compliance and reliability guarantees.