How saikrishnamulukutla/uber works
RideGo is a Go ride-hailing backend: riders and drivers use HTTP APIs to register, request and complete trips, and pay; matching and service updates are coordinated through Kafka. The main workflow runs from trip request through driver offer/assignment, OTP-verified trip completion, and payment. The graph also preserves authentication, notifications, GPS tracking, and earnings. The README documents the broad event flow; source excerpts confirm selected wiring and calls, so unsampled service internals are represented at their known module paths without inferred call edges.
Main entry points: client.go Kafka events · service/service.go Trip lifecycle · service/service.go Payment processing · service/service.go Driver operations
Components 23
Identity and profiles
- User API
services/user-service/internal/controllers/handler.go - User accounts
services/user-service/internal/service/service.go
Trip lifecycle
- Trip API
services/trip-service/internal/controllers/handler.go - Trip lifecycle
services/trip-service/internal/service/service.go - Live tracking
services/trip-service/internal/tracking/hub.go
Driver dispatch
- Driver API
services/driver-service/internal/controllers/handler.go - Driver operations
services/driver-service/internal/service/service.go - Driver matching
services/matching-service/internal/service/matcher.go
Payments
- Payment API
services/payment-service/internal/controllers/handler.go - Checkout page
services/payment-service/internal/controllers/checkout.go - Payment processing
services/payment-service/internal/service/service.go - Payment providers
services/payment-service/internal/provider/provider.go - Razorpay integration
services/payment-service/internal/provider/razorpay/razorpay.go - Checkout updates
services/payment-service/internal/hub/hub.go
Events and notifications
- Notifications
services/notification-service/cmd/main.go - Notification API
services/notification-service/internal/controllers/handler.go - PostgreSQL
shared/pkg/db/postgres.go - Redis state
shared/pkg/redis/client.go - Kafka events
shared/pkg/kafka/client.go - Email delivery
shared/pkg/mailer/mailer.go
Other components
- Rider and driver
- API gateway
- Email provider
Connections 36
- Rider and driver → API gateway: calls HTTP/WS
- API gateway → User API: routes requests
- API gateway → Driver API: routes requests
- API gateway → Trip API: routes requests
- API gateway → Payment API: routes requests
- API gateway → Notification API: routes requests
- User API → User accounts: delegates
services/user-service/internal/controllers/handler.go - Driver API → Driver operations: delegates
services/driver-service/internal/controllers/handler.go - Trip API → Trip lifecycle: delegates
services/trip-service/internal/controllers/handler.go - Payment API → Payment processing: delegates
- Payment API → Checkout page: serves checkout
- Trip lifecycle → Kafka events: publishes request
- Kafka events → Driver matching: delivers request
- Driver matching → Redis state: searches drivers
services/matching-service/internal/service/matcher.go - Driver matching → Kafka events: publishes offer
- Kafka events → Notifications: delivers offer
- Driver API → Driver operations: responds to offer
services/driver-service/internal/controllers/handler.go - Driver operations → Kafka events: publishes assignment
- Kafka events → Trip lifecycle: delivers assignment
- Trip API → Live tracking: upgrades WebSocket
- Trip lifecycle → Redis state: stores ride OTP
- Trip lifecycle → Kafka events: publishes completion
- Kafka events → Payment processing: delivers completion
- Payment processing → PostgreSQL: persists payment
services/payment-service/internal/service/service.go - Payment processing → Payment providers: requests payment
services/payment-service/internal/service/service.go - Payment providers → Razorpay integration: selects integration
- Payment processing → Checkout updates: pushes updates
- Payment processing → Kafka events: publishes completion
services/payment-service/internal/service/service.go - Kafka events → Notifications: delivers lifecycle events
- Notifications → PostgreSQL: stores notices
services/notification-service/cmd/main.go - Notifications → Email delivery: sends email
services/notification-service/cmd/main.go - Email delivery → Email provider: delivers email
- User accounts → PostgreSQL: persists accounts
- Driver operations → PostgreSQL: persists drivers
- Driver operations → Redis state: tracks availability
- Trip lifecycle → PostgreSQL: persists trips