# Quote estimator > **Experimental.** A working reference exists with two illustrative examples built from invented prices. It has no qualification and no human review, so it is not Supported. ## Purpose and inputs A small page where a visitor chooses quantities and sees what the owner's own price rules add up to. You supply the prices, the amounts a visitor may choose, the currency and how many decimals it has, optional adjustments, the assumptions the estimate leaves out and, if you have one, a link where people can ask for a final quote. Nothing is invented: no prices, taxes, exchange rates, discounts or claims of accuracy. Everything lives in one `content.json`. Decimals are always written with a dot and as text (`"18.75"`), whatever language the page speaks. - `locale` (`en` or `pt-BR`), `layout` (`units`: a service priced by time and units, with steppers and a receipt beside the form; `items`: a priced menu with an order slip), `title`, `description`, optional `intro`, `illustrative: true` to add a notice that the content is invented. - `currency` (three capital letters) and `exponent` (0 to 6, how many decimals the currency has). You state both; the recipe never guesses precision from the currency and never converts between currencies. - `revision`: a short label you change whenever the price rules change, for example `2026-11-a`. - `lines`: each has `id`, `label`, `unit`, `price`, optional `help`, `step`, `min`, `default` and a required `max`. The price is for one step. A step of `"0.25"` with unit `hours` means a visitor types hours in quarter-hours and the price is per quarter-hour. Counted quantities are always whole numbers of steps, never fractions. - `adjustments`: each has `id`, `label`, `kind` and `mode`. `kind: "fixed"` uses `amount` (negative for a discount); `kind: "percent"` uses `percent` (at most two decimals, at most 1000). `mode: "always"` is included for everyone; `mode: "optional"` is a checkbox with an optional `default`. - `assumptions`: at least one plain sentence about what is not included. - `request`: a `label`, a `url` (https, http, mailto or tel, no credentials or token-like parameters) and an optional `note`. Leave it out and the page says asking for a final quote is not set up; no link or form appears. ## How the arithmetic works Money is whole minor units (cents). Each line is price times quantity. Every percentage is applied to the original subtotal, not compounded, and rounded half away from zero to a minor unit (5% of 1.99 is 0.10; 2.5% of 0.20 is 0.01). Adjustments are applied in the order you list them. A discount may exceed the subtotal only if the total stays at zero or above: a negative total is refused, never shown as zero. If a result would be too large to be exact, the page refuses instead of showing a wrong number. The build checks the smallest and largest choices a visitor can make and refuses rules that could not be priced. Percentages here can only add (a fee or surcharge). A percentage discount is not expressible; use a fixed discount instead. ## What the visitor sees - A running total near the top, a full breakdown, the assumptions and the label "Non-binding estimate". The owner's prices are read-only. - Quantities are typed in the page's own decimal style: a dot in English, a comma in Brazilian Portuguese. Thousands separators, spaces, the other language's separator, scientific notation, `NaN` and too many decimals are refused with a message that names the field. While any number is invalid, no total is shown. - The one primary action is the request link, placed with the estimate. ## Saving, sharing and resetting - **Remember on this device** is off by default. When on, it stores quantities and ticked options only, in this browser, scoped to the current price rules. It never stores the name or the note and never reaches another device. If the browser blocks or is full, the page says so and everything else keeps working. - **Share summary** is text of the result only. A name or note appears in it only if the visitor ticks the matching box. Nothing is uploaded or posted; the visitor copies it or downloads a `.txt`. - **Full draft** is a JSON file that does include the visitor's name and note, and says so. It is versioned, holds no prices, currency or destinations, and is bound to the price rules' revision and digest. Importing a draft made for other rules, with unknown fields, or with out-of-range values is refused, says why and changes nothing. Reset and re-enter against new rules. - **Reset** asks first, then restores your defaults and removes only this price rule set's saved copy on the device. Invalid quantities must be corrected before saving or exporting a draft; the last saved copy stays unchanged. A file that finishes reading after a newer import, edit or reset is ignored. If removing the saved copy fails, reset explains that it may return after reload. ## Build ```sh node reference/build.mjs examples/home-network-visit/content.json /path/to/empty-folder ``` The result is `public/` inside that folder: `index.html`, `style.css`, `app.mjs`, `model.mjs`, `draft.mjs` and `text.mjs`. Nothing else is copied, the build never writes into your inputs and it refuses an output folder that overlaps them. Bad input stops the build with every problem named and writes nothing. The scripts are ES modules: serve the folder over http; opening `index.html` straight from disk shows the prices and a note instead of the calculator. ## Completion checks - Every price, range and assumption comes from your material; check an example total by hand. - The currency and exponent match how you invoice. - The page says it is an estimate, and the request link is yours (open it yourself). - Try a wrong number, an import from other rules and a reset. ## Limits and optional additions Without JavaScript the page shows your prices and assumptions and says no total is calculated. There is no range or minimum-maximum estimate, no tax, no currency conversion, no backend and no form: sending a quote request needs the optional `contact-form` addition, which this base does not include. The examples use invented businesses and the reserved `example.org` domain, and say so on the page.