Skip to content

shez1461/worldview-ui

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

23 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ›ฐ๏ธ WORLDVIEW-UI - Geospatial Intelligence Dashboard

WorldView-UI

A modern, real-time geospatial intelligence platform built with Next.js and CesiumJS.
Monitor global activity through an interactive 3D interface with live data from multiple public sources.

๐Ÿ”— Live Demo - www.shez.app

Next.js 16 React 19 TypeScript CesiumJS Tailwind 4 Node.js 20

preview.mp4

https://youtu.be/q8ASmSO6uIc


๐Ÿ“‹ Overview

WorldView-UI transforms publicly available geospatial data into a cohesive, military-grade situational awareness dashboard. Built as a modern alternative to traditional command-and-control interfaces, it demonstrates what's possible when combining open data sources with contemporary web technologies.

The platform aggregates six distinct data layers into a single, interactive 3D globe with a dark tactical interface and real-time visual effects.

โœจ Key Features

Layer Data Source Update Frequency Description
โœˆ๏ธ Commercial Flights FlightRadar24 + adsb.fi 5โ€“20 seconds ~25,000+ global aircraft with altitude-based coloring and route visualization
๐Ÿ›ฐ๏ธ Satellites CelesTrak TLE + SGP4 2 seconds (propagation) Live orbital tracking with ground tracks, nadir lines, and future path prediction
๐ŸŒ‹ Earthquakes USGS GeoJSON 60 seconds Recent seismic activity with magnitude-based scaling and pulsing markers
๐Ÿšข Maritime Traffic AISStream.io 60 seconds (burst-cached) Global vessel tracking with ship type classification and movement trails
๐Ÿš— Road Traffic OpenStreetMap Overpass On-demand Dynamic road network visualization with animated particle flow
๐Ÿ“น Public CCTV TfL, Austin, NSW Transport 5 minutes Live camera feeds projected onto their exact geographic locations

๐ŸŽฏ Why WorldView-UI?

This project serves multiple purposes:

  • Educational resource โ€“ Demonstrates integration of diverse real-time data sources
  • Geospatial experimentation โ€“ Showcases CesiumJS capabilities with modern React patterns
  • Open data advocacy โ€“ Highlights the wealth of publicly available geospatial information
  • Tactical interface design โ€“ Explores effective visualization of complex data streams

Unlike traditional geospatial applications, WorldView-UI prioritizes:

  • Performance โ€“ Handles thousands of moving entities at 60fps
  • Visual clarity โ€“ Military-inspired design language reduces cognitive load
  • Extensibility โ€“ Modular architecture makes adding new data layers straightforward

