Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/apursley2012/rescue-retriever/llms.txt

Use this file to discover all available pages before exploring further.

Rescue Retriever operates on two core data types — Animal records sourced from the Austin Animal Center shelter dataset, and RescueProfile objects that define scoring criteria for each program. Both types are compiled into static JavaScript modules at build time and loaded into browser memory when the application starts.

Animal Record

Every entry in data/animals.js is a plain object conforming to this shape. The dataset contains only dogs — animalType is always "Dog" for every record.
animalId
string
required
Unique shelter identifier assigned by the Austin Animal Center, e.g. "A706953". Used as the stable key for React rendering and as the URL parameter in /candidates/:id routes.
name
string
The name recorded at intake. May be an empty string for animals that arrived unnamed. Not normalized or deduplicated — multiple records may share the same name (e.g. "Daisy", "Mia").
animalType
string
Species classification. Always "Dog" for every record in this dataset — the Austin Animal Center dataset has been pre-filtered to dogs only before inclusion in Rescue Retriever.
breed
string
Shelter staff’s breed assessment based on visual evaluation at intake. May be a single breed ("Labrador Retriever Mix"), a cross ("German Shepherd/Doberman Pinsch"), or a mix designation ("Pit Bull Mix"). This field is the primary input to breed matching logic.
color
string
Recorded coat color, e.g. "Yellow", "Brown/White", "Black/Tan". Used for display only; not involved in scoring.
sex
string
Sex and reproductive status combined in a single string. The four values present in this dataset are:
  • "Intact Male"
  • "Intact Female"
  • "Neutered Male"
  • "Spayed Female"
Sex matching in the scoring algorithm uses strict equality — animal.sex === profile.sex.
ageWeeks
number
Estimated age in fractional weeks stored as a floating-point number, e.g. 30.35. All scoring comparisons and display values round this to the nearest whole number using Math.round(). See Age Handling below.
location
string
Shelter or service-area location name, e.g. "Thorndale, Texas, US". Used in the Analytics location chart and Candidate Detail view. Multiple records may share the same location string.
latitude
number
Approximate geographic coordinates for the intake location, e.g. 30.2672. Used in geographic visualizations. Values are rounded to four decimal places in CSV exports.
longitude
number
Approximate geographic coordinates for the intake location, e.g. -97.7431. Used in geographic visualizations. Values are rounded to four decimal places in CSV exports.

Example Animal Record

{
  "animalId": "A706953",
  "name": "Stella",
  "animalType": "Dog",
  "breed": "Labrador Retriever Mix",
  "color": "Yellow",
  "sex": "Intact Female",
  "ageWeeks": 30.35,
  "location": "Thorndale, Texas, US",
  "latitude": 30.2672,
  "longitude": -97.7431
}

RescueProfile

Each rescue program is represented as a RescueProfile object in data/rescueProfiles.js. There are exactly three profiles: "water", "mountain", and "disaster". These objects drive both the scoring algorithm and the program cards displayed on the Rescue Profiles page.
id
string
required
Short identifier used as the program key throughout the application. One of "water", "mountain", or "disaster".
name
string
Full human-readable program name, e.g. "Water Rescue" or "Mountain or Wilderness Rescue".
shortName
string
Abbreviated name used in UI badges and score breakdown labels, e.g. "Water", "Mountain", "Disaster".
breeds
string[]
List of qualifying breed strings. Each string is compared against animal.breed using normalized substring matching — see Breed Matching below. A match on any single breed in the list earns the full breed score.
sex
string
The required sex value for a sex match. Compared using strict string equality against animal.sex. Currently "Intact Female" for the Water program and "Intact Male" for Mountain and Disaster.
minAgeWeeks
number
Minimum qualifying age in whole weeks (inclusive). Compared against Math.round(animal.ageWeeks).
maxAgeWeeks
number
Maximum qualifying age in whole weeks (inclusive). Compared against Math.round(animal.ageWeeks).
capabilities
string[]
List of operational capabilities for this program, displayed on the Rescue Profiles page. Not used in scoring.
environment
string
Description of the operating environment, e.g. "Rivers, lakes, coastal waters, flood zones". Displayed on the Rescue Profiles page.
trainingDuration
string
Typical training timeline string, e.g. "12–18 months". Displayed on the Rescue Profiles page.
successRate
string
Program training success rate as a percentage string, e.g. "87%". Displayed on the Rescue Profiles page.
color
string
Primary accent color for this program as a hex string, e.g. "#DF5A1A". UI display only — not used in scoring.
bgColor
string
Light background color used in program cards and badges, e.g. "#FFF1E8". UI display only.
textColor
string
Text color used against the bgColor background, e.g. "#B7430E". UI display only.
borderColor
string
Border color for program card components, e.g. "#F6A47C". UI display only.
icon
string
Icon name from the Lucide icon set rendered on program cards, e.g. "Waves", "Mountain", "Flame". UI display only.

