This project is a carpooling web application API that enables users to share rides, find available rides, and manage bookings. The application is built with a Python Flask using MongoPy for database interactions and JWT for authentication
- User registration and authentication
- User profile management
- Create, search, and manage rides
- Book and cancel ride bookings
- Notifications system
- Rating and feedback for rides
- Python Flask
- MongoPy/ MongoEngine
- JWT for authentication - flask
- Google distance matrix api
- Mailjar API
- AWS EC2 - linux server
- Gunicorn
- Nginx
- Clone the repository:
git clone https://github.com/aleksifuna/PoolPal.git
cd PoolPal
- Create and activate a virtual Environment:
python3 -m venv venv
source venv/bin/activate
- Install the required packages:
pip install -r requirements.txt
- Install and configure MongoDB
- Follow the instructions for your operating system to install MongoDB from the official MongoDB documentation.
- Start the MongoDB service:
sudo service mongod start
- (Optional) Use mongo shell or a GUI like MongoDB Compass to create a database for the application.
- Set up environment variables for Flask and database configutation in a .env file
- Run the application:
python -m api.v1.app
- User Registration: POST /api/register
- User Login: POST /api/login
- Create a Ride: POST /api/rides
- Search Rides: GET /api/rides
- Book a Ride: POST /api/rides/{ride_id}/book
- Cancel Booking: DELETE /api/rides/{ride_id}/book
- Get Notifications: GET /api/notifications
- Leave Feedback: POST /api/rides/{ride_id}/feedback
- For a complete list of endpoints and to test them, please visit our Swagger API Documentation
If you would like to contribute to this project, please fork the repository and submit a pull request. We welcome all contributions.