Guesthouse equipment technician: cumulative repair-cost ledger tool - a single-file offline web page that logs every repair per device and computes repair spend as a share of replacement cost plus same-fault repeats per year, flagging facts past thresholds without ever issuing a replace verdict - that call stays human, and no replacement prices ship inside
Build me a directly usable single-file web tool (HTML
with inline CSS/JS, opens on double-click, runs
offline, no dependencies, no accounts) for a
guesthouse equipment repair-cost ledger.
Input, two blocks:
1. Equipment ledger
- Fields: name / type (water heating, AC, locks,
laundry, pumps, other) / location or rooms
covered / purchase date / replacement reference
price (the user enters today's budget price for
an equivalent new unit; the tool ships with no
prices)
- Add, edit, delete; deleting a device asks for
confirmation and shows how many repair records
hang under it
2. Repair records
- Fields: device (dropdown from the ledger) /
date / symptom (free text; the tool groups
records by recurring symptom keywords per
device, with manual override when it groups
wrong) / repair cost / downtime hours /
occurred on a sold-out night (checkbox)
- Paste-to-import in the format "date|device|
symptom|cost|downtime-hours"; failed lines
show red with the original text, never
silently dropped
Computation and results:
1. Per-device view: device / cumulative repair
spend / replacement price / ratio / repairs in
the last 12 months / most-repeated symptom
group count in 12 months / cumulative downtime
days / sold-out-night failures
2. Flag rules (all thresholds user-set; the tool
ships empty and greys out the feature until
thresholds exist):
- Cumulative repairs / replacement price above
my threshold: amber, "worth a replacement
review"
- Above my higher threshold, or the same
symptom 3+ times in 12 months: red,
"repair spend approaching replacement" /
"repeating fault"
- The words "recommend immediate replacement"
must never render - the tool states facts;
replacing is a human budget decision
3. Property summary: monthly repair spend as a
text bar chart; cost share by equipment type;
the amber-and-red device list sorted by ratio,
printable as one A4 page (the sheet for the
owner)
4. Maintenance reminders: from the cycle I set and
each device's last maintenance date, compute
the next due date and flag it inside the lead
days I choose
Hard requirements:
- No built-in replacement prices, repair-price
references, or statutory retirement ages -
those numbers must not be invented
- Data in page memory and local storage only;
export to CSV and JSON for backup, import to
restore; zero network requests
- Symptom keyword groups support manual merging
("no heat" and "weak heat" into one), and
counts recompute after merging
- All amounts displayed rounded to whole currency
units
Why it is written this way
The repair-versus-replace judgment jams on one missing number: the running total. Each repair looks reasonable alone - three hundred for a water heater fix, anyone approves that; five of them at fifteen hundred, half a new unit, is when the answer changes - but only if someone logged every visit and nobody ever did. The tool's core is that single division, repair spend over replacement price. The arithmetic is trivial; the hard part is somebody recording continuously - so the tool is a ledger first and a calculator second.
"Same symptom three times in twelve months turns red" is the old maintenance hand's rule of thumb: a fault that survives three repairs is no longer a parts problem but systemic decline, and the fourth repair bill is mostly sunk. This metric fires earlier than cumulative spend - it catches "about to die" rather than "already overpaid", buying the replacement decision some runway. Its prerequisite is symptom grouping, which is why manual merging is non-negotiable ("no heat" and "weak heat" are one thing); auto-grouping never survives contact with free-text notes, and a tool that leaves no room for human correction is unusable.
No defaults for prices or thresholds, on the same discipline that governs repair judgment: build in "replace above 50%" and users will quote it as the standard answer, while real decisions are far messier than one ratio - swap before or after peak season, how many rooms the device takes down, what else is urgent in the budget. The tool's job is to nail two facts to the wall ("repairs are at 47% of replacement, same fault 3 times in 12 months") and let a human decide in front of them, not instead of them.
The sold-out-night checkbox gives the ledger a second reading in front of the owner: five repairs all in empty low-season weeks and three failures on sold-out nights are two entirely different risk classes. Downtime crossed with sold-out nights is the device's true threat to revenue - a column nobody records until the night everyone wants to know.