It's an AI-powered incident-reporting tool for Kampala's boda boda ecosystem — it takes messy, real-world accounts of road incidents (spoken or typed, often mixing English and Luganda, plus an optional photo) and turns them into clean, structured reports that boda associations, insurers, or city stakeholders can actually act on.
# Boda Guardian AI
Kampala boda incident reporter powered by **Gemma 4** (`gemma-4-31b-it`) with a **FastAPI** backend.
## Why does it ask for a “Gemini” API key?
Gemma runs on **Google AI Studio’s API**. Google labels that key a “Gemini API key,” but the same key unlocks **Gemma** models. This app calls `gemma-4-31b-it`.
## Run Locally
**Prerequisites:** Node.js 20+ and Python 3.10+
1. Install frontend deps:
`npm install`
2. Create a Python venv and install backend deps:
```bash
python -m venv .venv
# Windows:
.venv\Scripts\activate
pip install -r backend/requirements.txt
```
3. Copy `.env.example` to `.env.local` and set:
`GEMINI_API_KEY=your_key_here`
(Get a key at
aistudio.google.com)
4. Run API + frontend together:
`npm run dev`
5. Open
localhost
- Frontend: Vite
- Backend: FastAPI on
127.0.0.1
- Docs:
127.0.0.1
## Deploy on Vercel
1. Import the GitHub repo into Vercel.
2. Add env var `GEMINI_API_KEY` or `GeminiAPIkey` (Google AI Studio key).
3. Redeploy.
4. Confirm: `
your_app.vercel.app`
Expect `{ "ok": true, "hasApiKey": true, "backend": "fastapi", "model": "gemma-4-31b-it" }`
API routes:
- `GET /api/health`
- `POST /api/generate-report` — body `{ "description": "...", "image": { "data": "...", "mimeType": "..." } }`