Flea Flicker 77a6ad5135 fix(pets): add extended fields to createPetSchema/updatePetSchema (GRO-2172)
createPetSchema in src/routes/pets.ts was missing temperamentScore,
temperamentFlags, medicalAlerts, and preferredCuts. Migrations 0034/0036
and seed data populate them, but POST/PATCH silently dropped the fields
because Zod validation rejected them. GET worked because seed bypassed
the schema. This is the regression originally reported as GRO-1472 and
blocks the GRO-1178 extended-profile feature rollout (api/#39).

Mirrors the field shape that already lives in apps/api/src/routes/pets.ts
(legacy duplicate) and the test expectations in
apps/api/src/__tests__/petsExtendedFields.test.ts:

- temperamentScore: int 1–5
- temperamentFlags: string[] (max 20, item max 100)
- medicalAlerts: { type, description, severity: low|medium|high }[] (max 50)
- preferredCuts: string[] (max 20, item max 200)

updatePetSchema inherits from createPetSchema.partial().omit({ clientId })
so no separate change is needed there.

POST/PATCH handlers now forward medicalAlerts through to the insert/update
with a localized cast — the @groombook/types MedicalAlert includes a
server-generated id that is not part of the API request shape, and the
jsonb column is schemaless at runtime.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-07 15:17:46 +00:00
2026-05-14 17:42:22 +00:00

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

S
Description
GroomBook API service (extracted from groombook/app monorepo)
Readme 3.8 MiB
Languages
TypeScript 99.3%
JavaScript 0.4%
Dockerfile 0.2%