N NoBullshit.wiki 中文

Vegetable stall buying - have a coding agent build the wholesale-market price-comparison tool: three vendor quotes, moves versus yesterday, suggested quantities, one screen at 4 a.m.

Works with:Claude / GPT-4 classCategories:Vegetable StallLevel:Advanced Updated

Build me a single-file HTML price-comparison tool for a vegetable stall buyer to use inside
the wholesale market at 4 a.m., on a phone. The scene first: pre-dawn, crowds, bad lighting,
gloved hands. I'm trying to hold quotes for a dozen items across two or three vendor stalls
in my head while inspecting produce - and losing them all by the time I get home. This tool
exists to enter, compare and decide on the spot.

Entry screen (speed outranks every other design goal):
- My regular items preset as a list (editable). In the market I tap an item and enter quotes
  from 2-3 vendor stalls (per pound or per case - the unit is preset on the item)
- One row per vendor: vendor name as a dropdown (stalls I've used before auto-join the
  options) + price; finishing one row jumps to the next
- The moment a second quote is in, a comparison bar appears at the bottom: lowest price
  flagged green, percentage move versus yesterday's average for that item (up in red, down
  in green; anything past the threshold in my settings goes big and bold - at 4 a.m. a
  subtle hint is invisible)

Suggested quantity (logic fixed in code, one plain sentence of explanation on screen):
- Suggested = yesterday's sales for that item x days-to-cover x minus what's still on
  the stall
- Days-to-cover defaults by family (leafy greens 1, fruiting vegetables 2, roots 3),
  editable in settings
- Yesterday's sales I enter once the night before (one number per item). Missing numbers
  show a dash - the tool never guesses

Wrap-up area:
- A "build buying list" button: grouped by vendor - "get this and that from stall A, this
  from stall B". The whole point of comparing is splitting the buy across vendors, so the
  list arrives pre-split
- Plain text, one-tap copy, paste into a message to myself or family; glance at it on the
  ride back and the trip is checked off

Hard requirements:
- Single file, no build step, no CDN of any kind - market connectivity is terrible, all
  computation and data stay on the device
- Data in localStorage, saved as you type - in the market you get interrupted constantly;
  a refresh must never lose what's entered
- One-handed operation: every button big enough to hit in gloves; numeric keypad first,
  avoid the letter keyboard wherever possible
- No accounts, no cloud sync, no pretty charts - any feature useless at 4 a.m. does not
  deserve a line of code

Why it is written this way

The tool's founding argument sits in the first paragraph: the real constraint at the wholesale market isn't arithmetic, it's memory. A dozen items times three vendors, in a cold noisy hall with gloved thumbs - those numbers survive minutes, not hours. Every design decision is derived from that one fact: why the comparison bar must render on the spot rather than back at the stall (where the quotes are gone), why vendors are a self-learning dropdown (typing full names is too slow), why price moves go big and bold (gloves, dim light, tired eyes).

The suggested-quantity formula is deliberately three numbers the buyer already knows: yesterday's sales x days-to-cover x minus what's left. No entry burden beyond a single number per item per night. Days-to-cover defaults follow the ordinary rhythm of vegetable buying - greens daily, roots every few days - but live in settings rather than code, because sell-through speed varies stall to stall. And "no yesterday figure, show a dash, never guess" is a deliberate restraint: the moment a tool starts inventing numbers, the buyer stops trusting all of them.

The vendor-split buying list is where comparison actually pays off. Most comparison tools stop at "who's cheapest", but the physical act of buying is "go to which stall for what" - spinach cheapest at stall A, potatoes at stall B, and the list must arrive grouped that way so it pastes straight into a message as an instruction. Skip that step and every comparison made at 4 a.m. was for nothing.

Variables

Variable Notes
Days-to-cover defaults Start at greens 1 / fruiting 2 / roots 3; recalibrate after two weeks by how often you ran out versus overstocked
Price-move threshold How big a swing versus yesterday before it goes bold; set it too low and everything is highlighted, which highlights nothing
Regular item list Ten minutes to set up once; after that each morning is just tap-and-enter

wholesale buyingprice comparisonbuying tool