Example RescueProfile

{
  "id": "water",
  "name": "Water Rescue",
  "shortName": "Water",
  "breeds": ["Labrador Retriever Mix", "Chesapeake Bay Retriever", "Newfoundland"],
  "sex": "Intact Female",
  "minAgeWeeks": 26,
  "maxAgeWeeks": 156,
  "capabilities": [
    "Open-water victim search",
    "Dive team coordination",
    "Shoreline victim detection",
    "Flood rescue support",
    "Maritime search operations"
  ],
  "environment": "Rivers, lakes, coastal waters, flood zones",
  "trainingDuration": "12–18 months",
  "successRate": "87%"
}

All Three Program Criteria at a Glance

ProgramQualifying BreedsRequired SexAge Range (weeks)
Water RescueLabrador Retriever Mix, Chesapeake Bay Retriever, NewfoundlandIntact Female26–156
Mountain / WildernessGerman Shepherd, Alaskan Malamute, Old English Sheepdog, Siberian Husky, RottweilerIntact Male26–156
Disaster / Individual TrackingDoberman Pinscher, German Shepherd, Golden Retriever, Bloodhound, RottweilerIntact Male20–300

Age Handling

The ageWeeks field is stored in the dataset as a floating-point number (e.g. 30.35, 110.11). The application applies Math.round() to this value everywhere age is used — scoring comparisons, age range filters, and all display formatting. This ensures that the age shown to a user is identical to the age used in eligibility checks.
const age = Math.round(animal.ageWeeks); // e.g. Math.round(30.35) → 30
const ageMatch = age >= profile.minAgeWeeks && age <= profile.maxAgeWeeks;
An animal with ageWeeks: 25.6 rounds to 26 and falls within the Water and Mountain programs’ minimum of 26 weeks. An animal with ageWeeks: 25.4 rounds to 25 and does not.

Breed Matching

Breed matching does not require an exact string match. Both the animal’s breed and each profile breed string are first normalized, then a bidirectional substring test is applied. Normalization steps (applied to both sides):
  1. Convert to lowercase
  2. Strip the word "mix" or "mixed" (/\bmixed?\b/g)
  3. Strip the word "dog" (/\bdog\b/g)
  4. Replace all non-alphanumeric characters with a space (/[^a-z0-9]+/g)
  5. Collapse multiple spaces to one (/\s+/g)
  6. Trim leading and trailing whitespace
Substring test: After normalization, a breed match succeeds if either string contains the other:
return normalized.includes(n) || n.includes(normalized);
This means a profile breed of "German Shepherd" will match animal breeds like "German Shepherd Mix", "German Shepherd/Labrador Retriever", and "German Shepherd/Doberman Pinsch" — all of which normalize to strings containing "german shepherd".
Breed matching is deliberately broad to account for the inconsistent notation used in shelter intake records. A dog recorded as "Labrador Retriever/German Shepherd" will match both the Water Rescue profile (via "Labrador Retriever Mix") and the Disaster profile (via "German Shepherd"), earning breed match points against both.

Scoring Algorithm

How breed, sex, and age criteria combine into a 0–100 score

Dataset

Source dataset provenance and field notes

Build docs developers (and LLMs) love