Bubble tea price-change breakeven tool (single-file) - how much volume a price increase can afford to lose, what cheaper toppings really save; it computes the boundary, never the forecast
You are a coding agent building a tool for an
independent bubble tea shop. Build a single-file
HTML tool (HTML/CSS/JS all inline, no external
dependencies, no network requests, opens by
double-click) for per-drink price-change breakeven
analysis.
Core principle (pinned at the top of the UI): this
tool does not forecast volume. It computes the
no-loss boundary; judgment inside the boundary
belongs to the owner.
Input section:
- Cost build for the drink: tea base / toppings
(multiple lines) / packaging / labor allocation
(per-cup estimate) - name plus amount each,
auto-summed into per-cup cost
- Current price, average daily volume (owner's
own figure - used to size the impact, not as
a forecasting base)
- Platform commission: delivery share of this
drink's sales plus the commission rate -
dine-in and delivery computed separately
- Scenarios (any number, side by side): change
price / swap topping (old cost to new cost) /
change cup size (cost and price move together),
the three types freely combined
Output section:
- One boundary card per scenario:
- Increase: volume tolerance ceiling - the
maximum percent drop that still clears
today's margin
- Decrease: volume recovery floor - the
minimum percent rise that pays for the cut
- Topping swap: saved per cup and per month
at current daily volume, plus one fixed
line: "the effect of taste change on volume
is not judged by this tool"
- Side-by-side comparison table: scenario /
per-cup margin / boundary value / monthly
margin impact (static conversion at current
daily volume, labeled "holding volume
constant")
- Every figure carries its formula one click
away - the owner must be able to check how
you computed it
Constraints:
- No volume forecasting, no "suggested pricing" -
any feature with the words "expected volume"
in it does not get built
- Competitor prices get a free-text notes field
and enter no calculation - the shop across
the street is not a term in your cost function
- Data in browser localStorage, no accounts, no
cloud; "export comparison" outputs plain text
- Amounts displayed to two decimals with a fixed,
stated rounding rule - no 9.999-style displays
Why it is written this way
Refusing to forecast volume is the tool's entire license to exist. The standard death of pricing tools is a built-in elasticity assumption that outputs "cut one unit, expect volume up twenty percent" - a number with no basis whatsoever that the owner making the decision will treat as grounded. Clamping the tool to boundary arithmetic, with every figure checkable by opening its formula, is what makes it trustworthy; the elasticity judgment goes back to the owner, who watches the actual foot traffic and is closer to the truth than any model.
Topping swaps rank beside price changes because a real independent-shop "price change" is often not the price sign at all - it is switching pearls to a supplier two mao cheaper, or shrinking the cup a fifth. Those moves save visible money and gamble invisible taste; the tool drives the visible side to the last digit and says plainly it does not touch the invisible side - which is exactly, and only, what it can honestly offer.
Competitor price stays in the notes field and out of the math to keep the tool from mutating into a price-matching machine. The shop across the street at nine units acts on the owner's psychology, not on this drink's cost structure; let it into the calculation and the tool eventually emits "matching strategies" - a decision, not arithmetic, and once an arithmetic tool starts making decisions, the owner stops making his own.
Pinning "boundary, not forecast" at the top of the UI recalibrates expectations on every single use: the person opening the tool wants an answer, the tool delivers a boundary, and that sentence has to be in front of their eyes each time - not buried in a manual nobody reopens.
Variables
| Variable | Notes |
|---|---|
| Average daily volume | The owner's current figure - used only to size the monthly impact statically; the tool never extrapolates a post-change volume from it |
| Platform commission rate | From the merchant backend contract - with commission in the cost build, dine-in and delivery earn different margins at the same price, so the boundary cards must show them separately |