This is an Uber Clone project that aims to replicate the core functionality of the Uber ride-sharing app. The project is divided into two main components: a backend API built using FastAPI and a frontend application developed with React. This README.md file provides an overview of the project, instructions for setting up and running both the backend and frontend components, and other important information for developers and contributors.
- User registration and authentication.
- User and driver profiles.
- Booking and tracking rides.
- Real-time location tracking.
- Payment processing.
Before getting started with this project, ensure you have the following prerequisites installed on your system:
- Python (3.8+ recommended)
- Node.js (14+ recommended)
- npm
- Git
- Postman API
-
Clone the repository:
git clone https://github.com/your-username/uber-clone.git cd uber-clone/backend -
Create a virtual environment (optional but recommended):
python -m venv venv source venv/bin/activate # On Windows, use `venv\Scripts\activate`
-
Install Python dependencies:
pip install -r requirements.txt
-
Create a
.envfile in thebackenddirectory and configure the following environment variables:DATABASE_URL=postgresql://username:password@localhost/uber_clone SECRET_KEY=your_secret_keyReplace
username,password, andyour_secret_keywith your own values. -
Initialize the database:
alembic upgrade head
-
Start the FastAPI server:
uvicorn main:app --reload
-
Open a new terminal window and navigate to the
frontenddirectory of the project:cd uber-clone/frontend -
Install frontend dependencies:
npm install
-
The FastAPI backend will be accessible at
http://localhost:8000. -
Access the FastAPI Swagger documentation at
http://localhost:8000/docsfor API reference.
-
Start the React development server:
npm start
-
The React frontend will be accessible at
http://localhost:3000.
If you'd like to contribute to this project, please follow these guidelines:
-
Fork the repository on GitHub.
-
Clone your fork locally:
git clone https://github.com/your-username/uber-clone.git
-
Create a new branch for your feature or bug fix:
git checkout -b feature/your-feature-name
-
Make your changes and commit them with descriptive commit messages.
-
Push your changes to your GitHub fork:
git push origin feature/your-feature-name
-
Create a pull request on the original repository with a clear description of your changes.
-
Your pull request will be reviewed by project maintainers.
This project is licensed under the MIT License - see the LICENSE file for details.
- Special thanks to the FastAPI and React communities for their fantastic tools and resources.
Happy coding! 🚗🚀