๐Ÿ—๏ธ Architecture

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                    Browser (Next.js App)                      โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”‚
โ”‚  โ”‚ โ€ข Client page (`app/page.tsx`) + dynamic Cesium load   โ”‚  โ”‚
โ”‚  โ”‚ โ€ข Earthquakes fetch directly from USGS                 โ”‚  โ”‚
โ”‚  โ”‚ โ€ข Other telemetry via `/api/*` routes                  โ”‚  โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                             โ”‚ fetch /api/*
                             โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚              Next.js API Routes (serverless)                   โ”‚
โ”‚  โ€ข /api/flights        โ€“ FR24 + adsb.fi fallback             โ”‚
โ”‚  โ€ข /api/flights/live   โ€“ adsb.fi regional (4 s cache)        โ”‚
โ”‚  โ€ข /api/satellites     โ€“ TLE proxy (2 h cache)               โ”‚
โ”‚  โ€ข /api/ships          โ€“ AISStream.io burst (60 s cache)     โ”‚
โ”‚  โ€ข /api/traffic/roads  โ€“ Overpass + static fallback          โ”‚
โ”‚  โ€ข /api/cctv           โ€“ Camera feed aggregation (5 m cache) โ”‚
โ”‚  โ€ข /api/cctv/image     โ€“ CORS-bypassing image proxy          โ”‚
โ”‚  โ€ข /api/geolocation    โ€“ IP geolocation fallback             โ”‚
โ”‚  โ€ข /api/health         โ€“ Uptime/status probe                 โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐Ÿ”„ Data Flow

  1. Client-side hooks (useFlights, useShips, etc.) poll Next.js API routes; useEarthquakes fetches USGS directly
  2. API routes act as proxies โ€” they fetch from upstream providers, cache responses, and handle authentication
  3. CesiumJS scene renders entities using imperative primitives for optimal performance
  4. UI components display controls and real-time event feeds outside the 3D canvas
  5. Entity tracking locks camera to selected objects with smooth following behaviour

๐Ÿ› ๏ธ Technology Stack

Frontend

  • Framework: Next.js 16 (App Router) with React 19
  • 3D Rendering: CesiumJS 1.138 via Resium React bindings
  • Styling: Tailwind CSS 4 with custom tactical theme
  • Language: TypeScript 5.7 (strict mode)
  • Build Tool: Built-in Next.js compiler (SWC)

Backend (API Routes)

  • Runtime: Node.js 20+ (serverless on Vercel)
  • Caching: In-memory with TTL (simplified for serverless)
  • External APIs: REST + WebSocket (AISStream burst pattern)

Key Libraries

  • satellite.js โ€“ SGP4 orbit propagation
  • ws โ€“ WebSocket client for AISStream
  • resium โ€“ React bindings for CesiumJS

๐Ÿš€ Getting Started

Prerequisites

  • Node.js 20.x or later
  • npm 10.x or later
  • Git

Installation

# Clone the repository
git clone https://github.com/shez1461/worldview-ui.git
cd worldview-ui

# Install dependencies
npm install

# Copy environment variable template
cp .env.local.example .env.local

Environment Configuration

WorldView-UI requires several API keys to function fully. Edit .env.local after copying:

# Required for 3D terrain and imagery (falls back to OSM if missing)
NEXT_PUBLIC_GOOGLE_API_KEY=your_google_maps_api_key
NEXT_PUBLIC_CESIUM_ION_TOKEN=your_cesium_ion_token

# Optional manual override for UI version shown in StatusBar.
# If omitted, version is derived automatically from git tags at build time.
# NEXT_PUBLIC_APP_VERSION=0.7.0

# Server-side only (never exposed to client)
AISSTREAM_API_KEY=your_aisstream_api_key
OPENSKY_CLIENT_ID=your_opensky_client_id
OPENSKY_CLIENT_SECRET=your_opensky_client_secret
NSW_TRANSPORT_API_KEY=your_nsw_transport_key

Useful Scripts

npm run dev
npm run build
npm run start
npm run lint
npm run proxy
npm run copy-cesium-assets

Development Server

npm run dev

Visit http://localhost:3000 to see the application.


๐Ÿ”‘ Obtaining API Keys

๐Ÿ—บ๏ธ Google Maps 3D Tiles

  1. Visit Google Cloud Console
  2. Create a project and enable the Map Tiles API
  3. Generate an API key and restrict it to:
    • HTTP referrers (your domains)
    • Map Tiles API only
  4. Add to NEXT_PUBLIC_GOOGLE_API_KEY

Free tier: $200/month credit (~25,000 tile loads)

๐Ÿ›ฐ๏ธ Cesium Ion (optional)

  1. Register at Cesium Ion
  2. Copy your default access token
  3. Add to NEXT_PUBLIC_CESIUM_ION_TOKEN

๐Ÿšข AISStream.io (maritime data)

  1. Sign up at AISStream.io
  2. Generate an API key from your dashboard
  3. Add to AISSTREAM_API_KEY

Free tier provides full global AIS stream

๐Ÿ“น Transport for NSW (Australian CCTV)

  1. Register at Transport NSW Open Data
  2. Create an application and subscribe to Traffic & Cameras
  3. Add key to NSW_TRANSPORT_API_KEY

๐Ÿ“ Project Structure

worldview-ui/
โ”œโ”€โ”€ app/                         # Next.js App Router
โ”‚   โ”œโ”€โ”€ page.tsx                 # Main dashboard (client component)
โ”‚   โ”œโ”€โ”€ layout.tsx               # Root layout with tactical theme
โ”‚   โ”œโ”€โ”€ globals.css              # Tailwind v4 + wv-* design tokens
โ”‚   โ””โ”€โ”€ api/                     # API routes (serverless functions)
โ”‚       โ”œโ”€โ”€ flights/             # Global flight data (FR24 / OpenSky)
โ”‚       โ”œโ”€โ”€ flights/live/        # Regional high-frequency (adsb.fi)
โ”‚       โ”œโ”€โ”€ satellites/          # TLE fetch + SGP4 propagation
โ”‚       โ”œโ”€โ”€ ships/               # AISStream.io burst cache
โ”‚       โ”œโ”€โ”€ traffic/roads/       # OpenStreetMap road network
โ”‚       โ”œโ”€โ”€ cctv/                # Camera feed aggregation
โ”‚       โ”œโ”€โ”€ cctv/image/          # CORS-bypassing image proxy
โ”‚       โ”œโ”€โ”€ geolocation/         # IP geolocation fallback
โ”‚       โ””โ”€โ”€ health/              # uptime/status probe
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ globe/                   # Cesium viewer components
โ”‚   โ”‚   โ”œโ”€โ”€ GlobeViewer.tsx      # <Viewer> root + ShaderManager
โ”‚   โ”‚   โ””โ”€โ”€ EntityClickHandler.tsx  # drillPick โ†’ entity classification
โ”‚   โ”œโ”€โ”€ layers/                  # Data layer renderers (inside <Viewer>)
โ”‚   โ”‚   โ”œโ”€โ”€ FlightLayer.tsx      # BillboardCollection + PolylineCollection
โ”‚   โ”‚   โ”œโ”€โ”€ SatelliteLayer.tsx   # React <Entity> per satellite
โ”‚   โ”‚   โ”œโ”€โ”€ EarthquakeLayer.tsx  # Declarative <Entity> + memo()
โ”‚   โ”‚   โ”œโ”€โ”€ ShipLayer.tsx        # BillboardCollection (AIS vessels)
โ”‚   โ”‚   โ”œโ”€โ”€ TrafficLayer.tsx     # PolylineCollection + PointPrimitiveCollection
โ”‚   โ”‚   โ””โ”€โ”€ CCTVLayer.tsx        # BillboardCollection (camera icons)
โ”‚   โ”œโ”€โ”€ hooks/                   # Data-fetching hooks
โ”‚   โ”‚   โ”œโ”€โ”€ useFlights.ts        # Global aircraft (20 s poll)
โ”‚   โ”‚   โ”œโ”€โ”€ useFlightsLive.ts    # Regional aircraft (5 s poll)
โ”‚   โ”‚   โ”œโ”€โ”€ useSatellites.ts     # TLE propagation via satellite.js
โ”‚   โ”‚   โ”œโ”€โ”€ useEarthquakes.ts    # USGS direct fetch (60 s poll)
โ”‚   โ”‚   โ”œโ”€โ”€ useShips.ts          # AIS vessels (30 s poll)
โ”‚   โ”‚   โ”œโ”€โ”€ useTraffic.ts        # Road network + animated vehicles
โ”‚   โ”‚   โ”œโ”€โ”€ useCameras.ts        # CCTV feeds (5 min poll)
โ”‚   โ”‚   โ”œโ”€โ”€ useGeolocation.ts    # Browser GPS โ†’ IP fallback
โ”‚   โ”‚   โ”œโ”€โ”€ useAudio.ts          # Tactical audio singleton
โ”‚   โ”‚   โ””โ”€โ”€ useIsMobile.ts       # matchMedia breakpoint (768 px)
โ”‚   โ”œโ”€โ”€ lib/
โ”‚   โ”‚   โ””โ”€โ”€ audio.ts             # Web Audio API singleton
โ”‚   โ”œโ”€โ”€ data/
โ”‚   โ”‚   โ””โ”€โ”€ airports.ts          # Airport coordinate database
โ”‚   โ”œโ”€โ”€ shaders/
โ”‚   โ”‚   โ””โ”€โ”€ postprocess.ts       # GLSL strings for CRT / NVG / FLIR
โ”‚   โ”œโ”€โ”€ types/
โ”‚   โ”‚   โ””โ”€โ”€ camera.ts            # CameraFeed, CameraApiResponse types
โ”‚   โ””โ”€โ”€ ui/                      # HUD overlay components
โ”‚       โ”œโ”€โ”€ OperationsPanel.tsx  # Layer toggles, shader picker
โ”‚       โ”œโ”€โ”€ IntelFeed.tsx        # Scrolling event log
โ”‚       โ”œโ”€โ”€ StatusBar.tsx        # UTC clock, camera position
โ”‚       โ”œโ”€โ”€ TrackedEntityPanel.tsx  # Entity details when tracking
โ”‚       โ”œโ”€โ”€ CCTVPanel.tsx        # Camera thumbnails
โ”‚       โ”œโ”€โ”€ SplashScreen.tsx     # Boot sequence + audio cues
โ”‚       โ”œโ”€โ”€ MobileModal.tsx      # Full-screen modal (mobile)
โ”‚       โ”œโ”€โ”€ AudioToggle.tsx      # Mute/unmute button
โ”‚       โ”œโ”€โ”€ Crosshair.tsx        # Centre reticle overlay
โ”‚       โ””โ”€โ”€ FilmGrain.tsx        # Canvas-based analogue noise
โ”œโ”€โ”€ .env.local.example           # Environment variable template
โ”œโ”€โ”€ next.config.ts               # Next.js configuration
โ”œโ”€โ”€ postcss.config.mjs           # Tailwind v4 PostCSS plugin
โ””โ”€โ”€ tsconfig.json                # TypeScript configuration

๐ŸŽฎ Features in Detail

๐ŸŽฏ Entity Tracking

Click any object on the globe to lock the camera and follow its movement:

Entity Camera Distance View
Aircraft 50 km Trailing, heading-aligned
Satellites 200 km Orbital perspective
Ships 20 km Low-angle tracking
Earthquakes 100 km Overhead
CCTV cameras 2 km Street-level

Press ESC to release tracking.

๐Ÿ”ญ Visual Modes

Cycle through post-processing effects for different analytical perspectives:

Mode Visual Effect Best For
Standard Clean, unprocessed view General observation
CRT Scanlines, chromatic aberration Retro tactical aesthetic
Night Vision Green phosphor, noise grain Low-light scenarios
FLIR Thermal palette, edge detection Heat signature analysis

๐ŸŒ Map Layers

  • Google 3D Tiles โ€“ Photorealistic buildings and terrain (requires API key)
  • OpenStreetMap โ€“ Fallback 2D imagery (always available, no key needed)

๐Ÿ“ก API Routes

Endpoint Method Cache Description
/api/flights GET 30 s Global commercial aircraft
/api/flights/live?lat&lon&dist GET 4 s Regional high-frequency flights
/api/satellites GET 2 h TLE data for all tracked satellites
/api/ships?moving=1 GET 60 s Maritime vessel positions
/api/traffic/roads?south&west&north&east GET 24 h Road network geometry
/api/cctv?country GET 5 m Camera feed locations
/api/cctv/image?url GET 60 s CORS-bypassing image proxy
/api/geolocation GET โ€” IP geolocation fallback
/api/health GET โ€” Server status and uptime

๐Ÿšข Deployment to Vercel

One-Click Deploy

  1. Push your code to a GitHub repository
  2. Visit Vercel โ€” New Project
  3. Import your worldview-ui repository
  4. Configure environment variables (copy from .env.local)
  5. Click Deploy

Custom Domain

After deployment:

  1. Go to your project dashboard on Vercel
  2. Navigate to Settings โ†’ Domains
  3. Add shez.app and follow the DNS configuration instructions

Vercel will automatically provision SSL certificates.

Environment Variables on Vercel

  • NEXT_PUBLIC_* variables are embedded at build time
  • Server-side variables are available to API routes at runtime

๐Ÿงช Performance Optimisations

WorldView-UI handles thousands of moving entities through several techniques:

Rendering

  • Imperative Cesium primitives โ€“ BillboardCollection, PolylineCollection instead of React <Entity> components for large datasets
  • Viewport culling โ€“ Entities outside the camera view aren't rendered
  • Instance sharing โ€“ Similar entities share geometry

Data

  • Dead reckoning โ€“ Positions extrapolated between updates at 60 fps
  • Smart polling โ€“ Frequencies adjusted based on zoom level and entity type
  • Aggressive caching โ€“ API routes cache responses to reduce upstream calls

React

  • Client-driven UI shell โ€“ app/page.tsx is a client component; Cesium loads via dynamic import ({ ssr: false })
  • Memoisation โ€“ useMemo and useCallback prevent unnecessary re-renders
  • Dynamic imports โ€“ Cesium loads only when needed ({ ssr: false })

๐Ÿค Contributing

Contributions are welcome! Areas where help is most valuable:

  • New data layers โ€“ Weather, wildfires, power grids, ADS-B military
  • Additional CCTV sources โ€“ More cities and better global coverage
  • Shader effects โ€“ New visual post-processing modes
  • Performance improvements โ€“ Optimise rendering algorithms
  • Documentation โ€“ Tutorials, API references, video walkthroughs

๐Ÿ“œ Credits & Acknowledgements

Original Inspiration

This project builds upon concepts from kevtoe/worldview, adapted and extended for the Next.js ecosystem.

Data Providers

  • Flight tracking: FlightRadar24, adsb.fi, OpenSky Network
  • Satellite orbits: CelesTrak
  • Earthquakes: USGS
  • Maritime: AISStream.io
  • Road networks: OpenStreetMap contributors
  • CCTV feeds: Transport for London, City of Austin, Transport for NSW

Technologies


๐Ÿ”’ Security Notice

No API keys are included in this repository.

All credentials must be provided via environment variables. The repository includes .env.local.example as a template only.

Before committing, verify:

  • .env* files are listed in .gitignore
  • No hardcoded API keys exist in source files
  • Google API key is restricted by HTTP referrer
  • Budget alerts are set in Google Cloud Console

If you discover a security issue, please open a private vulnerability report via GitHub.

About

Real-time tactical intelligence platform - CesiumJS globe with flights, satellites, earthquakes, traffic & CCTV overlays.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors