WorldView-Lite is a geospatial situational-awareness app with:
- React + Vite + TypeScript + CesiumJS frontend
- FastAPI backend exposing REST + WebSocket
- PostgreSQL + PostGIS storage with SQL migrations
- Connector + scheduled ingestion (USGS earthquake feed)
- Normalization into
entities,observations, andevents - Live delta broadcasting over WebSocket
- Historical track query per entity
frontend/: map UI, layer manager, object inspector, live mode, historical query controlsbackend/: FastAPI API, WebSocket live hub, ingestion scheduler, migration runnerbackend/migrations/: SQL schema/index migrations for PostGISdocker-compose.yml: PostGIS DB + backend services
- Layer engine
pointslayer (earthquake observation markers)eventslayer (earthquake event markers)trackslayer (historical polyline for selected entity)
- Sidebar layer manager
- layer visibility toggles
- entity list selection
- historical track query trigger
- live mode toggle
- Object inspector
- selected entity details
- selected map object properties
- Live mode via WebSocket
- backend broadcasts ingestion deltas to
/ws/live
- backend broadcasts ingestion deltas to
- Historical track query
GET /entities/{entity_id}/track?start=&end=
- Connector and ingestion
- USGS feed:
all_hour.geojson - scheduled via APScheduler (
INGEST_INTERVAL_SECONDS) - upsert normalized data into DB
- USGS feed:
entities- stable object identity (
source,external_idunique)
- stable object identity (
observations- timestamped position/telemetry rows per entity
- PostGIS
geom(Point,4326) - unique
(entity_id, observed_at)
events- domain events (earthquakes)
- optional
entity_idlink - PostGIS
geom(Point,4326)
From repo root:
docker compose up --buildThis starts:
- DB:
localhost:5432(worldview/worldview) - API:
http://localhost:8000
Migrations are applied automatically in backend container startup (python -m scripts.migrate).
In a new terminal:
cd frontend
npm install
npm run devOpen http://localhost:5173.
Copy backend/.env.example to backend/.env for local non-docker runs.
DB_HOST,DB_PORT,DB_NAME,DB_USER,DB_PASSWORDCORS_ORIGINSUSGS_FEED_URLINGEST_INTERVAL_SECONDS
Use frontend/.env if needed:
VITE_API_BASE_URL=http://localhost:8000
VITE_CESIUM_ION_TOKEN=<your_cesium_ion_token_optional>Cesium can run without an Ion token for basic rendering; token improves terrain/asset access.
GET /healthGET /layersGET /entitiesGET /entities/{entity_id}GET /eventsGET /entities/{entity_id}/trackWS /ws/live
Requirements: Python 3.12+, reachable Postgres/PostGIS.
cd backend
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
python -m scripts.migrate
uvicorn app.main:app --reload --host 0.0.0.0 --port 8000- Connector currently ingests USGS earthquakes every 60s by default.
- Delta broadcasting currently emits one message per ingested event/observation row.
- Tracks are derived from
observationsfor the selected entity and time range.