How nmpfriends1997-cyber/flowmind-ai works
FlowMind AI is a Bengaluru traffic command center. Users explore live and historical traffic, analytics, and incident data, or configure a scenario to obtain congestion predictions, explanations, and diversion recommendations. The frontend routes these workflows through a shared API client; the FastAPI service mounts domain routers backed by a shared ML engine. The graph preserves the documented live-data, assistant, analytics, resource-planning, and scenario capabilities. Some subsystem connections are omitted where the excerpts do not show the wiring.
Main entry points: App.tsx App routing · main.py FastAPI application · engine.py ML and data engine · api.ts API client
Components 24
Frontend
- App routing
flowmind-ai/frontend/src/App.tsx - Navigation shell
flowmind-ai/frontend/src/components/Sidebar.tsx - API client
flowmind-ai/frontend/src/lib/api.ts - Command center
flowmind-ai/frontend/src/pages/CommandCenter.tsx - Live and historical map
flowmind-ai/frontend/src/pages/CityMap.tsx - Scenario simulation
flowmind-ai/frontend/src/pages/SimulationStudio.tsx - Resource planning
flowmind-ai/frontend/src/pages/ResourcePlanner.tsx - Analytics
flowmind-ai/frontend/src/pages/Analytics.tsx - Traffic assistant
flowmind-ai/frontend/src/pages/Assistant.tsx - Explainable predictions
flowmind-ai/frontend/src/pages/XAI.tsx - Scenario comparison
flowmind-ai/frontend/src/pages/Compare.tsx
API service
- FastAPI application
flowmind-ai/backend/main.py - Event endpoints
flowmind-ai/backend/routers/events.py - Prediction endpoints
flowmind-ai/backend/routers/predictions.py - Resource endpoints
flowmind-ai/backend/routers/resources.py - Diversion endpoints
flowmind-ai/backend/routers/diversion.py - Analytics endpoints
flowmind-ai/backend/routers/analytics.py - Realtime endpoints
flowmind-ai/backend/routers/realtime.py - Live-data endpoints
flowmind-ai/backend/routers/livedata.py - Assistant endpoints
flowmind-ai/backend/routers/assistant.py
Traffic intelligence
- ML and data engine
flowmind-ai/backend/ml/engine.py
External integrations
- TomTom services
- Overpass service
- OpenRouter models
Connections 37
- App routing → Navigation shell: renders
flowmind-ai/frontend/src/App.tsx - App routing → Command center: routes to
flowmind-ai/frontend/src/App.tsx - App routing → Live and historical map: routes to
flowmind-ai/frontend/src/App.tsx - App routing → Scenario simulation: routes to
flowmind-ai/frontend/src/App.tsx - App routing → Resource planning: routes to
flowmind-ai/frontend/src/App.tsx - App routing → Analytics: routes to
flowmind-ai/frontend/src/App.tsx - App routing → Traffic assistant: routes to
flowmind-ai/frontend/src/App.tsx - App routing → Explainable predictions: routes to
flowmind-ai/frontend/src/App.tsx - App routing → Scenario comparison: routes to
flowmind-ai/frontend/src/App.tsx - Live and historical map → API client: requests data
flowmind-ai/frontend/src/pages/CityMap.tsx - Scenario simulation → API client: requests predictions
flowmind-ai/frontend/src/pages/SimulationStudio.tsx - Explainable predictions → API client: requests predictions
flowmind-ai/frontend/src/pages/XAI.tsx - Command center → API client: requests data
flowmind-ai/frontend/src/pages/CommandCenter.tsx - Resource planning → API client: requests resources
flowmind-ai/frontend/src/pages/ResourcePlanner.tsx - Analytics → API client: requests analytics
flowmind-ai/frontend/src/pages/Analytics.tsx - Traffic assistant → API client: sends chat
flowmind-ai/frontend/src/pages/Assistant.tsx - Scenario comparison → API client: requests data
flowmind-ai/frontend/src/pages/Compare.tsx - FastAPI application → Event endpoints: mounts router
flowmind-ai/backend/main.py - FastAPI application → Prediction endpoints: mounts router
flowmind-ai/backend/main.py - FastAPI application → Resource endpoints: mounts router
flowmind-ai/backend/main.py - FastAPI application → Diversion endpoints: mounts router
flowmind-ai/backend/main.py - FastAPI application → Analytics endpoints: mounts router
flowmind-ai/backend/main.py - FastAPI application → Realtime endpoints: mounts router
flowmind-ai/backend/main.py - FastAPI application → Live-data endpoints: mounts router
flowmind-ai/backend/main.py - FastAPI application → Assistant endpoints: mounts router
flowmind-ai/backend/main.py - FastAPI application → ML and data engine: warms up
flowmind-ai/backend/main.py - Analytics endpoints → ML and data engine: reads analytics
flowmind-ai/backend/routers/analytics.py - Assistant endpoints → ML and data engine: reads traffic context
flowmind-ai/backend/routers/assistant.py - Realtime endpoints → ML and data engine: reads traffic data
flowmind-ai/backend/routers/realtime.py - Event endpoints → ML and data engine: uses engine
flowmind-ai/backend/routers/events.py - Prediction endpoints → ML and data engine: uses engine
flowmind-ai/backend/routers/predictions.py - Resource endpoints → ML and data engine: uses engine
flowmind-ai/backend/routers/resources.py - Diversion endpoints → ML and data engine: uses engine
flowmind-ai/backend/routers/diversion.py - Live-data endpoints → ML and data engine: uses engine
flowmind-ai/backend/routers/livedata.py - Live-data endpoints → TomTom services: fetches traffic
flowmind-ai/backend/routers/livedata.py - Live-data endpoints → Overpass service: fetches venues
flowmind-ai/backend/routers/livedata.py - Assistant endpoints → OpenRouter models: queries models
flowmind-ai/backend/routers/assistant.py