Files
breedr/ROADMAP.md
T

160 lines
7.6 KiB
Markdown
Raw Normal View History

# BREEDR Development Roadmap (v0.8.1)
## 🚀 Current Status: v0.8.1 (Active Development)
### 🔜 Next Up — Phase 4b: Health & Genetics (remaining items)
> **Context:** Golden Retriever health clearances follow GRCA Code of Ethics and OFA/CHIC standards.
#### Step 1: DB Schema Extensions ✅
- [x] Extend `health_records` table with OFA-specific columns (test_type, result, ofa_number, expires_at, document_url)
- [x] Create `genetic_tests` table (PRA, ICH, NCL, DM, MD, GR-PRA variants)
- [x] Create `cancer_history` table
- [x] Add `chic_number`, `age_at_death`, `cause_of_death` to `dogs` table
- [x] All changes via safe ALTER TABLE / CREATE TABLE IF NOT EXISTS guards
#### Step 2: API Layer ✅
- [x] Health record CRUD (`/api/health`) + document upload (`POST /api/health/upload`)
- [x] `GET /api/health/dog/:dogId/clearance-summary`
- [x] `GET /api/health/dog/:dogId/chic-eligible`
- [x] Genetics CRUD (`/api/genetics`)
- [x] `GET /api/genetics/pairing-risk` (sire + dam carrier check)
- [x] Cancer history endpoints
#### Step 3: Core UI — Health Records
- [x] `HealthRecordForm` modal (per-type fields, result, OFA#, expiry, doc upload, age validation)
- [ ] `HealthTimeline` on DogDetail page (records list exists; timeline view pending)
- [x] `ClearanceSummaryCard` 2×2 grid (Hip / Elbow / Heart / Eyes)
- [ ] `ChicStatusBadge` on dog cards
- [x] Expiry logic for recurring tests (CAER, echo) in clearance summary
#### Step 4: Core UI — Genetics Panel ✅
- [x] `GeneticTestForm` modal
- [x] `GeneticPanelCard` on DogDetail (color-coded markers)
- [x] Pairing risk overlay on Trial Pairing Simulator
#### Step 5: Eligibility Checker
- [x] Eligibility logic (`grca_eligible` computed in clearance summary)
- [ ] Eligibility badge on dog cards
- [ ] Pre-litter eligibility warning modal
---
2026-03-12 07:35:15 -05:00
## 🕒 Version History & Recent Progress
- **v0.8.1** (July 6, 2026) - Sanity, Hardening & UX Pass (LATEST)
- [x] **Fresh-install fix**: `heat_cycles` table + litters/health_records columns added to init.js (schema had drifted from route usage); migration runner no-ops on empty DBs; `DB_PATH` honored consistently
- [x] **Deps**: better-sqlite3 9→11 (Node 1824 prebuilds); removed unused auth deps (bcrypt, jsonwebtoken, express-validator, express-rate-limit) — auth deliberately deferred
- [x] **API hardening**: sire/dam existence + sex validation, 404 on missing-dog updates, transactional multi-step writes, safe `photo_urls` parsing, photo-index bounds check
- [x] **UX layer**: toast notifications (replaces all `alert()`), ConfirmDialog (replaces all `window.confirm()`), load-error banners with Retry (`Promise.allSettled` loaders), 404 page, nav active-state on detail routes
- [x] **Fixes**: Start Heat Cycle female list was always empty (wrong response key); live OFA age warning in health form; puppy sorting; mobile responsiveness (375px clean on all pages)
- [x] Removed dead debug scripts (`test_app.js`, `test_express.js`)
- **v0.8.0** (March 12, 2026) - Reverse Pedigree & External Parentage
2026-03-12 07:35:15 -05:00
- [x] **Reverse Pedigree** (descendants view) toggle on Pedigree page
- [x] **External dog parentage** improvements (allowed assigning sire/dam to external dogs)
- [x] **Universal parent selection** (sire/dam dropdowns now include all dogs)
- [x] Updated documentation and roadmap
- **v0.7.0** (In Progress) - Phase 4b: Health & Genetics
- OFA clearance tracking (Hip, Elbow, Heart, Eyes + CHIC number)
- DNA genetic panel (PRA, ICH, NCL, DM, MD variants)
- Cancer lineage & longevity tracking
- Breeding eligibility checker (GRCA + CHIC gates)
- **Health Record modal overhaul** (July 6, 2026):
- [x] Per-record-type field sets (OFA / vaccination / exam / surgery / medication / other)
- [x] Result options scoped to the selected test; blank default (no fabricated clearances)
- [x] Added Thyroid & Patella OFA tests; expiry only shown for recurring tests (CAER, advanced cardiac)
- [x] Date & 24-month age validation on OFA hip/elbow
- [x] Unified clinician field (`performed_by`); deprecated `vet_name`
- [x] DNA removed as a health `test_type` (owned solely by Genetics module)
- [x] Delete action on the health records list
- [x] Document upload (PDF/image) via `POST /api/health/upload`
2026-03-12 07:35:15 -05:00
- **v0.6.1** (March 10, 2026) - COI Direct-Relation Fix
- Fixed `calculateCOI` to correctly compute coefficient for parent×offspring pairings (~25%)
- Removed blanket sire exclusion in ancestor mapping logic
- **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
2026-03-12 07:35:15 -05:00
- `server/routes/settings.js` rewrite: double-encoded base64 fixed
2026-03-12 07:35:15 -05:00
- **v0.5.1** (March 9, 2026) - Projected Whelping Calendar
- Indigo whelp window cells (days 5865) on month grid
- `Baby` icon + "[Name] due" label in whelp day cells
2026-03-12 07:35:15 -05:00
- Live whelp preview in Cycle Detail modal
2026-03-12 07:35:15 -05:00
- **v0.5.0** (March 9, 2026) - Breeding Tools
- Trial Pairing Simulator: COI calculator, risk badge, common ancestors
2026-03-12 07:35:15 -05:00
- Heat Cycle Calendar: month grid, phase color coding, suggestions
---
## 📋 Future Roadmap
### ✅ Phase 5: Advanced Features (IN PROGRESS)
- [x] Reverse pedigree (descendants view)
- [ ] PDF pedigree generation
- [ ] Export to standard formats (CSV, JSON)
- [ ] Print-friendly layouts
- [ ] Multi-generation COI analysis
### 📅 Phase 6: Polish & Optimization
- [x] **User Experience**: Toasts, confirmation dialogs, load-error banners with retry (v0.8.1)
- [ ] **User Experience**: Undo functionality
- [ ] **Performance**: Image optimization, lazy loading, API caching, pedigree recursive-CTE query (known N+1 on deep trees)
- [x] **Mobile**: Responsive layouts across all pages at phone width (v0.8.1)
- [ ] **Mobile**: Mobile photo capture
- [x] **Documentation**: API reference kept current (API.md)
- [ ] **Security**: Authentication/rate limiting if the app is ever exposed beyond the LAN (deps intentionally removed in v0.8.1)
2026-03-12 07:35:15 -05:00
---
2026-03-12 07:35:15 -05:00
## ✅ Completed Milestones
2026-03-12 07:35:15 -05:00
### Phase 1: Foundation
- [x] Docker multi-stage build & SQLite database
- [x] Express.js API server & React 18 frontend
- [x] Parents relationship table for sire/dam tracking
### Phase 2: Core Functionality
- [x] Dog Management (Full CRUD, photo uploads)
- [x] Modern dark theme with glass morphism
- [x] Branded navigation with custom logo
### Phase 3: Breeding Tools
- [x] Interactive pedigree tree visualization (React-D3-Tree)
- [x] Litter Management & linking puppies
- [x] Trial Pairing Simulator & Heat Cycle Calendar
- [x] Projected Whelping identifiers
### Phase 4a: Champion & Settings
- [x] Champion bloodline tracking and badges
- [x] Universal Kennel Settings system
---
## 🏃 Testing & Quality Assurance
- [x] Database schema initialization guards (verified against a virgin database, v0.8.1)
2026-03-12 07:35:15 -05:00
- [x] Pedigree tree rendering & zoom/pan
- [x] Parent relationship creation logic (+ sex/existence validation, v0.8.1)
2026-03-12 07:35:15 -05:00
- [x] Static asset serving (prod/dev)
- [x] Heat cycle CRUD on fresh DB (v0.8.1)
- [x] Health records CRUD + document upload (v0.8.1)
2026-03-12 07:35:15 -05:00
- [ ] Champion toggle load/save trip
- [ ] Boot against a copy of the production DB after schema changes (pre-deploy check)
2026-03-12 07:35:15 -05:00
---
## How to Contribute
1. Pick a feature from "Next Up" above
2. Create a feature branch off `main`: `feat/feature-name`
2026-03-12 07:35:15 -05:00
3. Implement with tests and update this roadmap
4. Submit PR for review
---
*Last Updated: July 6, 2026*