2f20ef7287db3fd8c6feba6134e9cddb3f264d0e
createWaitlistEntrySchema/updateWaitlistEntrySchema declared preferredTime/ preferredDate as bare z.string(), so a malformed value (e.g. a full ISO datetime) was inserted straight into the Postgres time/date columns, throwing a DateTimeParseError that surfaced as an unhandled 500. Constrain both fields with regexes (HH:MM[:SS] / YYYY-MM-DD) so zValidator rejects bad input with 400 before it hits the DB, and normalize HH:MM to HH:MM:SS on insert/update. Adds waitlist tests covering the 400 paths and HH:MM normalization. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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%