2fa6e3d87b409f7c5e796980fa0c6fd9942cd464
Phase 1.2 of Route Optimization. Adds a provider-agnostic geocoding service layer in the deployed src/ tree: - GeocodingProvider interface + GeocodeResult type - NominatimGeocodingProvider (default, free, self-hostable) with an internal rate limiter enforcing the 1 req/sec Nominatim usage policy - GoogleGeocodingProvider (optional fallback) keyed by the encrypted businessSettings.googleMapsApiKey (decrypted via decryptSecret) or GOOGLE_MAPS_API_KEY env fallback - resolveGeocodingProvider() selecting on businessSettings.routeOptimizationProvider, with safe fallback to Nominatim when google is configured but no usable key - geocodeBatch() throttled batch utility (honors provider rate limit, captures per-item errors, optional progress callback) - 20 unit tests covering both providers, selection, throttle spacing, and batch 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%