How afolabi-adesina-m/smart-shield-ai works
Smart-Shield AI combines multimodal highway-risk scoring with a desktop and mobile map experience for route safety, speed guidance, and related driving features. The principal flow is a driver choosing a route, the demo obtaining directions and scoring candidates, and the interface presenting ranked routes and live road guidance. The README also documents address search, practice-test loops, speed limits, street and exit rules, fleet trip scoring, and installable/offline map-shell support. Some backend modules are named in the README or engine inventory but were not sampled, so their internal wiring is shown only where documented.
Main entry points: api_server.py Desktop API server · mobile_server.py Mobile server · app.js Desktop map UI · App.tsx Mobile app
Components 22
Map clients
- Desktop map UI
demo/static/js/app.js - Mobile app
mobile/App.tsx - Mobile API client
mobile/src/api.ts - Offline map shell
demo/pwa_routes.py
Demo services
- Desktop API server
demo/api_server.py - Mobile server
demo/mobile_server.py - Route directions
demo - Address search
demo
Safety scoring
- Route scoring
- NLP alerts
src/Live_alerts.py - Vision conditions
src/Live_cameras.py - Collision risk
src
Driving guidance
- Speed limits
- Street exit rules
- Live weather
src/Live_weather.py - Fleet scoring
mobile/src/fleetLogic.ts - Test prep loops
demo/road_preview.py
External services
- Routing service
- OpenStreetMap
- Overpass API
Other components
- Driver
- Route and guidance
Connections 25
- Driver → Desktop map UI: chooses route
- Driver → Mobile app: chooses route
- Desktop map UI → Desktop API server: requests routes
- Mobile app → Mobile API client: requests data
- Mobile API client → Mobile server: calls API
- Desktop API server → Route directions: gets directions
- Desktop API server → Address search: geocodes places
- Route directions → Routing service: requests routes
- Address search → OpenStreetMap: looks up places
- Desktop API server → Route scoring: scores routes
- Route scoring → NLP alerts: uses alerts
- Route scoring → Vision conditions: uses conditions
- Route scoring → Collision risk: uses risk model
- Desktop API server → Speed limits: gets speed guidance
- Speed limits → Overpass API: looks up limits
- Desktop API server → Street exit rules: gets road context
- Mobile server → Route scoring: scores routes
- Mobile server → Speed limits: gets speed guidance
- Mobile server → Street exit rules: gets road context
- Mobile server → Live weather: gets weather
- Mobile server → Fleet scoring: scores fleet trips
- Desktop API server → Test prep loops: builds practice loop
- Desktop map UI → Offline map shell: loads app shell
- Desktop map UI → Route and guidance: presents results
- Mobile app → Route and guidance: presents results