7233e5ab1676d51119701bf665f2ca2c1e779be0
- Add bufferMinutes column to appointments table (default 0) - Add petSizeCategory to pets table for buffer resolution - Extend BookedSlot interface with bufferMinutes - Update generateAvailableSlots() to account for existing buffers and new appointment's buffer when checking availability - Add resolveBufferMinutes() helper based on pet size/coat - Update GET /availability to accept petSizeCategory/petCoatType params and pass newBufferMinutes to slot generation - Update POST /appointments to resolve and store bufferMinutes and check existing appointment buffers in conflict detection - Update admin appointments.ts: resolve buffer on create, account for existing buffers in all conflict checks (create/update/cascade) - Add buffer time test cases to slots.test.ts covering: - new appointment buffer blocks overlapping slots - existing booking buffer extends blocking window - business hours check includes new appointment buffer - backward compatibility (bufferMinutes=0) - resolveBufferMinutes() for all size/coat combinations 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
apps/api/ # 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%