A full-stack Uber-like ride booking application built with MERN stack, Socket.IO, and Google Maps.
The system supports real-time ride matching, live location tracking, and role-based authentication for Users and Captains (Drivers).
This project focuses on real-world architecture, scalability, and production-ready practices.
- Signup / Login (JWT + Refresh Token)
- Location autocomplete
- Fare estimation
- Create ride requests
- Real-time ride status updates
- Live driver tracking
- Signup / Login
- Live GPS location sharing
- Real-time ride requests
- Ride confirmation
- Ride completion
- Socket-based ride matching
- Nearby driver discovery
- Instant user ↔ captain communication
uber-clone/
├── backend/ # Express + MongoDB + Socket.IO
├── frontend/ # React + Vite + Tailwind
└── README.md
- React (Vite)
- Tailwind CSS
- GSAP animations
- Google Maps JavaScript API
- Socket.IO Client
- Node.js + Express
- MongoDB + Mongoose
- Socket.IO
- JWT Authentication
- Google Maps APIs (Geocoding, Distance Matrix)
- Access Token (short-lived)
- Refresh Token (HTTP-only cookie)
- Auto session restoration on refresh
- Role-based route protection:
- User
- Captain
joinupdate-location-captainconfirm-rideend-ride
new-ride-requestride-confirmedride-ended
- User enters pickup & destination
- Backend calculates fare
- Nearby captains are discovered
- Ride request sent via sockets
- Captain accepts ride
- User receives confirmation
- Ride becomes ongoing
- Ride ends and status updates
- Google Maps integration
- Live GPS tracking
- Distance & time calculation
- Radius-based captain matching
PORT=4000
MONGODB_URL=your_mongo_uri
ACCESS_TOKEN_SECRET=your_secret
ACCESS_TOKEN_EXPIRY=expiresIn
REFRESH_TOKEN_SECRET=your_refresh_secret
REFRESH_TOKEN_EXPIRY=expiresIn
GOOGLE_MAPS_API=your_keyVITE_BASE_URL=http://localhost:4000
VITE_GOOGLE_MAPS_API_KEY=your_key
cd backend
npm install
npm run dev
cd frontend
npm install
npm run dev