47dae603accf68f3db70970f13d0c309e904c93d
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>
GroomBook API
GroomBook API service — extracted from the groombook/app monorepo.
Overview
This repository contains the GroomBook API service, including:
- REST API endpoints
- Database schema and migrations (via Drizzle ORM)
- Authentication (via Better Auth)
- Background job handlers
Structure
src/ # API service source
packages/db/ # Database schema, migrations, and utilities
packages/types/ # Shared TypeScript types
Setup
pnpm install
cp .env.example .env # Fill in required environment variables
pnpm --filter @groombook/api dev
Docker
docker build -t ghcr.io/groombook/api:latest .
docker run -p 3000:3000 ghcr.io/groombook/api:latest
License
AGPL-3.0-only
Description
Languages
TypeScript
99.3%
JavaScript
0.4%
Dockerfile
0.2%