How madhavan200/ai-powered-railway-traffic-optimization-system works
RailSync AI is a railway operations control center: operators sign in, select a role-authorized workspace, inspect live state, and request or apply operational actions. The SPA calls Express feature routes, which invoke isolated Python agents over JSON stdin/stdout; agents share SQLite-backed state and may use Groq for generated recommendations or communications. The README documents scheduling, platform assignment, disruption recovery, passenger communications, simulation, monitoring, human approval, audit, and dashboard capabilities. Several routes and agent links are documented but their implementation details were not sampled.
Main entry points: App.jsx Operations SPA · runPython.js Python process runner · server.js Express API · data_store.py Shared state store
Components 29
Operator interface
- Operations SPA
frontend/src/App.jsx - Role navigation
frontend/src/components/Sidebar.jsx - Workspace header
frontend/src/components/Header.jsx - Login view
frontend/src/pages/LoginPage.jsx - Dashboard view
frontend/src/pages/DashboardPage.jsx - Scheduling view
frontend/src/pages/SchedulingPage.jsx - Platform view
frontend/src/pages/PlatformPage.jsx - Disruption view
frontend/src/pages/DisruptionPage.jsx - Passenger comms
frontend/src/pages/PassengerCommsPage.jsx - Simulation lab
frontend/src/pages/SimulationLabPage.jsx - System monitoring
frontend/src/pages/SystemMonitoringPage.jsx - Approval workspace
frontend/src/pages/HumanInLoopPage.jsx - Audit logs
frontend/src/pages/AuditLogsPage.jsx
API gateway
- Express API
server/server.js - Python process runner
server/runPython.js
Operations agents
- Dashboard agent
python/dashboard_agent.py - Scheduler agent
python/scheduler_agent.py - Platform agent
python/platform_agent.py - Disruption agent
python/disruption_agent.py - Passenger agent
python/passenger_agent.py - Simulation agent
python/simulation_agent.py - Monitoring agent
python/monitoring_agent.py - Human review agent
python/hitl_agent.py - Audit agent
python/audit_agent.py
State and intelligence
- Shared state store
python/shared/data_store.py - SQLite operations DB
- Groq language model
- Groq client
python/shared/groq_client.py
Other components
- Rail operator
Connections 48
- Rail operator → Login view: signs in
- Rail operator → Role navigation: selects workspace
frontend/src/components/Sidebar.jsx - Operations SPA → Login view: renders
frontend/src/App.jsx - Operations SPA → Role navigation: renders
frontend/src/App.jsx - Operations SPA → Workspace header: renders
frontend/src/App.jsx - Operations SPA → Dashboard view: renders
frontend/src/App.jsx - Operations SPA → Scheduling view: renders
frontend/src/App.jsx - Operations SPA → Platform view: renders
frontend/src/App.jsx - Operations SPA → Disruption view: renders
frontend/src/App.jsx - Operations SPA → Passenger comms: renders
frontend/src/App.jsx - Operations SPA → Simulation lab: renders
frontend/src/App.jsx - Operations SPA → System monitoring: renders
frontend/src/App.jsx - Operations SPA → Approval workspace: renders
frontend/src/App.jsx - Operations SPA → Audit logs: renders
frontend/src/App.jsx - Dashboard view → Express API: requests API
- Scheduling view → Express API: requests API
- Platform view → Express API: requests API
frontend/src/pages/PlatformPage.jsx - Disruption view → Express API: requests API
- Passenger comms → Express API: requests API
- Simulation lab → Express API: requests API
- System monitoring → Express API: requests API
- Approval workspace → Express API: requests API
- Audit logs → Express API: requests API
- Express API → Python process runner: routes agent calls
server/server.js - Python process runner → Dashboard agent: spawns with JSON
- Python process runner → Scheduler agent: spawns with JSON
- Python process runner → Platform agent: spawns with JSON
- Python process runner → Disruption agent: spawns with JSON
- Python process runner → Passenger agent: spawns with JSON
- Python process runner → Simulation agent: spawns with JSON
- Python process runner → Monitoring agent: spawns with JSON
- Python process runner → Human review agent: spawns with JSON
- Python process runner → Audit agent: spawns with JSON
- Dashboard agent → Shared state store: reads and updates
python/dashboard_agent.py - Scheduler agent → Shared state store: uses shared state
python/scheduler_agent.py - Platform agent → Shared state store: uses shared state
python/platform_agent.py - Disruption agent → Shared state store: uses shared state
python/disruption_agent.py - Passenger agent → Shared state store: uses shared state
python/passenger_agent.py - Simulation agent → Shared state store: uses shared state
python/simulation_agent.py - Monitoring agent → Shared state store: uses shared state
python/monitoring_agent.py - Human review agent → Shared state store: uses shared state
python/hitl_agent.py - Audit agent → Shared state store: uses shared state
python/audit_agent.py - Shared state store → SQLite operations DB: reads and writes
- Dashboard agent → Groq client: requests insights
python/dashboard_agent.py - Scheduler agent → Groq client: uses generated guidance
python/scheduler_agent.py - Platform agent → Groq client: uses generated guidance
python/platform_agent.py - Disruption agent → Groq client: uses generated guidance
python/disruption_agent.py - Passenger agent → Groq client: uses generated text
python/passenger_agent.py