How avinashthula17/rapidride-app works
RapidRide is a web ride-hailing platform: riders book trips, drivers accept and track them, while the backend manages identity, rides, support, and live connections. A separate FastAPI service provides fare, ETA, geocoding, and asynchronous ML tasks. The graph preserves those documented capabilities, but frontend-to-API and some real-time event flows are only weakly evidenced in the supplied excerpts, so those links are marked unverified. Build, maintenance, and test scripts are omitted.
Main entry points: index.js Express server · main.py FastAPI service · tasks.py Background tasks · auth.js Authentication
Components 28
Web experience
- Rider app
frontend/rider/js/app.js - Driver app
frontend/driver/js/driver.js - Rider live updates
frontend/rider/js/socket.js - Driver live updates
frontend/driver/js/driver_socket.js
Ride platform
- Express server
backend/index.js - Authentication
backend/routes/auth.js - Ride operations
backend/routes/rides.js - Support chat
backend/routes/support.js - Live ride sockets
backend/index.js
ML services
- FastAPI service
fastapi/app/main.py - Fare API
fastapi/app/api/fare.py - ETA API
fastapi/app/api/eta.py - Geocoding API
fastapi/app/api/geo.py - Async task API
fastapi/app/api/tasks.py - ETA prediction
fastapi/app/services/eta_service.py - Fare calculation
fastapi/app/services/fare_service.py - Geocoding service
fastapi/app/services/geo_service.py - Background tasks
fastapi/app/tasks/tasks.py - Model inference
fastapi/app/models/infer.py - Model training
fastapi/app/models/trainer.py
Shared infrastructure
- User records
backend/models/user.js - Ride records
backend/models/ride.js - Firebase auth
backend/config/firebase.js - Redis cache
fastapi/app/utils/redis_client.py
Other components
- Rider
- Driver
- RabbitMQ
- MongoDB
Connections 36
- Rider → Rider app: uses
- Driver → Driver app: uses
- Rider app → Express server: requests rides
- Driver app → Express server: manages rides
- Rider live updates → Live ride sockets: connects to
- Driver live updates → Live ride sockets: connects to
- Express server → Authentication: mounts
backend/index.js - Express server → Ride operations: mounts
backend/index.js - Express server → Support chat: mounts
backend/index.js - Express server → Live ride sockets: serves sockets
backend/index.js - Authentication → User records: reads and writes
backend/routes/auth.js - Authentication → Firebase auth: verifies identity
backend/routes/auth.js - Authentication → MongoDB: persists users
- Ride operations → Ride records: manages rides
backend/routes/rides.js - Ride operations → User records: looks up users
backend/routes/rides.js - Ride operations → MongoDB: persists rides
- Support chat → User records: looks up users
backend/routes/support.js - Express server → FastAPI service: checks health
backend/index.js - Express server → Redis cache: checks health
- FastAPI service → Fare API: registers
fastapi/app/main.py - FastAPI service → ETA API: registers
fastapi/app/main.py - FastAPI service → Geocoding API: registers
fastapi/app/main.py - FastAPI service → Async task API: registers
fastapi/app/main.py - ETA API → ETA prediction: predicts with
fastapi/app/api/eta.py - ETA API → Background tasks: queues work
fastapi/app/api/eta.py - Fare API → Fare calculation: calculates with
fastapi/app/api/fare.py - Geocoding API → Geocoding service: resolves with
fastapi/app/api/geo.py - Async task API → Background tasks: dispatches
fastapi/app/api/tasks.py - ETA prediction → Redis cache: caches predictions
fastapi/app/services/eta_service.py - Fare calculation → Redis cache: caches fares
fastapi/app/services/fare_service.py - Geocoding service → Redis cache: uses cache
fastapi/app/services/geo_service.py - ETA prediction → Model inference: loads and predicts
fastapi/app/services/eta_service.py - Background tasks → Model training: trains model
fastapi/app/tasks/tasks.py - Background tasks → ETA prediction: runs predictions
fastapi/app/tasks/tasks.py - FastAPI service → RabbitMQ: checks connection
fastapi/app/main.py - Background tasks → RabbitMQ: queues jobs