watershow
← all work

// case study

Polis

A civic AI agent that does the city intake work.

The problem

Reporting a street problem to a city means finding the right department and writing a formal letter. Most people give up. The intake work is exactly what an agent can do.

What I built

A resident reports a street problem with a photo and a short text.

The agent triages it into category, severity, hazard flag, and the right department, then plots it on a dark city map.

It drafts a formal letter and emails it to the department, so the report turns into real action instead of a form that goes nowhere.

Engineering I solved

  • Used Gemini vision with a strict JSON schema so the triage output is structured and safe to render.
  • Hardened the prompt so the letter reads like a municipal clerk wrote it, with no AI tells.
  • Wired real email dispatch to any address through a domain verified sender.
  • Diagnosed and fixed a server that advertised IPv6 with no route, by forcing the whole Node process onto IPv4 so the Google auth token call stopped stalling.

Stack

App

  • Next.js 16
  • React 19
  • TypeScript
  • Tailwind 4

Map

  • react-leaflet
  • CARTO dark tiles

AI

  • Gemini
  • Vision
  • Structured JSON

Email

  • Resend
  • Verified domain

Proof

← back to all work