garnet-calculator is a simple calculator delivered as a single page. A visitor opens the page, enters numbers and operators, and sees the arithmetic result without leaving the page. The product intent is narrow and complete: one page, basic arithmetic, a visible result, and a way to clear the calculation and start again.
The audience is any general user who wants a correct answer fast — no account, no brand relationship, no audience segmentation beyond "someone doing arithmetic." The page is the anonymous public entry to the product and the only surface of the product.
There is no separate product document requested beyond this SRD; the requester asked for a project to build a simple single-page calculator, and this document specifies that product.
garnet-calculator is a single-page web calculator. The page presents a display readout and a keypad of digits, operators, an equals control, and a clear control. The user builds an expression by pressing keys, commits it with equals, and reads the result in the display. Clearing resets the calculation so a new one can begin.
Actors
Delivery and ownership
Current scope
Exclusions
Removed from scope
The user asked for "a simple single page of project of calculator." That is taken literally: one page, one purpose, arithmetic. The page is public and anonymous — there is no reason for identity because nothing the user does needs to be privately owned, resumed, or bound to a commitment. The calculator's state lives only for the duration of the visit.
Everything the user needs — the display, the digits, the four basic operators, equals, and clear — lives on the single Calculator page. There is no second destination to navigate to, and no future horizon was stated by the user, so no future section is carried.
The provisioned backend, database, and frontend services are infrastructure for the project; they do not add calculator capabilities. The calculator's arithmetic is performed in the page interaction itself.
The single page of the product. Anonymous public entry; no identity required. It is a two-panel Swiss poster layout on desktop: a headline and geometric composition on the left, the calculator plate on the right; a single column on mobile.
Information and state
0), entry in progress (shows the expression being built), result (shows the computed value), error (shows an error indication when the expression cannot be evaluated, e.g. division by zero or malformed input).Primary actions
Supporting actions
Domain entities
Component responsibilities
CALCULATE wordmark with a 2px red rule at exactly the headline's measure, and beneath it the geometric composition (black square, red circle, hairline cross) placed asymmetrically on the grid.01–12 micro-labels along the top edge on desktop only, exposing the grid.States
0; no expression in progress.prefers-reduced-motion).FR-1 — Single-page calculator delivery (explicit) As a Calculator User, I should reach the calculator as a single page, so that I can do arithmetic without navigating anywhere else.
FR-2 — Enter numbers and operators (explicit) As a Calculator User, I should enter numbers and operators on the page, so that I can build the arithmetic expression I want to compute.
FR-3 — Compute and view the result (explicit) As a Calculator User, I should compute the expression and see the result on the page, so that I get the answer I came for.
prefers-reduced-motion).FR-4 — Clear the calculation (required_inference) As a Calculator User, I should clear the calculation, so that I can start a fresh calculation from a known state.
0) and the expression is reset.FR-5 — Correct the current entry (required_inference) As a Calculator User, I should remove the last entered character, so that I can fix a mistyped digit without clearing the whole calculation.
Product context. A general visitor who arrives at the single Calculator page to do a piece of basic arithmetic and get a correct answer quickly. There is no account, no history, and no relationship with the product beyond this visit.
Primary goal. Enter a calculation and read the correct result without leaving the page.
Distinct accepted responsibilities.
Relevant inputs and decisions. Which digits and operators to enter; when the expression is complete enough to commit with equals; whether to correct, clear, or continue after a result or an error.
Interactions with other accepted participants. None — the Calculator User is the only active human participant, and no other persona is affected by the calculation.
Observable success. The display shows the correct numeric result for the entered expression, and the user can clear and start a new calculation without leaving the page.
0.prefers-reduced-motion).0 and the expression is reset.0.Muse and headline. Josef Müller-Brockmann — "Swiss arithmetic: a calculator locked to the grid." The register is exactness, calm, and mathematical confidence: engineered, not decorated. No warmth, no playfulness, no gloss.
Colour tokens (light mode)
| Role | Hex | Use |
|---|---|---|
| Background | #F4F1EA | Warm paper ground carrying the page (~70%) |
| Surface | #FFFFFF | Calculator plate (~20%) |
| Text / ink | #111111 | Numerals, rules, hairlines (~8%) |
| Primary | #E1251B | Swiss red — equals key, operator column, 2px rule under display (~2%) |
| Accent | #111111 | Second colour in the two-colour system |
| Muted | #8A857B | Micro-labels and secondary metadata only |
Typography. Archivo throughout. Headings and display numerals at 700; labels at 500; helper text at 400. Flush-left, ragged-right. Uppercase micro-labels with 0.14em tracking. Result readout uses tabular numerals at 700 with -0.02em tracking so digits lock into columns.
Type scale (1.5 modular rhythm, four sizes only)
clamp(40px, 8vw, 96px) — 40px mobile → 96px desktop.Shape language. Hard edges only — 0px radius on every surface, key, and rule. Keys are rectangles divided by 1px #111 hairlines rather than gaps, so the keypad reads as one engineered plate. A single 2px red rule sits under the display; one 8px black square marks the grid origin at the top-left of the keypad. No shadows, no rounding, no pills.
Layout. 12-column asymmetric grid on the paper ground. Left 7 columns: oversized flush-left CALCULATE headline over a black-and-red geometric composition (red circle, black square, hairline cross). Right 5 columns: the white calculator plate with display band on top and a 4×5 keypad divided by hairlines. At 375px: single column, headline block first (40px), then keypad full-width. At 768px: headline and keypad 50/50. At 1280px: 7/5 split with a 96px gutter. Numbered column markers 01–12 run as 10px muted labels along the top edge on desktop only.
Imagery. No photography, no illustration. Geometry only: solid red circle, black square, hairline cross, plus the keypad itself as the second poster. Operators are pure typographic glyphs in the red column; equals is a solid red block with a white glyph.
Accessibility. Readable text and controls stay whole at 375px, 768px, and 1280px, wrapping or scaling to fit; no element covers any part of them. Contrast: #111111 on #F4F1EA and on #FFFFFF exceeds WCAG AA; white glyph on #E1251B equals key meets AA for large text.
The public entry is a two-panel Swiss poster, not a centred card. On the paper ground (#F4F1EA), the left panel carries CALCULATE in Archivo 700 at up to 96px, flush to the left margin with no container, a 2px red rule spanning exactly the headline's measure beneath it, and below that a black square, a red circle, and a hairline cross arranged asymmetrically on the grid — the page's poster image. The right panel is the white calculator plate: hard-edged, display band on top with a 2px red rule, a 4×5 keypad divided by 1px black hairlines with no gaps or radii, the red operator column as the only colour among black numerals, and the solid red equals key anchoring the bottom-right corner. Numbered 01–12 column markers along the top edge expose the grid the whole page is built on. No gradient, no shadow, no floating card, no third colour.
Interaction Model: Static (direction) Motion Tempo: restrained Hero Dimensionality: flat
Landing Hero Motion Brief
CALCULATE headline and the geometric composition (black square, red circle, hairline cross) beside the white calculator plate.#111 with white numerals for 90ms — mechanical feedback, no easing flourish — and the display readout updates. Pressing equals lands a new value in the readout with a single 120ms opacity fade. The page itself never animates on entry.CALCULATE flush left at 96px with the red rule beneath; geometric composition below; white calculator plate on the right with the red equals key at bottom-right; column markers along the top edge.prefers-reduced-motion, the 120ms result fade is removed; the readout changes instantly. Key-press feedback and hover hairline thickening remain as non-motion state changes.prefers-reduced-motion removes the 120ms result fade and provides a usable static arrangement.frontend, backend, database).No additional infrastructure is required for the accepted calculator workflows.
0.
garnet-calculatorKeys and numpad · Esc clears · Backspace deletes

garnet-calculatorKeys and numpad · Esc clears · Backspace deletes
No comments yet. Be the first!