feat(GRO-526): Parameterize seed script with SEED_PROFILE env var #248

Closed
groombook-engineer[bot] wants to merge 4 commits from feat/gro-526-seed-profile-param into main
groombook-engineer[bot] commented 2026-04-10 01:24:03 +00:00 (Migrated from github.com)

Summary

  • Adds SEED_PROFILE env var with dev, uat, demo values
  • Dev profile: 4 staff (1 manager, 1 receptionist, 2 groomers, 0 bathers), 100 clients, 7d/30d appointment window, ~1000 invoices
  • UAT/Demo profiles: 8 staff (1 manager, 1 receptionist, 3 groomers, 3 bathers), 500 clients, 30d/90d window, ~4000 invoices
  • Defaults to UAT for backwards compatibility when SEED_PROFILE is unset
  • SEED_KNOWN_USERS_ONLY=true path unchanged

Key changes

  • packages/db/src/seed.ts: getProfileConfig() reads SEED_PROFILE, profile config drives staff/client/invoice counts
  • All appointment dates computed relative to NOW() at seed time (no hardcoded dates)
  • Supplemental appointment generation to hit target invoice counts per profile

Acceptance criteria

  • SEED_PROFILE=dev → 4 staff, ~100 clients, ~1000 invoices with 7d/30d window
  • SEED_PROFILE=uat → 8 staff, ~500 clients, ~4000 invoices with 30d/90d window
  • Existing SEED_KNOWN_USERS_ONLY=true path unchanged
  • Script idempotent and deterministic

cc @cpfarhood

## Summary - Adds `SEED_PROFILE` env var with `dev`, `uat`, `demo` values - **Dev profile:** 4 staff (1 manager, 1 receptionist, 2 groomers, 0 bathers), 100 clients, 7d/30d appointment window, ~1000 invoices - **UAT/Demo profiles:** 8 staff (1 manager, 1 receptionist, 3 groomers, 3 bathers), 500 clients, 30d/90d window, ~4000 invoices - Defaults to UAT for backwards compatibility when `SEED_PROFILE` is unset - `SEED_KNOWN_USERS_ONLY=true` path unchanged ## Key changes - `packages/db/src/seed.ts`: `getProfileConfig()` reads `SEED_PROFILE`, profile config drives staff/client/invoice counts - All appointment dates computed relative to `NOW()` at seed time (no hardcoded dates) - Supplemental appointment generation to hit target invoice counts per profile ## Acceptance criteria - `SEED_PROFILE=dev` → 4 staff, ~100 clients, ~1000 invoices with 7d/30d window - `SEED_PROFILE=uat` → 8 staff, ~500 clients, ~4000 invoices with 30d/90d window - Existing `SEED_KNOWN_USERS_ONLY=true` path unchanged - Script idempotent and deterministic cc @cpfarhood
github-actions[bot] commented 2026-04-10 01:29:59 +00:00 (Migrated from github.com)

Deployed to groombook-dev

Images: pr-248
URL: https://dev.groombook.farh.net

Ready for UAT validation.

## Deployed to groombook-dev **Images:** `pr-248` **URL:** https://dev.groombook.farh.net Ready for UAT validation.
github-actions[bot] commented 2026-04-10 01:33:04 +00:00 (Migrated from github.com)

Deployed to groombook-dev

Images: pr-248
URL: https://dev.groombook.farh.net

Ready for UAT validation.

## Deployed to groombook-dev **Images:** `pr-248` **URL:** https://dev.groombook.farh.net Ready for UAT validation.
lint-roller-qa[bot] (Migrated from github.com) reviewed 2026-04-10 01:38:48 +00:00
the-dogfather-cto[bot] commented 2026-04-10 16:12:12 +00:00 (Migrated from github.com)

Closing — duplicate of PR #250 which was already merged.

Closing — duplicate of PR #250 which was already merged.
This repo is archived. You cannot comment on pull requests.