From 501e6c30d4c0d11ab864c97df1e6a9c463fa1ac2 Mon Sep 17 00:00:00 2001 From: jason Date: Mon, 9 Mar 2026 22:47:31 -0500 Subject: [PATCH] docs(roadmap): add v0.6.0 sprint entries; mark champion, settings, build fixes complete --- ROADMAP.md | 105 ++++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 75 insertions(+), 30 deletions(-) diff --git a/ROADMAP.md b/ROADMAP.md index 4a66b30..bc3f46b 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -19,13 +19,15 @@ - [x] Indexes and triggers - [x] **litter_id column** for linking puppies to litters - [x] **Clean schema design** - NO migrations, fresh init only +- [x] **Safe ALTER TABLE migration guards** - new columns added automatically on upgrade ### API Endpoints -- [x] `/api/dogs` - Full CRUD operations +- [x] `/api/dogs` - Full CRUD operations (incl. `is_champion`) - [x] `/api/pedigree` - Tree generation and COI calculator - [x] `/api/litters` - Breeding records - [x] `/api/health` - Health tracking - [x] `/api/breeding` - Heat cycles and whelping calculator +- [x] `/api/settings` - Kennel configuration (GET/PUT) - [x] Photo upload with Multer - [x] **Parent relationship handling** via parents table - [x] `/static/*` - Branding and static asset serving @@ -114,8 +116,8 @@ - [x] **Projected Whelping Calendar Identifier** ✅ *(March 9, 2026 — v0.5.1)* - [x] Gestation constants: earliest=58, expected=63, latest=65 days - - [x] `getWhelpDates(cycle)` client-side helper (no extra API call) - - [x] Indigo whelp window cells (days 58–65) on calendar grid + - [x] `getWwhelpDates(cycle)` client-side helper (no extra API call) + - [x] Indigo whelp window cells (days 58–63) on calendar grid - [x] Indigo dot marker on expected whelp day (day 63) - [x] `Baby` icon + "[Name] due" label inside whelp day cells - [x] "Whelp est. [date]" row with range on active cycle cards @@ -127,9 +129,40 @@ --- -## 📋 Phase 4: Health & Genetics (NEXT UP) +## ✅ Phase 4a: Champion & Settings (COMPLETE — v0.6.0) -### Health Records *(Priority 1)* +### Champion Bloodline Tracking +- [x] `is_champion INTEGER DEFAULT 0` column on `dogs` table +- [x] Safe `ALTER TABLE dogs ADD COLUMN is_champion` migration guard +- [x] `is_champion` included in all `GET /api/dogs` + `GET /api/dogs/:id` responses +- [x] `is_champion` persisted in `POST` and `PUT /api/dogs` +- [x] `is_champion` included on sire/dam JOIN queries and offspring query +- [x] Champion toggle checkbox in `DogForm` with amber-gold highlight + `Award` icon +- [x] `✪` suffix on champion names in sire/dam parent dropdowns +- [x] Champion Bloodline badge on offspring cards and dog detail pages + +### Kennel Settings +- [x] `settings` table: `kennel_name`, `kennel_tagline`, `kennel_address`, `kennel_phone`, `kennel_email`, `kennel_website`, `kennel_akc_id`, `kennel_breed`, `owner_name` +- [x] Safe `ALTER TABLE settings ADD COLUMN` migration loop for all kennel fields +- [x] Auto-seed default row (`kennel_name = 'BREEDR'`) if table is empty +- [x] `GET /api/settings` — returns single-row as flat JSON object +- [x] `PUT /api/settings` — partial update via `ALLOWED_KEYS` whitelist +- [x] `SettingsProvider` / `useSettings` React context hook +- [x] Kennel name displayed in navbar from settings +- [x] `SettingsPage` component for editing kennel info + +### Build & Runtime Fixes (v0.6.0) +- [x] `useSettings.js` → `useSettings.jsx` — Vite build failed because JSX in `.js` file +- [x] `server/index.js` — `initDatabase()` called with no args (was passing `DB_PATH`, now path is internal) +- [x] `server/index.js` — removed duplicate `app.get('/api/health')` inline route +- [x] `server/index.js` — `DATA_DIR` env var replaces `path.dirname(DB_PATH)` for directory creation +- [x] `server/routes/settings.js` — rewrote from double-encoded base64 + old key/value schema to correct single-row column schema + +--- + +## 📋 Phase 4b: Health & Genetics (NEXT UP) + +### Health Records *(Priority 1)* 🚨 - [ ] Health records list view per dog - [ ] Add/edit health test results - [ ] Vaccination tracking with expiry alerts @@ -137,12 +170,24 @@ - [ ] Document uploads (PDFs, images) - [ ] Health clearance status badges on dog cards -### Genetic Tracking *(Priority 2)* +**Complexity:** Medium | **Impact:** High | **User Value:** Excellent + +**Why this is recommended:** +- Natural complement to existing dog profiles +- Vaccination expiry alerts are high day-to-day utility +- Clearance badges on dog cards improve trust at a glance +- Builds toward breeding decision support + +**Estimated Time:** 6-8 hours + +### Genetic Trait Tracking *(Priority 2)* - [ ] Track inherited traits - [ ] Color genetics calculator - [ ] Health clearance status - [ ] Link traits to ancestors +**Estimated Time:** 5-7 hours + --- ## 📋 Phase 5: Advanced Features (PLANNED) @@ -236,32 +281,26 @@ --- -## 🌕 Current Sprint: v0.6.0 +## 📅 Current Sprint: v0.7.0 -### ✅ Completed This Sprint (v0.5.1) +### ✅ Completed This Sprint (v0.6.0) +- [x] `is_champion` flag — DB column, API, DogForm toggle, offspring badge, parent dropdown `✪` +- [x] Kennel Settings — `settings` table with all kennel fields, `GET/PUT /api/settings`, `SettingsProvider`, navbar kennel name +- [x] `useSettings.jsx` rename (Vite build fix) +- [x] `server/index.js` fix — `initDatabase()` no-arg call, duplicate health route removed +- [x] `server/routes/settings.js` rewrite — fixed double-encoded base64 + wrong key/value schema + +### ✅ Previously Completed (v0.5.1) - [x] Projected Whelping Calendar Identifier — indigo whelp window cells, due label, active card range, jump-to-month button - [x] Live whelp preview in Cycle Detail modal (client-side, no save required) - [x] Full-width whelping banner for months with projected whelps - [x] "Projected Whelp" legend entry + updated page subtitle -### ✅ Previously Completed (v0.5.0) -- [x] Trial Pairing Simulator — `/pairing` route, COI%, risk badge, common ancestors -- [x] Heat Cycle Calendar — month grid, phase color coding, start-cycle modal -- [x] Cycle Detail modal — breeding windows, inline breeding date, whelping estimate -- [x] New backend endpoints: `GET /heat-cycles`, `GET /heat-cycles/:id/suggestions` -- [x] Removed `progesterone_peak_date` from POST/PUT (moved to extended backlog) +### 🔜 Next Up (Priority Order) -### 🔧 Next Up (Priority Order) - -#### Option 1: Health Records System (Recommended) 💡 +#### Option 1: Health Records System (Recommended) 🚨 **Complexity:** Medium | **Impact:** High | **User Value:** Excellent -**Why this is recommended:** -- Natural complement to existing dog profiles -- Vaccination expiry alerts are high day-to-day utility -- Clearance badges on dog cards improve trust at a glance -- Builds toward breeding decision support - **Tasks:** - Create `HealthRecordForm` component - Health records list/timeline per dog on DogDetail page @@ -276,11 +315,6 @@ #### Option 2: Genetic Trait Tracking **Complexity:** Medium | **Impact:** Medium | **User Value:** Good -**Why consider this:** -- Visual color/coat genetics are important for breeders -- Links naturally to pedigree view -- Useful for marketing/listing dogs - **Tasks:** - Trait entry form (coat color, pattern, carried traits) - Display traits on dog detail page @@ -301,6 +335,9 @@ - [x] Brand logo display and sizing - [x] Gradient title rendering - [x] Static asset serving in prod and dev +- [ ] Champion toggle — DogForm save/load round-trip +- [ ] Champion badge — offspring card display +- [ ] Kennel settings — save + navbar name update - [ ] Trial pairing simulator (end-to-end) - [ ] Heat cycle calendar (start cycle, detail modal, whelping) - [ ] Projected whelping calendar identifier (whelp cells, due label, banner) @@ -314,13 +351,21 @@ ## How to Contribute 1. Pick a feature from "Next Up" above -2. Create a feature branch: `feat/feature-name` +2. Create a feature branch off `master`: `feat/feature-name` 3. Implement with tests 4. Update this roadmap and README.md 5. Submit PR for review ## Version History +- **v0.6.0** (March 9, 2026) - Champion Bloodline, Settings, Build Fixes + - `is_champion` flag on dogs table with ALTER TABLE migration guard + - Champion toggle in DogForm; `✪` suffix in parent dropdowns; offspring badge + - Kennel settings table + `GET/PUT /api/settings` + `SettingsProvider` + - `useSettings.jsx` rename (Vite build fix) + - `server/index.js` fix: `initDatabase()` no-arg, duplicate health route removed + - `server/routes/settings.js` rewrite: double-encoded base64 + wrong schema fixed + - **v0.5.1** (March 9, 2026) - Projected Whelping Calendar Identifier - Indigo whelp window cells (days 58–65) on month grid - Indigo dot marker on exact expected whelp day (day 63) @@ -333,7 +378,7 @@ - **v0.5.0** (March 9, 2026) - Breeding Tools Complete - Trial Pairing Simulator: COI calculator, risk badge, common ancestors - - Heat Cycle Calendar: month grid, phase windows, start-cycle modal + - Heat Cycle Calendar: month grid, phase color coding, start-cycle modal - Cycle Detail: breeding windows, inline breeding date, whelping estimate - New API: `GET /heat-cycles`, `GET /heat-cycles/:id/suggestions` - Progesterone tracking moved to extended backlog