# Uber Clone 🚕
A full-stack Uber-like ride booking application built with **React, Node.js, Express, MongoDB, Socket.IO, and Tailwind CSS**.
The application allows users to register, log in, request rides, and communicate with captains through real-time functionality.
## 🚀 Features
### User
* User registration and login
* JWT-based authentication
* Password hashing with bcrypt
* Request a ride
* Select pickup and destination locations
* Real-time ride updates
* Ride status tracking
* Logout functionality
### Captain
* Captain registration and login
* Captain authentication
* Receive ride requests
* Accept and manage rides
* Real-time ride communication
* Ride completion functionality
### Real-Time Features
* Socket.IO integration
* Real-time ride requests
* Real-time captain/user communication
* Live ride status updates
## 🛠️ Tech Stack
### Frontend
* React.js
* Vite
* Tailwind CSS
* React Router
* Axios
* Socket.IO Client
* Google Maps API
* GSAP
### Backend
* Node.js
* Express.js
* MongoDB
* Mongoose
* Socket.IO
* JWT
* bcrypt
* Express Validator
* CORS
* Cookie Parser
## 📁 Project Structure
uberClone/
│
├── Backend/
│ ├── controllers/
│ ├── db/
│ ├── middlewares/
│ ├── models/
│ ├── routes/
│ ├── services/
│ ├── app.js
│ ├── server.js
│ └── socket.js
│
├── frontend/
│ ├── public/
│ ├── src/
│ │ ├── components/
│ │ ├── context/
│ │ └── pages/
│ ├── package.json
│ └── vite.config.js
│
├── .gitignore
└── package-lock.json
## ⚙️ Installation
### 1. Clone the repository
git clone https://github.com/thafshan/uberClone.git
cd uberClone
### 2. Install Backend Dependencies
cd Backend
npm install
### 3. Configure Backend Environment Variables
Create a .env file inside the Backend folder:
PORT=4000
DB\_CONNECT=your\_mongodb\_connection\_string
JWT\_SECRET=your\_secret\_key
### 4. Start the Backend
npm start
The backend will run on:
http://localhost:4000
### 5. Install Frontend Dependencies
Open another terminal:
cd frontend
npm install
### 6. Configure Frontend Environment Variables
Create a .env file inside the frontend folder:
VITE\_BASE\_URL=http://localhost:4000
### 7. Start the Frontend
npm run dev
The frontend will run on:
http://localhost:5173
## 🔐 Environment Variables
For security reasons, environment files containing database credentials, API keys, and secrets are **not included in this repository**.
Create your own .env files locally before running the application.
## 📸 Screenshots
Screenshots of the application will be added here.
## 🌐 Live Demo
Coming soon.
## 📌 Future Improvements
* Online payment integration
* Ride history
* Driver ratings and reviews
* Improved live location tracking
* Mobile responsive improvements
* Production deployment
* Additional ride management features
## 👨💻 Author
**Afshan Khan**
GitHub: https://github.com/thafshan
## ⭐ Support
If you found this project useful, consider giving the repository a ⭐ on GitHub.



