B2B logistics & supply-chain visibility platform for East Africa — real-time tracking, fleet management, customs clearance, and cold-chain monitoring.
# CargoTrack
**B2B SaaS for real-time freight tracking, ML-powered delay prediction, and logistics management across East Africa.**
CargoTrack connects freight forwarders, 3PLs, carriers, importers, customs brokers, and port agents across Kenya, Uganda, Tanzania, Rwanda, and Burundi.
---
## Tech Stack
| Layer | Technology |
|---|---|
| Core API | Django 4.2 + Django REST Framework + Daphne ASGI |
| Database | PostgreSQL 16 + TimescaleDB 2.16 |
| Event Bus | Apache Kafka (KRaft mode) + Schema Registry |
| Cache | Redis 7 |
| Identity | Keycloak 26 (OIDC) |
| API Gateway | Traefik v3 |
| Frontend | React 18 + Vite + TypeScript + Tailwind CSS v4 |
| Mobile | Expo (React Native) — development builds, not Expo Go |
| ML | scikit-learn (RandomForestClassifier) + XGBoost |
| Workflow Engine | Java 21 + Camunda 7 (BPMN + DMN) |
| EDI Gateway | Java 21 + Apache Camel (EDIFACT + X12 + AS2) |
| WebSocket | Elixir + Phoenix |
| GPS Ingest | Rust (tokio, rumqttc, rdkafka) |
| Route Optimizer | Rust (tonic gRPC, geo) |
| Notification | Go (Kafka consumer, FCM/Email/SMS/WhatsApp/USSD) |
| Webhook Dispatcher | Go (HMAC-SHA256, exponential backoff) |
| Observability | Prometheus + Grafana + Jaeger + Loki + Promtail |
| Object Storage | MinIO (S3-compatible) |
Full architecture details: docs/architecture.md
---
## Quick Start (Docker)
### Prerequisites
- Docker Desktop 24+
- A `.env` file in the project root
### 1. Create your `.env`
```bash
cp .env.example .env
```
Edit `.env` and set at minimum:
```env
DEBUG=True
SECRET_KEY=
DB_PASSWORD=a-strong-local-password
```
### 2. Build and start
**Sandbox (lightweight dev — recommended for first run):**
```bash
docker compose -f docker-compose.sandbox.yml up -d
```
**Full production stack (30+ services):**
```bash
docker compose up -d
```
Migrations run automatically on backend startup.
### 3. Access the services
| Service | URL |
|---|---|
| React frontend |
localhost |
| Django API |
localhost …