N NoBullshit.wiki 中文

BBQ skewer pricing and beverage margin calculator - have a coding agent build a single-file web tool that answers what one skewer really earns and what buy-one-get-one beer actually gives away

Works with:Claude / GPT-4 classCategories:BBQ RestaurantLevel:Advanced Updated

You are a coding agent. Build a single-file web tool for a BBQ shop owner (HTML, CSS, and JS all inline in one file; no external dependencies, no backend, no network requests), opened by double-click and usable in a phone browser. Purpose: compute the true margin per skewer, and what a beverage promotion actually gives away.

Three sections:

1. Per-item margin
- I enter skewer items manually: name, category (meat / vegetable / beverages), raw price per unit weight, yield (raw weight -> weight of skewered, ready-to-grill meat), spec net weight per skewer, per-skewer cost of stick + dipping sauce + glaze, per-skewer energy and labor allocation (optional, defaults to 0), selling price
- Auto-computed: net meat cost per skewer = raw price per unit weight / yield / units-per-weight x spec net weight; margin and margin rate per skewer; grouped meat / vegetable / beverage, sorted by margin rate within each group

2. Per-table structure
- I enter a typical table's makeup: how many bunches of meat skewers (skewers per bunch), bunches of vegetable skewers, draft or bottled drinks
- Auto-computed: total margin for the table, and the meat / vegetable / beverage split - so I can see whether "skewers pull them in, drinks make the money" holds in my shop

3. Promotion simulator
- I pick a promo type (beer buy-one-get-one / second bunch of skewers half price / spend-threshold free skewers) and fill in the parameters
- Auto-computed: the per-table margin change after the promo; to earn that change back, how many extra bunches each table must order, or how many extra tables a night - translating "promotion" into "how much more we must sell"

Hard requirements:
- Zero numbers preset in the tool; every field empty for me to fill; no built-in "industry reference prices" or sample data - an empty table is the correct state
- All math live: change one input and results refresh without clicking a button
- Data in localStorage, with JSON export / import, so closing the tab never loses the books
- Deliver a single .html file with three lines of usage notes at the top

You must not:
- Add user accounts, cloud sync, or a charting library - none of that survives in a single file
- Include sample data to fake "works out of the box"
- Show any "suggested price" anywhere on the page - the tool computes; it does not decide

Why it is written this way

The net-meat-cost formula (raw price / yield / units per weight x spec grams) is the foundation of the whole tool, so it is written into the requirements as fixed, not left to the agent's judgment. The most common owner error in this format is dividing raw meat price by skewer count directly - skipping trim and marinade water loss (a single yield step is ten-plus percent of cost) and the per-skewer nickels of sticks, sauce, and glaze. With the formula welded in, the owner only enters what they already know - purchase price, yield, grams - and the tool carries the arithmetic.

The per-table section exists because per-item margin lies: an 80% margin on vegetable skewers looks glorious until you remember a table orders one bunch of them, while 55% margin lamb skewers start at three bunches a table. Laid out as a per-table margin split, the industry cliche "skewers are the traffic, drinks are the profit" becomes checkable in this specific shop - and where it does not hold, the draft-beer tower stops being an obvious investment. That switch from item-think to table-think is closer to the decisions an owner actually makes than any single-item number.

The promotion simulator's output is defined as "how much more must sell to pay it back," not "how big is the discount," because the real cost of a promotion is the recovery volume: the margin given away by beer BOGO, translated into "two extra bunches per table" - a quantity the owner can judge on the spot. If the floor can push that, run it; if not, this is the wrong mechanic. Discount depth is the most attractive number on a promo flyer and the least used in the decision.

Zero preset numbers and empty-table delivery deliberately fight the "works out of the box" product instinct. Preload any industry reference price and the owner will quietly treat someone else's numbers as their own books - at which point the tool has done harm. Its entire value is forcing the shop's real numbers into existence. localStorage plus JSON export is the pragmatic backstop: the owner fills this in on a phone between tables, and if closing the tab or switching phones loses the books, nobody opens the tool again in week two.

Variables

Variable Notes
Yield Raw-to-skewered ratio - when unsure, back it out from last month's total raw weight divided by total skewered weight
Energy & labor allocation Leave at 0 for a rough pass and read results as a margin floor; allocate real monthly costs when you want precision
Skewers per bunch The shop's "one bunch" convention (5 or 10 is common) - used on both the table page and the promo page

pricingmargin mathsingle-file tool