How devmj007/ner-logistics works
NER Logistics Intelligence is a browser-based logistics and accessibility prototype for monitoring regional disruptions and choosing safer corridors. Users view operational dashboards, inspect weather, flood and satellite intelligence, calculate ranked routes, submit field reports, and enable alerts. The browser communicates with FastAPI; backend handlers coordinate risk assessment, integrations and persistence. README-described frontend and Firebase capabilities are retained, but some wiring is not shown in the sampled excerpts, so those relationships are documented rather than inferred from module names.
Main entry points: main.py API handlers · config.py Integration settings · app.js Operations UI · osrm_service.py Route ranking
Components 20
Browser experience
- Operations UI
app.js - Browser Firebase
firebase-client.js - Push worker
firebase-messaging-sw.js
API and coordination
- API handlers
backend/app/main.py - Integration settings
backend/app/config.py
Risk intelligence
- Weather feed
backend/app/services/weather_service.py - Flood feed
backend/app/services/flood_service.py - Satellite search
backend/app/services/copernicus_service.py - Risk scoring
backend/app/services/risk_service.py - Route ranking
backend/app/services/osrm_service.py
Persistence and alerts
- Data access
backend/app/database.py - Local data store
ner_data.db - Admin messaging
backend/app/services/firebase_service.py - PostGIS starter schema
database/schema.sql
Other components
- Logistics user
- Open-Meteo
- Open-Meteo Flood
- OSRM
- Sentinel Hub
- Firebase services
Connections 25
- Logistics user → Operations UI: uses
README.md - Operations UI → API handlers: requests data
README.md - API handlers → Weather feed: calls
backend/app/main.py - API handlers → Flood feed: calls
backend/app/main.py - API handlers → Satellite search: calls
backend/app/main.py - API handlers → Route ranking: calls
backend/app/main.py - API handlers → Risk scoring: calls
backend/app/main.py - API handlers → Data access: reads and writes
backend/app/main.py - Weather feed → Open-Meteo: fetches forecast
backend/app/services/weather_service.py - Flood feed → Open-Meteo Flood: fetches discharge
backend/app/services/flood_service.py - Route ranking → OSRM: fetches routes
backend/app/services/osrm_service.py - Route ranking → Risk scoring: classifies risk
backend/app/services/osrm_service.py - Satellite search → Sentinel Hub: searches observations
backend/app/services/copernicus_service.py - Weather feed → Integration settings: loads endpoints
backend/app/services/weather_service.py - Flood feed → Integration settings: loads endpoints
backend/app/services/flood_service.py - Route ranking → Integration settings: loads endpoint
backend/app/services/osrm_service.py - Satellite search → Integration settings: loads credentials
backend/app/services/copernicus_service.py - Admin messaging → Integration settings: loads credentials
backend/app/services/firebase_service.py - Data access → Local data store: persists records
backend/app/database.py - API handlers → Admin messaging: verifies and sends
backend/app/main.py - Operations UI → Browser Firebase: uses login
README.md - Operations UI → Push worker: registers alerts
README.md - Admin messaging → Firebase services: sends push
backend/app/services/firebase_service.py - Browser Firebase → Firebase services: authenticates
README.md - PostGIS starter schema → Data access: schema relationship