Skip to content

A production-ready ride-sharing application built with Go microservices, featuring real-time tracking, payment processing, and comprehensive observability.

Notifications You must be signed in to change notification settings

Cprakhar/uber-clone

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Uber Clone - Microservices Architecture

A production-ready ride-booking application with Go microservices

Table of Contents
  1. About The Project
  2. Built With
  3. Architecture
  4. Getting Started
  5. Usage
  6. Roadmap
  7. Contributing

About The Project

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

(back to top)

Built With

  • 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

(back to top)

Architecture

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

(back to top)

Getting Started

Prerequisites

  • Docker Desktop (v4.0+)
  • Minikube (v1.30+)
  • kubectl (v1.27+)
  • Helm (v3.12+)

Installation

  1. Start Minikube

    minikube start --memory=6144 --cpus=4
  2. Clone and setup

    git clone https://github.com/Cprakhar/uber-clone.git
    cd uber-clone
    kubectl create namespace uber-clone
  3. Configure secrets

    mv k8s/dev/secrets.template.yaml k8s/dev/secrets.yaml
    # Edit k8s/dev/secrets.yaml with your MongoDB URI and Stripe keys
  4. Deploy services

    make build
    make deploy
  5. Setup observability

    helm repo add jaegertracing https://jaegertracing.github.io/helm-charts
    helm install jaeger jaegertracing/jaeger --namespace uber-clone --values helm/jaeger.yaml

(back to top)

Usage

** Start minikube tunnel (in a separate terminal):**

minikube tunnel

Port-forward jaeger-query service:

kubectl port-forward -n uber-clone svc/jaeger-query 8080:16686

Start 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:latest

Access services:

(back to top)

Roadmap

  • 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

(back to top)

Contributing

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".

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

About

A production-ready ride-sharing application built with Go microservices, featuring real-time tracking, payment processing, and comprehensive observability.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published