This branch contains ongoing development for real-time ride tracking,matching ride requests and permission classes. Updates and implementations are in progress.
/api/rider/rides/ GET - List all rides requested by the rider
/api/rider/rides/ POST - Create a new ride request (Only if there is no active rides)
/api/rider/rides/{id}/ GET - Retrieve details of a specific ride
/api/rider/rides/{id}/ PUT/PATCH - Update ride info (only if status is 'requested')
/api/rider/rides/{id}/cancel-ride/ - POST Cancel a ride (only if status is 'requested' or 'accepted')
/api/rider/rides/{id}/track-ride/ GET - Get current ride status and driver location
api/driver/rides/ — List available ride requests nearby
api/driver/rides/{id}/accept-ride/ — Accept a ride request
api/driver/rides/{id}/update_status/ — Update the ride status
api/driver/update-location/ — Update driver’s current location (no ride ID needed)
api/driver/rides/assigned-rides/ — List all rides assigned to the driver
api/driver/rides/{id}/assigned-ride-detail/ — Get details of a specific assigned ride
To enable real-time ride tracking simulation in this project, you need to run both Celery worker and Celery beat scheduler. Celery worker executes asynchronous tasks, while Celery beat schedules periodic tasks, such as updating ride locations every few seconds.
Use the following commands in separate terminal windows:
# Start Celery worker
celery -A ride_sharing_api worker --loglevel=info
# Start Celery beat scheduler
celery -A ride_sharing_api beat --loglevel=info