Real-time Gateway Service

WebSocket-based real-time communication for ride-hailing

v1.0.0 | Socket.IO 4.7
📖
API Documentation
Complete reference for all Socket.IO events, namespaces, payloads, and integration guides for Android, iOS, and Web platforms.
💻
Test Console
Interactive testing interface to connect, emit events, and monitor real-time responses. Perfect for development and debugging.
💚
Health Status
Check the current health status of the gateway service, Redis connection, and Firebase connectivity.
📊
Prometheus Metrics
Prometheus-compatible metrics endpoint for monitoring connections, memory usage, and service uptime.

WebSocket Namespaces

/trip
Trip lifecycle events - subscribe, accept, reject, cancel, status updates, ETA, emergency SOS
/driver
Driver-specific events - location updates, availability toggle, trip notifications
/chat
In-trip messaging - real-time chat between rider and driver
/voice
WebRTC voice calling - peer-to-peer audio calls with ICE signaling

Quick Start

// Install Socket.IO client npm install socket.io-client // Connect to the gateway import { io } from 'socket.io-client'; const socket = io('https://your-domain.com/trip', { auth: { token: 'your-jwt-token' }, query: { userId: 'user-uuid', userType: 'RIDER' } }); socket.on('connected', (data) => console.log('Connected!', data)); socket.on('trip:request', (trip) => console.log('New trip!', trip));
4
Namespaces
50+
Events
<50ms
Latency
Redis
Scaling
Kafka
Messaging