This repository contains the implementation of an Uber-like application built using the MERN (MongoDB, Express.js, React, Node.js) stack. The project simulates the key features of a ride-hailing platform, including user and driver registration, ride booking, real-time tracking, and payment processing.
- User and Driver Registration
- Users and drivers can sign up with personal and vehicle details.
- Login and Authentication
- Secure login using JWT-based authentication.
- Ride Booking
- Users can book rides by specifying pickup and drop-off locations.
- Real-time Tracking
- Track rides in real-time using live location updates.
- Ride Management
- Drivers can accept or reject rides.
- OTP Verification
- Secure ride start with OTP-based validation.
- Fare Estimation
- Calculate ride fares based on distance and vehicle type.
- Payment Processing
- Support for online and cash payments.
- Recent Trip History
- View past trips for both users and drivers.
- React.js: For building the user interface.
- CSS: For styling the components.
- GoMaps API: For location and map functionalities.
- Node.js: For server-side logic.
- Express.js: For handling API endpoints.
- MongoDB: For database storage.
- Multer: For handling file uploads (e.g., driver identity proofs).
- Axios: For making HTTP requests.
- JWT: For authentication and authorization.
- Socket.io: For real-time location updates.
- Node.js installed on your machine.
- MongoDB database setup.
-
Clone the repository:
git clone <repository-url>
-
Navigate to the project directory:
cd uber-project -
Set up the backend:
- Navigate to the
backenddirectory:cd backend - Install dependencies:
npm install
- Create a
.envfile with the following variables:PORT=3000 DB_URI=your-mongodb-connection-string JWT_SECRET=your-secret-key
- Start the server:
npm start
- Navigate to the
-
Set up the frontend:
- Navigate to the
frontenddirectory:cd ../frontend - Install dependencies:
npm install
- Start the development server:
npm start
- Navigate to the
-
Access the application:
- Frontend:
http://localhost:3000 - Backend:
http://localhost:5000
- Frontend:
uber-project/
|-- backend/
| |-- controllers/
| |-- models/
| |-- routes/
| |-- server.js
|
|-- frontend/
| |-- src/
| |-- pages/
| |-- components/
| |-- App.js
|-- README.md
- User Registration:
POST /user/register - Driver Registration:
POST /driver/register - Login:
POST /login - Ride Booking:
POST /rides - Real-time Tracking:
GET /tracking
- Landing Page
- User Login and Signup
- Driver Login and Signup
- Ride Booking Page
- Live Tracking Page
- Payment Page
This project is licensed under the MIT License.
Contributions are welcome! To contribute:
- Fork the repository.
- Create a new branch.
- Make your changes.
- Submit a pull request.










