A scalable ride-booking backend inspired by Uber/Swiggy, built with Java Spring Boot microservices.
| Service | Port | Description |
|---|---|---|
| Auth Service | 8081 | JWT register/login |
| Booking Service | 8082 | Ride lifecycle + Kafka producer |
| Location Service | 8083 | Redis + WebSocket real-time tracking |
| Payment Service | 8084 | Payment state machine + Kafka producer |
| Notification Service | 8085 | Kafka consumer, push notifications |
| React Frontend | 5173 | Rider + Driver dashboards |
- Backend: Java 17, Spring Boot 3.5, Spring Security, Spring Data JPA
- Messaging: Apache Kafka
- Cache: Redis
- Database: PostgreSQL 16
- Real-time: WebSocket (STOMP)
- Auth: JWT (jjwt 0.12.3)
- Frontend: React 18, Vite, Tailwind CSS, Axios
- Infrastructure: Docker, Docker Compose
- Java 17+
- Node.js 18+
- Docker Desktop
docker-compose up -dOpen 5 terminals and run in each service folder:
mvnw.cmd spring-boot:run -Dspring-boot.run.jvmArguments="-Duser.timezone=UTC"cd frontend
npm install
npm run devPOST /api/auth/registerPOST /api/auth/login
POST /api/rides/requestPUT /api/rides/{id}/acceptPUT /api/rides/{id}/startPUT /api/rides/{id}/completeGET /api/rides/my-ridesGET /api/rides/pending
POST /api/location/updateGET /api/location/driver/{driverId}
POST /api/payments/initiatePOST /api/payments/{id}/processGET /api/payments/ride/{rideId}
- JWT authentication across all services
- Full ride lifecycle: REQUESTED → ACCEPTED → IN_PROGRESS → COMPLETED
- Real-time location tracking via Redis + WebSocket
- Kafka event-driven notifications
- Payment state machine with 10% failure simulation
- Role-based access (RIDER / DRIVER)
- React UI with separate Rider and Driver dashboards