AI pre-bottleneck traffic intelligence for Accra and Kumasi - Tech Hub Africa Hackathon 2026
# AccraFlow
**AI-powered pre-bottleneck traffic intelligence for Accra & Kumasi**
Built for Tech Hub Africa Hackathon 2026 — Track 2: Mitigating Traffic Congestion.
> Standard GPS tells you you're stuck. AccraFlow tells you where you'll get stuck — before you leave.
## Features
- **Smart Route Planner** — Ranks 3 routes by predicted congestion, not just distance
- **Congestion Heatmap** — 20+ known Accra/Kumasi hotspots with time-of-day weighting
- **Crowd Reports** — One-tap traffic severity reports from commuters
- **Pre-Bottleneck AI** — Weighted scoring: 40% historical + 35% Google traffic + 25% crowd data
- **TroTro Stop Finder** — Major lorry stations with routes and wait times
## Tech Stack
- Next.js 16 + TypeScript + Tailwind CSS
- Google Maps Platform (Maps JS, Directions, Places, Visualization)
- Weighted congestion scoring engine
- Vercel-ready deployment
## Quick Start
```bash
cd accraflow
npm install
cp .env.example .env.local
# Add Google Maps + optional Neon DATABASE_URL
npm run dev
```
Open
localhost.
## Setup Guides
| Guide | Purpose |
|-------|---------|
| docs/SETUP-GOOGLE-MAPS.md | Google Maps API key (step-by-step) |
| docs/SETUP-NEON.md | Neon Postgres for persistent reports |
| docs/DEPLOY.md | GitHub + Vercel deployment |
| docs/DEMO-VIDEO-SCRIPT.md | 2-minute hackathon demo video |
Without API keys, the app runs in **demo mode** with simulated routes and hotspot cards.
## Demo Script (2-min video)
1. **Problem (15s):** "Accra loses billions of cedis to traffic every year."
2. **Heatmap (20s):** Show congestion hotspots across Accra, toggle heatmap on.
3. **Route planning (40s):** Search Osu → Kaneshie, show 3 ranked routes with savings.
4. **Crowd report (20s):** Tap map, report heavy traffic, watch heatmap update.
5. **Impact (25s):** "Built for Ghana's data reality — crowd-powered intelligence on top of Maps."
## API Endpoints
| Method | Path | Description |
|--------|------|-------------|
| POST | `/api/routes …