How sumitkumar-990/railway_info works
RailVue AI serves passenger tracking and railway operations intelligence. Users enter through the React app; its live-data hook calls the train service, which requests backend APIs, while the backend simulation ticker updates the fleet registry. The APIs expose live status, dynamic ETA, explanations, alerts, and network congestion to the frontend’s passenger and officer views. A separate data pipeline integrates historical delay, station, weather, and derived features for model preparation. The README documents further prediction and analytics capabilities; unsampled route internals are represented only where documented, not as inferred call chains.
Main entry points: App.tsx App navigation · mockTrainService.ts Train API client · trains.py Train endpoints · pipeline.py Integrated data pipeline
Components 27
Frontend experience
- App navigation
src/App.tsx - Live data hook
src/hooks/useLiveTrainData.ts - Train API client
src/services/mockTrainService.ts - Passenger tracking
src/components/passenger/PassengerTrainTracker.tsx - Operations dashboard
src/components/overview/OverviewDashboard.tsx - ETA predictions
src/components/predictions/EtaPredictionsView.tsx - Network intelligence
src/components/network/NetworkIntelligenceView.tsx - Delay analytics
src/components/analytics/DelayAnalyticsView.tsx - Alerts and events
src/components/alerts/AlertsEventsView.tsx - Train details
src/components/details/TrainDetailsView.tsx
Backend API
- FastAPI application
backend/app/main.py - Train endpoints
backend/app/api/trains.py - Network endpoints
backend/app/api/network.py
Live operations
- Fleet registry
backend/app/api/train_registry.py - Live location
backend/services/live_location_engine.py - Congestion engine
backend/services/congestion_engine.py
ETA prediction
- ETA prediction
backend/ml/predict.py - Feature engineering
backend/ml/feature_engineering.py - Delay risk classifier
backend/ml/delay_classifier.py - Prediction explanations
backend/ml/explainability.py
Data integration
- Integrated data pipeline
backend/data/pipeline.py - Station master
backend/data/station_master.py - Weather integration
backend/data/fetch_open_meteo_weather.py - Derived delay features
backend/data/derived_features.py
Other components
- Passenger or officer
- Historical delay source
- Open-Meteo weather
Connections 30
- Passenger or officer → App navigation: uses
- App navigation → Live data hook: loads live data
- App navigation → Passenger tracking: shows passenger view
- App navigation → Operations dashboard: shows overview
- App navigation → ETA predictions: shows predictions
- App navigation → Network intelligence: shows network
- App navigation → Delay analytics: shows analytics
- App navigation → Alerts and events: shows alerts
- App navigation → Train details: shows details
- Live data hook → Train API client: requests fleet data
- Live data hook → Train API client: requests train details
- Train API client → Train endpoints: fetches train data
- Train API client → Network endpoints: fetches congestion
- Train endpoints → Train API client: returns train data
- Network endpoints → Train API client: returns congestion
- FastAPI application → Train endpoints: mounts router
- FastAPI application → Network endpoints: mounts router
- FastAPI application → Fleet registry: ticks fleet simulation
- Train endpoints → Fleet registry: serves fleet data
- Network endpoints → Congestion engine: computes congestion
- Fleet registry → Live location: resolves train position
- Fleet registry → ETA prediction: recomputes ETA
- ETA prediction → Feature engineering: derives model features
- ETA prediction → Delay risk classifier: classifies delay risk
- Train endpoints → Prediction explanations: requests explanation
- Integrated data pipeline → Historical delay source: loads delay records
- Integrated data pipeline → Station master: resolves coordinates
- Integrated data pipeline → Weather integration: fetches station weather
- Weather integration → Open-Meteo weather: requests weather
- Integrated data pipeline → Derived delay features: fits and transforms