RailGuard AI: An autonomous, software-first central rail infrastructure orchestration layer. Built for the FAR AWAY 2026 Hackathon (Railways Theme), leveraging crowdsourced edge telemetry and LLM reasoning to predict track anomalies and optimize network scheduling.
FogSafe Signal is an open-source printed circuit board by rishav-raj-genx, from the rishav-raj-genx/RailGuard-AI repository on GitHub, published under the MIT licence. It is a 2-layer board of 55.5 × 81 mm with 11 parts on 44 nets, routed with 124 tracks and 0 vias.
It is built around the ESP32-WROOM-32. Its parts include 3 resistors, 3 diodes, 3 switches and 2 ICs. It belongs with the ESP32 boards of this library.
Autonomous Central Rail Infrastructure & Orchestration Layer
RailGuard AI transitions railway infrastructure from expensive, fragmented legacy hardware—such as ₹50 Lakh/km Kavach deployments—to a scalable, software-first real-time data bus. Agentic AI turns live infrastructure telemetry and human operations into coordinated, explainable decisions across freight, passenger, and locomotive workflows.
The Real-World Problem & Our Solution
The broken state of rail operations
Rail operations are often governed by disconnected systems and manual intervention:
B2B freight: Manual OCC dispatch mistakes can breach contractual freight SLAs and create multi-lakh rupee penalties.
B2C passenger operations: TTEs rely on paper manifests and ad-hoc judgement, creating friction, inequity, and risk during seat swaps.
Safety in dense fog: Low visibility can blind locomotive pilots to physical signal aspects when fast, trustworthy signal awareness matters most.
The RailGuard AI solution
RailGuard AI is a unified, sub-15 ms WebSocket state engine that ingests physical hardware telemetry and human inputs into one operational picture. Gemini LLM arbitration then assists the right role—OCC dispatcher, TTE, passenger, or loco-pilot—with contextual, real-time action recommendations.
The Three Core Architectures (The Cycles)
Cycle 1 — B2B Freight SLA Arbitrator
Hackathon Challenge #697
The /occ dashboard intercepts manual dispatch commands before they become expensive operational errors. When an operator attempts to delay a freight train beyond its contractual SLA, RailGuard AI blocks the action, calculates the financial penalty in real time, and invokes Gemini to generate a dynamic loop-line rerouting strategy that protects the SLA.
The /passenger and /tt dashboards synchronize instantly through the shared state engine. Digital seat-swap arbitration cross-references PNR demographics—such as age and gender—to automatically block invalid or unsafe swaps, including a 25-year-old male attempting to take a Senior Citizen berth.
Cycle 3 — IoT Edge Fog Mitigation (Micro-ATP)
Trackside ESP32/LoRa nodes publish live lamp aspects through HTTP polling into RailGuard AI. When a physical RED signal is detected in dense fog, the pilot UI automatically bleeds locomotive speed to 0 km/h and sends an AI-generated reroute telex to the Loco-Pilot HUD.
Technical Stack
Layer
Technologies
Responsibility
Frontend
React, Vite, Tailwind CSS
Real-time OCC, passenger, TTE, and pilot operational dashboards
Backend
Node.js, Express, Socket.io
WebSocket state engine, APIs, and orchestration workflows
AI
Google Gemini 2.5 Flash
Contextual SLA rerouting and operational decision support
Hardware
ESP32, LoRa, HTTP API polling
Edge signal telemetry and fog-mitigation events
Local Installation & Startup Guide
1. Clone the repository
bash
git clone https://github.com/Riturajsinha04/Railgaurd-AI.git
cd Railgaurd-AI
2. Create a .env file
Create a .env file in the project root with the following values:
RailGuard AI: An autonomous, software-first central rail infrastructure orchestration layer. Built for the FAR AWAY 2026 Hackathon (Railways Theme), leveraging crowdsourced edge telemetry and LLM reasoning to predict…
ESP32 implementation for HID over GATT Keyboard and Mouse (Bluetooth Low Energy). Including serial API for external modules (similar to Adafruit EZKey HID)
This project is a full replacement for the Nintendo Wii's Bluetooth module. Emulation of the Bluetooth module is performed on the PIC32 based on rnconrad's emulator, while controller connectivity on the ESP32 is based…
50 parts48GPL-3.0
Questions
How big is the FogSafe Signal PCB?
It measures 55.5 × 81 mm and has 2 copper layers, 1.6 mm thick.
What parts does the FogSafe Signal use?
11 parts, built around the ESP32-WROOM-32. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.
Where can I download the FogSafe Signal KiCad files?
From the rishav-raj-genx/RailGuard-AI repository on GitHub, at the commit this page was made from: the board is FogSafe_Receiver/.history/FogSafe_Signal.kicad_pcb and its schematic FogSafe_Receiver/.history/FogSafe_Receiver.kicad_sch. PCBKit opens the board in the browser, with nothing to install.
Can I use the FogSafe Signal design in my own project?
Its repository publishes it under the MIT licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).