A mobile-first ML-powered fleet fuel efficiency optimization system designed for Kenya’s transport sector. Built with React Native (frontend), FastAPI (backend), SQLite (database), and machine learning (XGBoost, Random Forest).
# FuelIQ
A fleet fuel management system built for Kenya's transport industry. FuelIQ helps fleet managers track fuel consumption, monitor driver performance, and reduce operating costs through ML-powered predictions and real-time trip tracking.
---
## Features
### Driver App
- Real-time GPS trip tracking with live waypoint recording
- Fuel consumption predictions powered by a Gradient Boosting ML model
- Personal performance dashboard (distance, fuel used, efficiency score)
- Assigned vehicle details and service status
- Offline trip queuing with automatic sync on reconnect
### Fleet Manager App
- Fleet-wide analytics and fuel efficiency trends
- Driver performance rankings and comparisons
- Vehicle management (status, assignments, service scheduling)
- Budget tracking by route
- AI-generated fuel-saving recommendations
### Admin App
- User and company management
- System-wide analytics
- Fuel price and settings configuration
---
## Tech Stack
### Mobile (this repo)
| Layer | Technology |
|-------|-----------|
| Framework | React Native 0.81 + Expo SDK 52 |
| Navigation | Expo Router 6 (file-based) |
| Language | TypeScript (strict mode) |
| Styling | NativeWind (Tailwind CSS for RN) |
| State | Zustand |
| Server state | TanStack Query v5 |
| Animations | React Native Reanimated 4 |
| Storage | Expo SecureStore |
| Icons | Expo Vector Icons (Ionicons) |
### Backend (in `/backend`)
| Layer | Technology |
|-------|-----------|
| Framework | FastAPI 0.115 |
| Language | Python 3.11 |
| Database | PostgreSQL (production) / SQLite (local dev) |
| ORM | SQLAlchemy 2.0 + Alembic migrations |
| Auth | JWT (python-jose) + bcrypt |
| ML Model | Gradient Boosting Regressor (scikit-learn) |
| Server | Uvicorn |
| Deployment | Railway (Docker) |
### ML Model
- **Algorithm:** Gradient Boosting Regressor
- **Accuracy:** R² = 0.9922, MAE = 0.84 L, MAPE = 5.45%
- **Features:** 13 inputs — engine size, cylinders, distance, speed, idle time, load weight, fuel type, route t …