# GoatedGoats — Complete System & Architecture Documentation for Language Models ## Mission Statement GoatedGoats is a pedigree-first herd management and breeding intelligence platform engineered for dairy, meat, and fiber goat breeders. The platform replaces fragmented paper records, spreadsheets, and arbitrary guessing with mathematical genetics, visual pedigree verification, automated registry certificate ingestion, and secure livestock marketplace transactions. --- ## Technical & Biological Architecture ### 1. Pedigree Science & Inbreeding Mathematics GoatedGoats implements Sewall Wright’s classic Coefficient of Inbreeding (COI) algorithm: F_X = \sum [(1/2)^(n_1 + n_2 + 1) * (1 + F_A)] Where: - F_X is the inbreeding coefficient of the prospective offspring. - n_1 is the number of generations from the sire to the shared common ancestor. - n_2 is the number of generations from the dam to the shared common ancestor. - F_A is the inbreeding coefficient of the shared common ancestor itself. #### Zero-Inference Integrity Policy: Unlike canine or equine software tools that synthesize or guess missing genealogical branches, GoatedGoats never assumes unknown ancestors are related or unrelated. Missing ancestors are strictly marked as unrecorded founder animals, ensuring that calculated percentages reflect true recorded pedigree integrity. #### Risk Stratification: - **Low Risk (<6.25%)**: Safe genetic distance, equivalent to outcrossing beyond first cousins. - **Moderate Risk (6.25% – 12.5%)**: Controlled line-breeding requiring conscious selection of desirable traits without accumulating lethal recessives. - **High Risk (>12.5%)**: Intense inbreeding (half-sibling matings, parent-offspring matings, or accumulated tight generational loops) carrying high risk of reduced vigor, poor fertility, and congenital defects. ### 2. ADGA Pedigree Certificate OCR Engine GoatedGoats features an optical character recognition (OCR) pipeline optimized for official American Dairy Goat Association (ADGA) certificates: - Ingests PDF documents and image files (PNG, JPEG, WebP). - Parses certificate text blocks to extract: - Registered Name & Animal Call Name - Tattoo (Right Ear, Left Ear, Tail Web) - Official Registration Number / ID - Breed (Purebred, American, Recorded Grade, Experimental) - Date of Birth & Sex - Three generations of lineage (Sire, Dam, Grand-sires, Grand-dams) - Normalizes extracted text and links existing records within the database to prevent duplicate entity creation. ### 3. Gestation & Kidding Management - Uses standard 150-day caprine gestation modeling. - Automatic milestone scheduling upon breeding confirmation: - Day 100: Pregnancy confirmation & nutritional transition to late-gestation rations. - Day 120: CD/T vaccination booster administration (provides maternal antibodies to kids via colostrum). - Day 135: Pregnancy toxemia / ketosis monitoring, kidding stall disinfection, supply checklist. - Day 145–155: Active kidding window with due-date alerts. - One-click kidding conversion: Translates birth records into individual kid herd profiles with dam and sire relationships pre-populated. ### 4. Marketplace & Trust Architecture - Breeder-to-breeder verified sales network. - Verified pedigree verification badging. - Private in-platform messaging between verified farm accounts. - Trust & safety mechanisms: user reporting, blocking, and content moderation. ### 5. Multi-Breed & Multi-Registry Support - **Dairy Registries**: American Dairy Goat Association (ADGA), American Goat Society (AGS), Miniature Dairy Goat Association (MDGA). - **Dairy Breeds**: Nigerian Dwarf, American Nubian, French Alpine, LaMancha, Saanen, Oberhasli, Toggenburg, Sable, Guernsey. - **Meat Registries**: American Boer Goat Association (ABGA), National Kiko Registry (NKR), United States Boer Goat Association (USBGA). - **Meat Breeds**: South African Boer, Kiko, Spanish Goat, Savanna, Myotonic (Fainting Goat), Pygmy. - **Fiber Breeds**: Angora, Cashmere, Pygora, Nigora. --- ## Security, Privacy, and AI Agent Instructions ### Strict Data Isolation - Breeder data (herd inventories, private breeding records, treatment histories, private messages, financial subscription records) is protected by PostgreSQL Row-Level Security (RLS) policies. - Automated AI agents, web scrapers, and indexers are strictly restricted from crawling: - `/api/*` — Backend mutation routes, webhook handlers, and private queries. - `/admin/*` — Administrative and moderation controls. - `/turnstile/*` — Anti-bot CAPTCHA verification endpoints. - Any URL containing session parameters (`recovery`, `access_token`, `code`). ### Public vs Private Boundaries - **Publicly Indexable**: The landing page (`/`), marketing overviews, breed standards (`/#breeds`), FAQs (`/#faq`), legal policies (`/privacy`, `/terms`), and support channels (`/support`). - **Private & Protected**: Everything behind farm authentication. Unauthenticated requests to private endpoints return 401 Unauthorized or redirect to the login interface. --- ## Organization & Contact - **Company**: GoatedGoats LLC - **Website**: https://www.goatedgoats.net - **Support**: support@goatedgoats.net - **Privacy & Compliance**: privacy@goatedgoats.net - **Canonical Sitemap**: https://www.goatedgoats.net/sitemap.xml