CrimeLens AI
An urban-safety platform: citizens report incidents from mobile, a dashboard surfaces hotspots, and routing suggests ways around them.
My contribution
Built as a hackathon project — AI Nexus Hackathon finalist. Contributed across the FastAPI backend (routers, services, Pydantic models, geo and pagination utilities) and the Next.js dashboard.
The problem
Crime data tends to sit in reports nobody reads. The people who could act on it — a resident choosing a route home, an officer deciding where to patrol — have no interface to it at the moment the decision is made.
The approach
A FastAPI service backed by Supabase ingests incident reports and serves them to two clients: an Expo / React Native app for reporting on the move, and a Next.js dashboard for analysis. Reports are geocoded and clustered into hotspots, rendered on a map, and fed into OSRM routing so a suggested route can prefer lower-risk areas. Gemini assists with incident classification and report generation.
Decisions
- Two clients, one API
- Reporting happens on a phone in the street; analysis happens at a desk. Rather than compromise on one responsive web app, the backend serves a thin mobile client and a data-dense dashboard separately, with shared Pydantic schemas as the contract.
- Routing as the output, not the map
- A heatmap tells you where crime happened. A safer route tells you what to do about it. Wiring hotspot output into OSRM turns the analysis into an action.
- A monorepo with real boundaries
- `backend/`, `apps/dashboard`, `apps/mobile` and `packages/` keep the Python service and the two JavaScript clients independently runnable and testable rather than entangled.