Live Link 🚀 : https://uber.abhi.works
- Real-time ride tracking and mapping
- Live driver-passenger matching
- Dynamic pricing & fare estimation
- Secure user authentication
- Responsive cross-platform design
git clone https://github.com/nerdyabhi/uber.git
cd frontend
npm install
npm run dev
cd backend
npm install
node server.js
cd ..
PORT=xxx
MONGO_URL="Your MONGO connecting string"
JWT_SECRET = "JWT SECRET"
GOOGLE_MAP_API = "API"
VITE_API_URL=your_backend_api_url
VITE_SOCKET_URL=your_socket_server_url
POST /api/user/register # Register new user
POST /api/user/login # User login
POST /api/captain/register # Register new captain
POST /api/captain/login # Captain login
POST /api/rides/create # Create new ride
POST /api/rides/confirm # Confirm ride
POST /api/rides/getFare # Get fare estimate
POST /api/rides/startRide # Start ride with OTP
GET /api/maps/get-coordinates # Get coordinates from address
GET /api/maps/get-Distance-time # Get distance and time
GET /api/maps/autocomplete # Get location suggestions
Socket Event | Description | Payload |
---|---|---|
join |
User/Captain connection | `{ userId: string, userType: "user" |
update-location-captain |
Update captain's location | { userId: string, location: { ltd: number, lng: number } } |
ride-request |
New ride request | { rideId: string, pickup: string, destination: string } |
ride-confirmed |
Ride confirmation | { rideId: string, captainId: string } |