Phase 1.3 of Route Optimization. Exposes the GRO-2153 geocoding service
as API endpoints and wires auto-geocoding into the client mutation flow.
- POST /api/clients/:clientId/geocode — geocode one client (manager-only)
- POST /api/clients/geocode-batch?limit= — throttled batch geocode of
un-geocoded clients, reports `remaining` so managers re-run to finish
(avoids HTTP timeouts under Nominatim's 1 req/sec policy)
- Auto-geocode on client create/update when an address is supplied;
clearing the address drops stale coordinates
- Persists latitude/longitude/geocodedAt to the clients table
- Structured outcomes (geocoded | no_address | unresolved | error) with
clear messages so ambiguous addresses are surfaced to groomers/managers
- src/services/clientGeocoding.ts orchestrates provider resolution +
persistence; unit tests cover all outcomes and batch tallying
- Updated UAT_PLAYBOOK.md §4.2 — added TC-API-2.7 .. 2.17 (geocoding)
Co-Authored-By: Paperclip <noreply@paperclip.ing>