Logo Lanfrica

Vanessa-79/junior-dev-test-true-african

Domain:

mobility

Record type:

software
Creator:
Van
Host:
# junior-dev-test-true-african # πŸš– Ride-Sharing Service Backend ## πŸ“Œ Overview A Django-based ride-sharing backend service that demonstrates: - **Code Versioning** β†’ Git with GitHub Actions CI/CD pipeline - **Algorithm Design** β†’ Haversine-based driver matching with Uganda-specific optimizations - **API Integration** β†’ OpenStreetMap integration for real-time geolocation - **Code Deployment** β†’ Docker containerization for easy deployment - **Caching System** β†’ Redis integration for optimized performance ## πŸš€ Features βœ… **Smart Ride-Matching** - Assigns nearest driver using Haversine formula - Optimized for Uganda's geographical bounds - Considers driver availability and location βœ… **Real-Time Geolocation** - OpenStreetMap integration via Nominatim - Geocoding and reverse geocoding - Distance calculation between locations - Redis caching for location lookups (24-hour cache) βœ… **Performance Optimizations** - Redis caching system for: - Geolocation results (24-hour cache) - Nearby drivers (5-minute cache) - Ride details (1-hour cache) - User profiles (1-hour cache) βœ… **REST API Endpoints** - Request rides with location matching - Real-time ride status tracking - Driver availability management βœ… **Production Ready** - Containerized with Docker - CI/CD with GitHub Actions - PostgreSQL database - Redis caching ## πŸ“‚ Project Structure ``` πŸ“¦ ride-sharing-backend β”œβ”€β”€ πŸ“‚ rides/ β†’ Core ride management β”‚ β”œβ”€β”€ matching.py β†’ Driver matching algorithm β”‚ β”œβ”€β”€ models.py β†’ Ride data models β”‚ β”œβ”€β”€ views.py β†’ API endpoints β”‚ └── urls.py β†’ URL routing β”œβ”€β”€ πŸ“‚ drivers/ β†’ Driver management β”œβ”€β”€ πŸ“‚ riders/ β†’ Rider management β”œβ”€β”€ πŸ“‚ utils/ β†’ Shared utilities β”‚ └── geolocation.py β†’ Location services β”œβ”€β”€ πŸ“‚ tests/ β†’ Test suite β”œβ”€β”€ πŸ“„ Dockerfile β†’ Container configuration └── πŸ“„ docker-compose.yml β†’ Local development ``` ## πŸ› οΈ Installation & Setup ### Prerequisites - Python 3.11+ - Docker and Docker Compose - PostgreSQL (o …