Pet store sales associate - daily feeding amount and bag-size comparison tool - interpolates grams per day straight off the bag's feeding guide, computes days-per-bag and monthly cost, and red-flags any bag that cannot be finished inside its post-opening freshness window
Build a single-file HTML tool for pet store sales associates (no
dependencies, opens by double-click) that answers the counter's
daily question: "How long will this bag last my cat or dog, and is
the big bag worth it?"
Features:
1. Pet profiles (multiple allowed)
Name, species (cat/dog), weight in kg, life stage (young /
adult / senior), activity level (low / medium / high - display
annotation only, not used in the math)
2. Feeding-guide entry
The user copies the weight-versus-daily-grams table off the
chosen bag's feeding guide (at least two rows: weight kg,
grams per day; multi-row paste supported in one go).
The tool linearly interpolates each pet's daily grams.
Hard discipline: no brand feeding data is ever preset -
calorie density differs across formulas, the bag is the only
reliable source, and the tool must never show a "default"
3. Side-by-side bag comparison
Two sizes entered (e.g. 1.5 kg and 7 kg): price, and days of
post-opening freshness (user-entered; the UI prompts the
associate to advise per store policy).
Output table, one column per size:
- grams per day per pet, all-pets combined total
- days per bag, kg consumed per month
- Freshness check: days-to-finish > freshness days -> the
offending row turns red, annotated "opened X days to finish,
exceeds Y-day freshness window - recommend the small bag"
- price per kg and monthly cost
- multi-pet totals merged
4. One-sentence verdict
Which size, and why, quoting the numbers above - e.g. "the two
sizes differ by 30, but the 7 kg bag takes 85 days against a
60-day freshness window - take 1.5 kg x 2; that is 8 more per
month and no oxidizing stock."
UI requirements:
- Usable at phone width (the associate hands their phone to the
customer)
- All numeric inputs accept decimals
- Fixed helper text beside the freshness field: varies by
formulation - follow the packaging or store policy
Explicitly not built:
- No feeding database, no brands, no preset prices - everything
is entered fresh
- No network, no storage upload, no external dependencies of any
kind
Why it is written this way
The heart of this tool is the big-bag trap. On price per kilogram the 7 kg bag beats the 1.5 kg bag essentially always, so "the big one saves money" is the default counter advice. But opened kibble meets oxygen and humidity, fats oxidize, palatability falls, and the freshness window is a hard constraint - one 4 kg adult cat can take months to finish 7 kg, and the per-kilo savings rot right back out of it. Holding three quantities in your head at once (unit price, days-to-finish, freshness) is exactly what mental math cannot do, and whatever cannot be computed falls to the intuition that "bigger is cheaper". The tool puts all three in one table; the red row is the answer.
"No feeding data is ever preset" is the discipline the whole design hangs on. Brands and formulas differ wildly in calorie density; any built-in "cats eat 70 g a day" default produces a confident wrong answer for one specific bag - and confidence is what makes it dangerous. Forcing the guide to be copied from the bag means every number in the output traces to the packaging, and when the customer challenges it the associate simply points at the bag. This is also why multi-row paste matters: bag guides list four or five weight steps, and if copying them is tedious, people will copy one row and quietly kill the interpolation.
The one-sentence verdict must quote the table's numbers because of how the counter actually works: the associate reads the verdict while the customer reads the table - when the digits match, trust happens; when they do not, the tool becomes the new dispute. "8 more per month" said to the digit is what the customer repeats at home to the family; "the big bag isn't worth it" is not.
Freshness days stay user-entered rather than built in because formulations (baked, extruded, fresh-type) genuinely differ, and a preset number is a preset error. The helper text hands the variable back to the store; the tool only owns the arithmetic.
Variables
| Variable | Description |
|---|---|
| Freshness policy | The store's advised after-opening window (finish within N days), set per formulation sold - associates use it to fill the freshness field, and one store-wide number keeps two associates from computing two verdicts |
| Featured size pairs | The store's two staple sizes (e.g. 1.5 kg vs 7 kg) can be pre-filled as default rows to cut entry time; prices still get corrected on the spot |