How sunkumahesh-777/riderelay works
RideRelay is a rider–captain ride-matching app with a React interface and Node API. Riders search routes and request rides; captains publish routes, manage requests and ride status, and maintain profiles and payment details. Authentication, payments, reviews, and location discovery are additional API capabilities. The README documents JSON fallback and PostgreSQL projection; the sampled source does not establish every internal call between backend modules, so uncertain wiring is omitted.
Main entry points: App.jsx RideRelay UI · api.js HTTP client · server.js HTTP API · db.js Database access
Components 20
Web app
- RideRelay UI
frontend/src/App.jsx - Auth client
frontend/src/services/authService.js - Ride client
frontend/src/services/rideService.js - HTTP client
frontend/src/services/api.js
API and domain
- HTTP API
backend/server.js - Authentication
backend/middleware/auth.js - Route and seat rules
backend/services/rideService.js - Ride status rules
backend/controllers/rideController.js - Profile updates
backend/controllers/userController.js - User records
backend/models/User.js - Ride records
backend/models/Ride.js - Location hubs
backend/locations.js
Persistence
- Database access
backend/db.js - Local JSON state
backend/db.js - Postgres projection
backend/postgres-projector.js - Relational schema
database/schema.sql
External services
- PostgreSQL
- Map tiles
Other components
- Rider
- Captain
Connections 15
- Rider → RideRelay UI: uses
- Captain → RideRelay UI: uses
- RideRelay UI → Auth client: signs in
- RideRelay UI → Ride client: searches and requests
- RideRelay UI → HTTP client: loads data
- Auth client → HTTP client: sends auth requests
- Ride client → HTTP client: sends ride requests
- HTTP client → HTTP API: HTTP requests
- HTTP API → Database access: reads and writes
- Database access → Local JSON state: fallback state
- Database access → Postgres projection: projects saved data
- Postgres projection → PostgreSQL: writes projection
- PostgreSQL → Relational schema: uses schema
- HTTP API → PostgreSQL: optional storage
- RideRelay UI → Map tiles: renders map