AI-enhanced civic issue reporting for Kosovo municipalities.
KoStreet is a platform that connects citizens, municipal teams, and computer vision into one street-level operations loop: report an issue, triage it on a map, route it through workflow, and proactively scan corridors with AI Street Audit.
Built for hackathon and pilot deployments, it is scoped for Kosovo-wide geography (not a single-city demo) and designed to feel credible in front of municipal stakeholders.
Citizens capture a photo, share their location, and submit a structured report. The backend can classify the issue with AI, store photos in Supabase or local disk, and return a tracking page at /report/status/:id.
Operations staff get a Kosovo-centered map, a filterable report queue, workflow status, department routing hints, and metrics — all tuned for quick triage on desktop and mobile.
Municipal reviewers run or inspect proactive street scans: timeline navigation, evidence frames with detection overlays, confidence and severity cues, and a path from AI suggestion to municipal ticket. Demo runs and pitch mode are available when live backend data is sparse.
In-app notifications surface new reports and workflow events for dashboard users.
KoStreet is a monorepo with three engineering areas:
| Area | Path | Role |
|---|---|---|
| Frontend | frontend/ |
Vue 3 + Vite UI — citizen flow, dashboard, audit workspace |
| Backend | backend/ |
FastAPI REST API, persistence, uploads, audit orchestration |
| AI | ai/ |
Detection pipelines, street-audit planning, model evaluation |
Shared design and API docs live in docs/. See architecture and API reference for deeper detail.
- Frontend: Vue 3, TypeScript, Vite, Vue Router, Pinia, MapLibre GL
- Backend: Python 3.11+, FastAPI, SQLAlchemy (async), Alembic, PostgreSQL + PostGIS
- Storage: Supabase Storage (recommended for report photos) or local
backend/uploads/ - AI: Python package with OpenCV / optional PyTorch & Ultralytics model deps
| Route | Purpose |
|---|---|
/ |
Landing and product overview |
/report |
Citizen report flow |
/report/status/:id |
Report tracking |
/dashboard |
Municipal command center |
/audit |
AI Street Audit workspace |
/__kostreet-admin/reports |
Hidden admin surface (requires KOSTREET_ADMIN_SECRET) |
API docs (local): http://localhost:8000/docs
- Node.js 20+ and npm
- Python 3.11+
- PostgreSQL 15+ with PostGIS extension
- (Optional) Supabase project for durable report photo storage — see supabase-storage-setup.md
- (Optional)
GOOGLE_MAPS_API_KEY/MAPBOX_ACCESS_TOKENfor Street View and map imagery integrations - (Optional)
KOSTREET_AI_OPENROUTER_API_KEYfor live AI classification via OpenRouter
git clone https://github.com/diarnz/kosstreet.git
cd kosstreet
cp .env.example .envEdit .env at the repo root. Minimum for local dev:
KOSTREET_ENV=development
KOSTREET_DATABASE_URL=postgresql+asyncpg://kostreet:kostreet@localhost:5432/kostreet
KOSTREET_DATABASE_URL_SYNC=postgresql+psycopg2://kostreet:kostreet@localhost:5432/kostreet
KOSTREET_CORS_ORIGINS=http://localhost:5173,http://localhost:5174
KOSTREET_ADMIN_SECRET=change-me-to-a-long-random-secretLeave VITE_API_BASE_URL unset during local development — the Vite dev server proxies /api to the backend and avoids CORS issues.
Create the database and enable PostGIS:
CREATE USER kostreet WITH PASSWORD 'kostreet';
CREATE DATABASE kostreet OWNER kostreet;
\c kostreet
CREATE EXTENSION IF NOT EXISTS postgis;Run migrations from the backend directory:
cd backend
python -m venv .venvmacOS / Linux
source .venv/bin/activate
pip install -e ".[dev]"
alembic upgrade headWindows (PowerShell)
.\.venv\Scripts\Activate.ps1
pip install -e ".[dev]"
alembic upgrade headFrom backend/ with the virtual environment active:
uvicorn app.main:app --reloadBackend listens on http://localhost:8000. On startup it seeds demo data and migrates any legacy local uploads.
Health check: http://localhost:8000/health
In a second terminal:
cd frontend
npm install
npm run devFrontend listens on http://localhost:5173 and proxies API calls to the backend.
Open the app at http://localhost:5173.
Only needed for AI pipeline work or model evaluation, not for the standard web demo:
cd ai
python -m venv .venv
source .venv/bin/activate # Windows: .\.venv\Scripts\Activate.ps1
pip install -e ".[dev]"
# For model weights / inference:
pip install -e ".[models]"Without Supabase, photos are stored under backend/uploads/ and served through the backend image proxy (GET /api/v1/reports/{id}/image). That works locally but not across deployed devices.
For production or multi-device testing, configure Supabase Storage — full steps in docs/supabase-storage-setup.md.
| Service | URL |
|---|---|
| Frontend | http://localhost:5173 |
| Backend API | http://localhost:8000 |
| OpenAPI | http://localhost:8000/docs |
Demo / pitch flow: see docs/demo-script.md — use ?demo=1 on dashboard and audit routes when you want labeled demo scenarios.
Helper script: scripts/run_local.sh prints the same startup commands if you prefer a checklist in the terminal.
See repository license terms. Platform imagery (e.g. Google Street View) may be subject to separate provider terms — use audit and training features accordingly.