# 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 …