Community-powered road intelligence for Tanzanian transporters.
cd hackthon
pip install -r requirements.txt
cp .env.example .env # or use your existing .ENV
# Edit .env with SECRET_KEY, GEMINI_API_KEY, AT_USERNAME, AT_API_KEY
python manage.py migrate
python manage.py seed_data
python manage.py createsuperuser
python manage.py runserver| Variable | Purpose |
|---|---|
SECRET_KEY |
Django secret |
DEBUG |
True or False (string) |
GEMINI_API_KEY |
Google Gemini API |
GEMINI_MODEL |
Default gemini-2.5-flash |
AT_USERNAME |
Africa's Talking username |
AT_API_KEY |
Africa's Talking API key |
Settings load .env and .ENV automatically. Never commit real keys.
| Page | URL |
|---|---|
| Home | / |
| Dashboard | /dashboard/ |
| Routes | /routes/ |
| Route detail | /routes/<id>/ |
| Report incident | /report/ |
| Register driver | /register-driver/ |
| Simulate SMS/WhatsApp | /simulate-message/ |
| Admin | /admin/ |
Routes are multi-leg corridors (e.g. Dar es Salaam → Chalinze → Morogoro → Gairo → Dodoma), not single straight lines. Incidents attach to the closest RouteSegment; full route risk aggregates segment scores.
See core/services/risk_engine.py. Per-segment scores use severity, incident type, verification, and freshness. Route score aggregates segments (max + multi-section boost). Recommendations warn per section, not “cancel whole trip.”
- Home → hero, features, pitch
- Dashboard → stats, high-risk routes, latest reports
- Routes → click Dar es Salaam → Morogoro
- Report incident → submit, see risk update
- Simulate SMS →
ACCIDENT#Chalinze#Dar es Salaam to Morogoro - Register driver → add a driver