BREEDR - Dog Breeding Genealogy Management System
A reactive, interactive dog breeding genealogy mapping system for professional kennel management.
✅ Current Features
Core Functionality
- ✅ Dog Registry - Complete CRUD operations with comprehensive profiles
- ✅ Photo Management - Multiple photos per dog with upload/delete capabilities
- ✅ Parent Relationships - Clean database design using
parentstable (no sire/dam columns in dogs table) - ✅ Litter Management - Track breeding records, link puppies to litters
- ✅ Interactive Pedigree Visualization - Multi-generational family trees with zoom/pan
- ✅ Modern UI - Sleek, dark-themed interface with compact info cards
- ✅ Search & Filter - Find dogs by name, breed, sex, and more
- ✅ Branded Navigation - Custom logo (br-logo.png) with gold-to-rusty-red gradient title
- ✅ Trial Pairing Simulator - COI calculator with common ancestors table and risk badge
- ✅ Heat Cycle Calendar - Month grid calendar with cycle windows, breeding date suggestions, and projected whelping identifiers
- ✅ Champion Bloodline Tracking - Mark dogs as titled champions; offspring display a Champion Bloodline badge
- ✅ Kennel Settings - Configurable kennel name, tagline, address, AKC ID, breed, owner info
- ✅ UI Theme - CSS custom property theming with
--champion-goldand dark-mode variables
Database Architecture
- ✅ Clean Schema - No migrations needed; fresh installs create correct structure; existing DBs auto-migrate via safe
ALTER TABLEguards - ✅ Normalized Design -
parentstable for relationships (sire/dam) - ✅ Litter Linking - Dogs linked to litters via
litter_id - ✅ Health Records - Medical history and genetic testing
- ✅ Heat Cycles - Breeding cycle tracking
- ✅ Genetic Traits - Inherited trait mapping
- ✅ Settings Table - Single-row kennel configuration with all contact/identity fields
Recently Added (March 9, 2026 — v0.6.0)
- ✅ Champion Flag —
is_champion INTEGER DEFAULT 0ondogstable; safeALTER TABLEmigration guard for existing DBs - ✅ Champion Toggle in DogForm — amber-gold highlighted checkbox row with
Awardicon; marks dog as titled champion - ✅ Champion ✪ in Parent Dropdowns — sire/dam selects append
✪to champion names for at-a-glance visibility - ✅ Champion Bloodline Badge — offspring of champion parents display a badge on dog cards and detail pages
- ✅ Kennel Settings API —
GET/PUT /api/settingswith single-row column schema and ALLOWED_KEYS whitelist - ✅ Settings Table Migration — all kennel fields added with safe
ALTER TABLEguards on existing DBs; default seed row auto-created - ✅ SettingsProvider / useSettings — React context hook renamed
useSettings.jsx(was.js; contained JSX causing Vite build failure) - ✅
server/index.jsFix —initDatabase()called with no args to match updateddb/init.js; removed duplicate/api/healthroute - ✅
settings.jsRoute Fix — rewrote from double-encoded base64 + old key/value schema to correct single-row column schema
Previously Added (March 9, 2026 — v0.5.1)
- ✅ Projected Whelp Window on Calendar - Indigo/purple day cells (days 58–65 from breeding date) visible directly on the month grid
- ✅ Expected Whelp Day Marker - Indigo dot on the exact expected whelp day (day 63) alongside the green breeding dot
- ✅ "[Name] due" Cell Label - Baby 🍼 icon + dog name label inside the whelp day cell
- ✅ Active Cycle Card — Whelp Range - "Whelp est. [date]" row with earliest–latest range shown on each active cycle card
- ✅ Jump-to-Whelp-Month Button - One-click navigation to the whelp month when it differs from current view
- ✅ Live Whelp Preview in Modal - Instant client-side earliest/expected/latest preview as soon as a breeding date is entered (no save required)
- ✅ Whelping Banner - Full-width indigo banner listing dogs with projected whelps when no active heat cycles are visible
- ✅ Legend Entry - "Projected Whelp" added to calendar legend
- ✅ Updated Page Subtitle - Now reads: "Track heat cycles, optimal breeding windows, and projected whelping dates"
Previously Added (March 9, 2026 — v0.5.0)
- ✅ Heat Cycle Calendar - Full month grid with color-coded cycle windows (Proestrus / Optimal / Late Estrus / Diestrus)
- ✅ Start Cycle Modal - Click any day or the header button to log a new heat cycle for a female
- ✅ Breeding Date Suggestions - Phase windows with date ranges loaded from
GET /api/breeding/heat-cycles/:id/suggestions - ✅ Whelping Estimate - Auto-calculates earliest/expected/latest whelping once a breeding date is logged
- ✅ Trial Pairing Simulator -
/pairingroute with sire/dam dropdowns, COI%, risk badge, and common ancestors table - ✅ Pairing Nav Link -
FlaskConicalicon added to navbar - ✅ New API Endpoints -
GET /api/breeding/heat-cycles,GET /api/breeding/heat-cycles/:id/suggestions
Previously Added (March 9, 2026 — v0.4.x)
- ✅ Brand Logo - Custom
br-logo.pngin navbar replacing generic icon - ✅ Gradient Title - Gold-to-rusty-red gradient on "BREEDR" brand text
- ✅ Static Asset Serving -
/staticdirectory served by Express for branding assets - ✅ Dev Proxy - Vite dev server proxies
/staticto Express backend - ✅ Route Fix -
/staticand/uploadspaths no longer fall through to React catch-all - ✅ Logo Sizing - Fixed brand logo to 1:1 aspect ratio square
Technology Stack
- Frontend: React 18 with modern component design
- Visualization: React-D3-Tree for pedigree charts
- Backend: Node.js/Express API
- Database: SQLite (embedded, zero-config) with clean normalized schema + safe
ALTER TABLEmigration guards - Container: Single Docker image with multi-stage build
- Styling: CSS custom properties with dark theme +
--champion-gold+ gradient branding
Quick Start
Docker Deployment (Recommended)
# Clone repository
git clone https://git.alwisp.com/jason/breedr.git
cd breedr
# Build Docker image
docker build -t breedr:latest .
# Run with docker-compose
docker-compose up -d
Access at: http://localhost:3000
Upgrading an Existing Installation
The database now uses safe ALTER TABLE guards — you do not need to delete your database to upgrade. Just pull and rebuild:
docker-compose down
git pull origin master
docker-compose up -d --build
New columns (is_champion, all settings kennel fields) are added automatically on first boot. Your existing dog data is preserved.
Fresh Install Database Setup
For a fresh install, the database will automatically initialize with the correct schema and seed a default settings row.
Database Schema
Key Design Principles
- No sire/dam columns in
dogstable - Parent relationships stored inparentstable - Normalized structure - Reduces redundancy, improves data integrity
- Litter linking - Dogs reference litters via
litter_idforeign key - Safe migrations -
ALTER TABLE ... ADD COLUMNguards allow zero-downtime upgrades
Core Tables
- dogs - Core dog registry; includes
is_champion,litter_id,photo_urls - parents - Sire/dam relationships (dog_id, parent_id, parent_type)
- litters - Breeding records with sire/dam references
- health_records - Medical and genetic testing
- heat_cycles - Breeding cycle tracking
- traits - Genetic trait mapping
- settings - Single-row kennel configuration (kennel_name, tagline, address, phone, email, website, akc_id, breed, owner_name)
Full schema documentation: DATABASE.md
Environment Variables
NODE_ENV- production/development (default: production)PORT- Server port (default: 3000)DATA_DIR- Data directory for SQLite file (default: /app/data)UPLOAD_PATH- Upload directory (default: /app/uploads)STATIC_PATH- Static assets directory (default: /app/static)
Development
Local Development Setup
# Install dependencies
npm install
# Run development server (frontend + backend)
npm run dev
# Build for production
npm run build
Project Structure
breedr/
├── client/ # React frontend
│ ├── src/
│ │ ├── pages/
│ │ │ ├── BreedingCalendar.jsx # Heat cycle calendar + whelping identifiers
│ │ │ ├── PairingSimulator.jsx # Trial pairing + COI
│ │ │ ├── SettingsPage.jsx # Kennel settings form
│ │ │ ├── Dashboard.jsx
│ │ │ ├── DogList.jsx
│ │ │ ├── DogDetail.jsx
│ │ │ ├── PedigreeView.jsx
│ │ │ └── LitterList.jsx
│ │ ├── components/
│ │ │ └── DogForm.jsx # Champion toggle + parent selects
│ │ ├── hooks/
│ │ │ └── useSettings.jsx # SettingsProvider + useSettings context
│ │ └── App.jsx
│ └── package.json
├── server/ # Node.js backend
│ ├── routes/
│ │ ├── dogs.js # is_champion in all queries
│ │ ├── settings.js # GET/PUT kennel settings (single-row schema)
│ │ ├── breeding.js # Heat cycles, whelping, suggestions
│ │ ├── pedigree.js # COI, trial pairing
│ │ ├── litters.js
│ │ └── health.js
│ ├── db/
│ │ └── init.js # Schema + ALTER TABLE migration guards
│ └── index.js
├── static/ # Branding assets (br-logo.png, etc.)
├── docs/ # Documentation
├── ROADMAP.md
├── DATABASE.md
├── Dockerfile
├── docker-compose.yml
└── README.md
API Endpoints
Dogs
GET/POST /api/dogs- Dog CRUD operationsGET /api/dogs/:id- Get dog with parents (incl. is_champion), offspring, and health summaryPUT /api/dogs/:id- Update dog (incl. is_champion)POST /api/dogs/:id/photos- Upload photos
Settings
GET /api/settings- Get kennel settingsPUT /api/settings- Update kennel settings (partial update supported)
Pedigree & Genetics
GET /api/pedigree/:id- Generate pedigree treePOST /api/pedigree/trial-pairing- COI + common ancestors + risk recommendation
Breeding & Heat Cycles
GET /api/breeding/heat-cycles- All heat cyclesGET /api/breeding/heat-cycles/active- Active cycles with dog infoGET /api/breeding/heat-cycles/dog/:dogId- Cycles for a specific dogGET /api/breeding/heat-cycles/:id/suggestions- Breeding windows + whelping estimatePOST /api/breeding/heat-cycles- Create new heat cyclePUT /api/breeding/heat-cycles/:id- Update cycle (log breeding date, etc.)DELETE /api/breeding/heat-cycles/:id- Delete cycleGET /api/breeding/whelping-calculator- Standalone whelping date calculator
Litters
GET/POST /api/litters- Litter management
Assets
GET /static/*- Branding and static assetsGET /uploads/*- Dog photos
Troubleshooting
Server crashes with SyntaxError: Unexpected end of input on settings.js
The settings route file may have been corrupted (double-encoded base64). Pull the latest code and rebuild.
"no such column: kennel_name" or "no such column: is_champion"
Your database predates the ALTER TABLE migration guards. Pull the latest code and restart — columns are added automatically. No data loss.
"no such column: weight" or "no such column: sire_id"
Your database has a very old schema. Delete and recreate:
cp data/breedr.db data/breedr.db.backup
rm data/breedr.db
docker-compose restart
Logo not appearing in navbar
Ensure br-logo.png is placed in the static/ directory at the project root. The file is served at /static/br-logo.png.
Heat cycles not showing on calendar
Ensure dogs are registered with sex: 'female' before creating heat cycles. The API validates this and will return a 400 error for male dogs.
Whelping window not appearing on calendar
A breeding date must be logged on the cycle for whelp window cells to appear. Use the Cycle Detail modal → "Log Breeding Date" field.
Roadmap
✅ Completed
- Docker containerization
- SQLite database with clean schema + ALTER TABLE migration guards
- Dog management (CRUD) with champion flag
- Photo management
- Interactive pedigree visualization
- Litter management
- Parent-child relationships via parents table
- Modern UI redesign
- Search and filtering
- Custom brand logo + gradient title
- Static asset serving
- Trial Pairing Simulator (COI + common ancestors + risk badge)
- Heat Cycle Calendar (month grid + windows + breeding suggestions + whelping estimate)
- Projected Whelping Calendar Identifier (whelp window cells, due label, active card range, live modal preview, whelping banner)
- Champion Bloodline Tracking (is_champion flag, DogForm toggle, offspring badge)
- Kennel Settings (GET/PUT /api/settings, SettingsProvider, kennel name in navbar)
🔜 In Progress / Up Next
- Health Records System
- Genetic trait tracking
📋 Planned
- PDF pedigree generation
- Advanced search and filters
- Export capabilities
- Progesterone tracking (extended feature)
Full roadmap: ROADMAP.md
Recent Updates
March 9, 2026 - Champion Bloodline, Settings, Build Fixes (v0.6.0)
- Added:
is_championcolumn todogstable with safeALTER TABLEmigration guard - Added: Champion toggle checkbox in DogForm with amber-gold highlight and
Awardicon - Added:
✪suffix on champion sire/dam in parent dropdowns - Added: Champion Bloodline badge on offspring cards/detail pages
- Added:
GET/PUT /api/settingsroute — single-row column schema withALLOWED_KEYSwhitelist - Added: Full kennel settings columns in
settingstable with migration guards - Added:
SettingsProvider/useSettingsReact context for kennel name in navbar - Fixed:
useSettings.js→useSettings.jsx(Vite build failure — JSX in.jsfile) - Fixed:
server/index.js—initDatabase()called with no args; removed duplicate/api/healthroute - Fixed:
server/routes/settings.js— rewrote from double-encoded base64 + old key/value schema - Fixed:
DB_PATHarg removed frominitDatabase()call;DATA_DIRenv var now controls directory
March 9, 2026 - Projected Whelping Calendar Identifier (v0.5.1)
- Added: Indigo whelp window (days 58–65) on calendar grid cells when a breeding date is logged
- Added: Indigo dot marker on exact expected whelp day (day 63)
- Added:
Babyicon + "[Name] due" label inside whelp day cells - Added: "Whelp est. [date]" row with earliest–latest range on active cycle cards
- Added: Jump-to-whelp-month button on active cycle cards
- Added: Live whelp preview in Cycle Detail modal (client-side, instant, no save required)
- Added: Full-width whelping banner when projected whelps exist but no active heat cycles are visible
- Added: "Projected Whelp" legend entry with Baby icon
- Updated: Page subtitle to include projected whelping dates
March 9, 2026 - Heat Cycle Calendar & Trial Pairing Simulator (v0.5.0)
- Added: Full month grid heat cycle calendar with color-coded phase windows
- Added: Start Heat Cycle modal (click any day or header button)
- Added: Cycle Detail modal with breeding window breakdown and inline breeding date logging
- Added: Whelping estimate (earliest/expected/latest) auto-calculated from breeding date
- Added: Trial Pairing Simulator at
/pairingwith COI%, risk badge, common ancestors table - Added:
GET /api/breeding/heat-cyclesandGET /api/breeding/heat-cycles/:id/suggestionsendpoints - Moved: Progesterone tracking to extended roadmap
March 9, 2026 - Branding & Header Improvements (v0.4.1)
- Added: Custom
br-logo.pngbrand logo in navbar - Added: Gold-to-rusty-red gradient on "BREEDR" title text
- Added:
/staticdirectory for branding assets served by Express - Fixed: Vite dev proxy for
/staticroutes - Fixed:
/staticand/uploadspaths no longer fall through to React router - Fixed: Brand logo sized as fixed 1:1 square for proper aspect ratio
Documentation
- DATABASE.md - Complete schema documentation
- ROADMAP.md - Development roadmap and features
- INSTALL.md - Detailed installation instructions
- QUICKSTART.md - Quick setup guide
License
Private use only - All rights reserved
Support
For issues or questions:
- Check documentation in
docs/folder - Review DATABASE.md for schema questions
- Check container logs:
docker logs breedr - Contact the system administrator