Skip to content

Project Map: Real-Time Mobility & Ride-Hailing Platform ​

Folder Tree ​

38-uber-clone/
├── UberClone-Clean-Project/
│   ├── backend/
│   │   ├── controllers/
│   │   │   ├── captain.controller.js     # Driver onboarding, profile, status toggles
│   │   │   ├── map.controller.js         # Geocoding, distance, autocomplete proxies
│   │   │   ├── ride.controller.js        # Ride creation, fare quotes, OTP confirmation
│   │   │   └── user.controller.js        # Rider signup, login, session management
│   │   ├── db/
│   │   │   └── db.js                     # Mongoose connection with error listeners
│   │   ├── middlewares/
│   │   │   └── auth.middleware.js        # Rider/Captain JWT verification & blacklist check
│   │   ├── models/
│   │   │   ├── blacklistToken.model.js   # Revoked JWT tokens with TTL expiration
│   │   │   ├── captain.model.js          # Driver profile, vehicle spec, location coordinates
│   │   │   ├── ride.model.js             # Ride lifecycle, fare, OTP, status states
│   │   │   └── user.model.js             # Rider profile and credentials
│   │   ├── routes/
│   │   │   ├── captain.routes.js         # /captains endpoints
│   │   │   ├── maps.routes.js            # /maps endpoints
│   │   │   ├── ride.routes.js            # /rides endpoints
│   │   │   └── user.routes.js            # /users endpoints
│   │   ├── services/
│   │   │   ├── captain.service.js        # Captain creation & query services
│   │   │   ├── maps.service.js           # Google Maps API geocoding & distance matrix
│   │   │   ├── ride.service.js           # Fare calculations, OTP generation, ride transitions
│   │   │   └── user.service.js           # Rider creation service
│   │   ├── app.js                        # Express middleware config, CORS, routes
│   │   ├── server.js                     # HTTP server wrapper & port listener
│   │   ├── socket.js                     # Socket.io connection pool & event dispatchers
│   │   └── package.json                  # Express 4.21, Socket.io 4.8, Mongoose 8.8
│   ├── frontend/
│   │   ├── src/
│   │   │   ├── components/
│   │   │   │   ├── CaptainDetails.jsx    # Driver stats, earnings, hours online
│   │   │   │   ├── ConfirmRide.jsx       # Vehicle selection confirmation panel
│   │   │   │   ├── ConfirmRidePopUp.jsx  # Captain OTP verification input modal
│   │   │   │   ├── FinishRide.jsx        # Ride completion & fare settlement panel
│   │   │   │   ├── LiveTracking.jsx      # Google Maps polyline & vehicle marker view
│   │   │   │   ├── LocationSearchPanel.jsx# Address autocomplete suggestions dropdown
│   │   │   │   ├── LookingForDriver.jsx  # Pulsing search radar animation
│   │   │   │   ├── RidePopUp.jsx         # Incoming ride notification modal for captain
│   │   │   │   ├── VehiclePanel.jsx      # Tier selection: Car, Moto, Auto with fares
│   │   │   │   └── WaitingForDriver.jsx  # Driver en route details & OTP display
│   │   │   ├── context/
│   │   │   │   ├── CaptainContext.jsx    # Global captain profile & vehicle state
│   │   │   │   ├── SocketContext.jsx     # Persistent WebSocket connection provider
│   │   │   │   └── UserContext.jsx       # Global rider profile & active ride state
│   │   │   ├── pages/
│   │   │   │   ├── CaptainHome.jsx       # Captain live radar & ride acceptance portal
│   │   │   │   ├── CaptainRiding.jsx     # Captain navigation & turn-by-turn view
│   │   │   │   ├── Home.jsx              # Rider home search & vehicle booking dashboard
│   │   │   │   ├── Riding.jsx            # Rider in-transit map tracking view
│   │   │   │   ├── Start.jsx             # Welcome splash landing
│   │   │   │   └── UserProtectWrapper.jsx# Route guard redirecting unauthenticated users
│   │   │   ├── App.jsx                   # React Router route declarations
│   │   │   └── main.jsx                  # React 18 root mount
│   │   └── package.json                  # React 18, Google Maps API, GSAP, Socket.io
│   └── package.json                      # Workspace scripts
└── docs/                                 # VitePress documentation portal

Dependencies & Rationale ​

PackageVersionPurpose
socket.io4.8.3High-frequency, bidirectional WebSocket transport for live coordinates
express4.21.1Robust REST API router for user/captain onboarding and booking
mongoose8.8.2ODM for MongoDB schema validation, compound indexes, and location schema
@react-google-maps/api2.20.3Interactive Google Maps rendering, vehicle markers, and direction polylines
gsap3.12.5High-performance animation engine for native-feeling bottom sheets
bcrypt5.1.1Salting and hashing credentials with 10 work rounds
jsonwebtoken9.0.2Stateless identity tokens with embedded user/captain role metadata
express-validator7.2.0Middleware for input validation and sanitization on ride requests
remixicon4.5.0Complete modern icon library for mobility and vehicle iconography