A production-ready ride-booking application with Go microservices
Table of Contents
A production-ready ride-booking application built with Go microservices, featuring real-time tracking, payment processing, and comprehensive observability.
Key Features:
- Real-time trip tracking with WebSocket updates
- Driver assignment and matching system
- Stripe payment integration
- Distributed tracing with Jaeger and OpenTelemetry
- Apache Kafka (KRaft mode) for event-driven messaging
- Kubernetes deployment with Minikube support
- Backend: Go 1.24+ with gRPC and HTTP (Gin)
- Frontend: Next.js with React and Tailwind CSS
- Messaging: Apache Kafka (KRaft mode)
- Observability: OpenTelemetry + Jaeger + Structured Logging
- Orchestration: Kubernetes + Helm
- Database: MongoDB
- Payments: Stripe API
Key Components:
- API Gateway: HTTP/WebSocket entry point with request routing
- Trip Service: Core business logic for trip management
- Driver Service: Driver matching and location management
- Payment Service: Stripe integration for payment processing
- Apache Kafka: Event streaming with KRaft mode (no ZooKeeper)
- Jaeger: Distributed tracing and observability
- Docker Desktop (v4.0+)
- Minikube (v1.30+)
- kubectl (v1.27+)
- Helm (v3.12+)
-
Start Minikube
minikube start --memory=6144 --cpus=4
-
Clone and setup
git clone https://github.com/Cprakhar/uber-clone.git cd uber-clone kubectl create namespace uber-clone -
Configure secrets
mv k8s/dev/secrets.template.yaml k8s/dev/secrets.yaml # Edit k8s/dev/secrets.yaml with your MongoDB URI and Stripe keys -
Deploy services
make build make deploy
-
Setup observability
helm repo add jaegertracing https://jaegertracing.github.io/helm-charts helm install jaeger jaegertracing/jaeger --namespace uber-clone --values helm/jaeger.yaml
** Start minikube tunnel (in a separate terminal):**
minikube tunnelPort-forward jaeger-query service:
kubectl port-forward -n uber-clone svc/jaeger-query 8080:16686Start the Next.js frontend:
docker run -e NEXT_PUBLIC_API_URL="http://$(minikube ip):30080" -e NEXT_PUBLIC_WS_URL="ws://$(minikube ip):30080/ws" -e NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY="pk_test_your_key" -p 3000:3000 uber-clone/web:latestAccess services:
- Web app: http://localhost:3000
- Jaeger UI: http://localhost:16686
- Microservices Architecture (Go + gRPC)
- Real-time WebSocket Updates
- Apache Kafka Event Streaming (KRaft mode)
- OpenTelemetry + Jaeger Distributed Tracing
- Kubernetes Deployment
- Authentication & Authorization
- Advanced Driver Matching Algorithm
- Mobile Application
- Multi-region Deployment
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement".
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request