A scalable logistics platform for managing vehicle bookings, real-time tracking, and fleet management. This platform allows users to book transportation services, track vehicles in real-time, and provides a streamlined interface for drivers and admins to manage jobs and analyze fleet performance.
- Features
- Tech Stack
- Setup and Installation
- Usage
- Environment Variables
- Project Structure
- API Endpoints
- Deployment
- Booking Service: Users can book a vehicle for transporting goods by specifying pickup and drop-off locations. The booking includes vehicle type and an estimated cost.
- Real-Time Tracking: Users can track the driver’s location in real-time after booking.
- Price Estimation: Provides an upfront price estimation based on distance, vehicle type, and current demand.
- Job Assignment: Drivers can receive and accept booking requests, view pickup and drop-off locations, and update the job status.
- Job Status Updates: Drivers can update job statuses such as en route, goods collected, and delivered.
- Fleet Management: Admins can manage vehicles, monitor driver activity, and analyze booking data.
- Data Analytics: Basic analytics to track completed trips, average trip time, and driver performance.
- Backend: Django (Python)
- Frontend: HTML, CSS, JavaScript (Google Maps API)
- Database: SQLite (for development), PostgreSQL (for production)
- APIs: Google Maps JavaScript API, Google Maps Geocoding API
- Deployment: Docker, Elastic Beanstalk (AWS)
- Python 3.8+
- Django 4.x
- Google Maps API Key
- Docker (optional for deployment)
-
Clone the repository:
git clone https://github.com/Hk669/goods-rickshaw.git cd goods-rickshaw
-
Create and activate a virtual environment:
python3 -m venv venv source venv/bin/activate # On Windows use `venv\Scripts\activate`
-
Install dependencies:
pip install -r requirements.txt
-
Apply migrations:
python manage.py migrate
-
Run the server:
python manage.py runserver
-
Access the application at
http://127.0.0.1:8000
.
To run the application using Docker:
- Build and run the services:
docker-compose up --build
- Access the application at
http://localhost:8000
.
- Users can register, log in, and book a vehicle by providing the pickup and drop-off location using the map interface.
- Users can track their bookings and view real-time updates on the driver’s location.
- Drivers can log in, view available jobs, and update job statuses (e.g., en route, goods collected, delivered).
- Drivers' locations are updated periodically using GPS.
- Admins can manage vehicles, track trips, and generate analytics reports from the admin dashboard.
To run this project, you will need to add the following environment variables to your .env
file:
SECRET_KEY=your_django_secret_key
DEBUG=True
ALLOWED_HOSTS=localhost,127.0.0.1
DATABASE_URL=your_database_url # For PostgreSQL or other databases
GOOGLE_MAPS_API_KEY=your_google_maps_api_key
goods-rickshaw/
│
├── bookings/
│ ├── migrations/
│ ├── templates/
│ ├── static/
│ ├── forms.py
│ ├── models.py
│ ├── views.py
│ ├── urls.py
│ └── admin.py
│
├── drivers/
│ ├── migrations/
│ ├── forms.py
│ ├── models.py
│ ├── views.py
│ ├── urls.py
│ └── admin.py
│
├── users/
│ ├── migrations/
│ ├── forms.py
│ ├── models.py
│ ├── views.py
│ ├── urls.py
│ └── admin.py
│
├── manage.py
├── Dockerfile
├── requirements.txt
├── README.md
├── .env
└── logistics_platform/
├── settings.py
├── urls.py
└── wsgi.py
- POST
/bookings/create/
: Create a new booking. - GET
/bookings/track/<id>/
: Track an existing booking. - POST
/bookings/update-status/
: Update the status of a booking (driver).
- POST
/drivers/update-location/
: Update the driver's location. - GET
/drivers/jobs/
: View available jobs.
- GET
/admin/dashboard/
: View fleet and booking analytics.
To deploy the application using Docker:
- Build and run the Docker containers:
docker-compose up --build
- Access the application at
http://localhost:8000
.
-
Configure Elastic Beanstalk with the necessary environment variables:
(SECRET_KEY, GOOGLE_MAPS_API_KEY, DATABASE_URL)
. -
Deploy the application using the eb CLI:
eb init -p python-3.9 logistics-platform
eb create logistics-env
eb deploy
Ensure you have set up the necessary permissions and configurations in AWS before deploying.
Thanks.